From 9fcc7b6cb0066573e1022f399e1bb0ec87a537ae Mon Sep 17 00:00:00 2001 From: Jamie Rodriguez <65564846+fivetran-jamie@users.noreply.github.com> Date: Wed, 12 Oct 2022 14:40:58 -0700 Subject: [PATCH 01/13] working --- CHANGELOG.md | 4 ++++ README.md | 2 +- dbt_project.yml | 2 +- integration_tests/dbt_project.yml | 2 +- integration_tests/requirements.txt | 12 ++++++------ models/shopify_holistic_reporting.yml | 2 ++ ...hopify_holistic_reporting__orders_attribution.sql | 4 ++-- 7 files changed, 17 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 72b63a9..b2d5339 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# dbt_shopify_holistic_reporting v0.1.2 +## Bug Fixes +- Adjusts the incremental logic in the `shopify_holistic_reporting__orders_attribution` model. Previously, on incremental runs, this model transformed only newly-_created_ orders, comparing each order's `created_timestamp` to the `max(created_timestamp)` in the model. Now, the model will also transform newly-_updated_ orders and use `updated_timestamp` instead of `created_timestamp` to determine if an order should be included in an incremental run. + # dbt_shopify_holistic_reporting v0.1.1 ## Bug Fixes Incorporate the try_cast macro from fivetran_utils to ensure that the numeric_value field in int__daily_klaviyo_user_metrics is the same data type as '0'. ([#6](https://github.com/fivetran/dbt_shopify_holistic_reporting/pull/6)) diff --git a/README.md b/README.md index b2812ca..2d866a0 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ This package produces three final output models, and is currently designed to wo | **model** | **description** | | ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------- | -| [shopify_holistic_reporting__orders_attribution](https://github.com/fivetran/dbt_shopify_holistic_reporting/blob/main/models/shopify_holistic_reporting__orders_attribution.sql) | Each record represents a unique Shopify order, enhanced with a customizable last-touch attribution model associating orders with Klaviyo flows and campaigns that customers interacted with. Includes dimensions like whether it is a new or repeat purchase in Shopify. See available customizations [here](https://github.com/fivetran/dbt_klaviyo#attribution-lookback-window). | +| [shopify_holistic_reporting__orders_attribution](https://github.com/fivetran/dbt_shopify_holistic_reporting/blob/main/models/shopify_holistic_reporting__orders_attribution.sql) | Each record represents a unique Shopify order, enhanced with a customizable last-touch attribution model associating orders with Klaviyo flows and campaigns that customers interacted with. Includes dimensions like whether it is a new or repeat purchase in Shopify. See available customizations [here](https://github.com/fivetran/dbt_klaviyo#attribution-lookback-window). Materialized incrementally by default. | | [shopify_holistic_reporting__daily_customer_metrics](https://github.com/fivetran/dbt_shopify_holistic_reporting/blob/main/models/shopify_holistic_reporting__daily_customer_metrics.sql) | Each record represent a unique customer's daily activity attributed to a campaign or flow in Klaviyo. The grain is set at the customer-day-flow/campaign level. This model is enriched with both Shopify and Klaviyo metrics, such as the net revenue, taxes paid, discounts applied, and the counts of each type of interaction between the user and the campaign/flow. | | [shopify_holistic_reporting__customer_enhanced](https://github.com/fivetran/dbt_shopify_holistic_reporting/blob/main/models/shopify_holistic_reporting__customer_enhanced.sql) | Each record represents a unique individual (based on email) that may exist in Shopify, Klaviyo, or both platforms. Enhanced with information coalesced across platforms, lifetime order metrics, and all-time interactions with email marketing campaigns and flows. | diff --git a/dbt_project.yml b/dbt_project.yml index 0def78d..585630b 100644 --- a/dbt_project.yml +++ b/dbt_project.yml @@ -1,5 +1,5 @@ name: 'shopify_holistic_reporting' -version: '0.1.1' +version: '0.1.2' config-version: 2 require-dbt-version: [">=1.0.0", "<2.0.0"] diff --git a/integration_tests/dbt_project.yml b/integration_tests/dbt_project.yml index 8617bc1..814d2fc 100644 --- a/integration_tests/dbt_project.yml +++ b/integration_tests/dbt_project.yml @@ -1,5 +1,5 @@ name: 'shopify_holistic_reporting_integration_tests' -version: '0.1.1' +version: '0.1.2' profile: 'integration_tests' config-version: 2 diff --git a/integration_tests/requirements.txt b/integration_tests/requirements.txt index 89c6ccb..4913903 100644 --- a/integration_tests/requirements.txt +++ b/integration_tests/requirements.txt @@ -1,6 +1,6 @@ -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 +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 \ No newline at end of file diff --git a/models/shopify_holistic_reporting.yml b/models/shopify_holistic_reporting.yml index c0e803b..a8a0cc4 100644 --- a/models/shopify_holistic_reporting.yml +++ b/models/shopify_holistic_reporting.yml @@ -218,6 +218,8 @@ models: `klaviyo__email_attribution_lookback` and `klaviyo__sms_attribution_lookback` variables, respectively (in integer-hours). Refer to the Klaviyo package [README](https://github.com/fivetran/dbt_klaviyo#attribution-lookback-window) for more details. + + Materialized incrementally by default. tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: diff --git a/models/shopify_holistic_reporting__orders_attribution.sql b/models/shopify_holistic_reporting__orders_attribution.sql index 3310eab..df1ef72 100644 --- a/models/shopify_holistic_reporting__orders_attribution.sql +++ b/models/shopify_holistic_reporting__orders_attribution.sql @@ -16,9 +16,9 @@ with orders as ( select * from {{ ref('shopify__orders') }} - -- just grab new orders + -- just grab new + newly updated orders {% if is_incremental() %} - where created_timestamp >= (select max(created_timestamp) from {{ this }}) + where updated_timestamp >= (select max(updated_timestamp) from {{ this }}) {% endif %} ), events as ( From 6b872ae551126108ee3fc9ca96fb190b6db9007b Mon Sep 17 00:00:00 2001 From: Jamie Rodriguez <65564846+fivetran-jamie@users.noreply.github.com> Date: Wed, 12 Oct 2022 14:47:44 -0700 Subject: [PATCH 02/13] changelog --- CHANGELOG.md | 6 ++++-- dbt_project.yml | 2 +- integration_tests/dbt_project.yml | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b2d5339..1b1636b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ -# dbt_shopify_holistic_reporting v0.1.2 +# dbt_shopify_holistic_reporting v0.2.0 ## Bug Fixes -- Adjusts the incremental logic in the `shopify_holistic_reporting__orders_attribution` model. Previously, on incremental runs, this model transformed only newly-_created_ orders, comparing each order's `created_timestamp` to the `max(created_timestamp)` in the model. Now, the model will also transform newly-_updated_ orders and use `updated_timestamp` instead of `created_timestamp` to determine if an order should be included in an incremental run. +- Adjusts the incremental logic in the `shopify_holistic_reporting__orders_attribution` model. Previously, on incremental runs, this model transformed only newly-_created_ orders, comparing each order's `created_timestamp` to the `max(created_timestamp)` in the model. Now, the model will also transform newly-_updated_ orders and use `updated_timestamp` instead of `created_timestamp` to determine if an order should be included in an incremental run ([#9](https://github.com/fivetran/dbt_shopify_holistic_reporting/pull/9)). + +This is a 🚨 Breaking Change 🚨 as **you will need to run a full refresh**. # dbt_shopify_holistic_reporting v0.1.1 ## Bug Fixes diff --git a/dbt_project.yml b/dbt_project.yml index 585630b..099380c 100644 --- a/dbt_project.yml +++ b/dbt_project.yml @@ -1,5 +1,5 @@ name: 'shopify_holistic_reporting' -version: '0.1.2' +version: '0.2.0' config-version: 2 require-dbt-version: [">=1.0.0", "<2.0.0"] diff --git a/integration_tests/dbt_project.yml b/integration_tests/dbt_project.yml index 814d2fc..d4c15fd 100644 --- a/integration_tests/dbt_project.yml +++ b/integration_tests/dbt_project.yml @@ -1,5 +1,5 @@ name: 'shopify_holistic_reporting_integration_tests' -version: '0.1.2' +version: '0.2.0' profile: 'integration_tests' config-version: 2 From 511876fc3779dadc141430d7ae1a0e539c42907a Mon Sep 17 00:00:00 2001 From: Jamie Rodriguez <65564846+fivetran-jamie@users.noreply.github.com> Date: Wed, 12 Oct 2022 16:16:28 -0700 Subject: [PATCH 03/13] tweak PR template --- .github/pull_request_template.md | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 35f658d..f450926 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?** From 53bcc3ae11cc343b838d68616fc07a34423555b9 Mon Sep 17 00:00:00 2001 From: Jamie Rodriguez <65564846+fivetran-jamie@users.noreply.github.com> Date: Wed, 12 Oct 2022 16:31:51 -0700 Subject: [PATCH 04/13] use working branch of klaviyo --- packages.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages.yml b/packages.yml index a157727..d689e87 100644 --- a/packages.yml +++ b/packages.yml @@ -2,5 +2,8 @@ packages: - package: fivetran/shopify version: [">=0.6.0", "<0.7.0"] - - package: fivetran/klaviyo - version: [">=0.4.0", "<0.5.0"] + # - package: fivetran/klaviyo + # version: [">=0.4.0", "<0.5.0"] + + - git: https://github.com/fivetran/dbt_klaviyo.git + revision: postgres-incremental-strategy From 8010d58a82707ba7d26dd8880ada1bc8574360e7 Mon Sep 17 00:00:00 2001 From: Jamie Rodriguez <65564846+fivetran-jamie@users.noreply.github.com> Date: Wed, 12 Oct 2022 17:12:43 -0700 Subject: [PATCH 05/13] merge strategy --- models/shopify_holistic_reporting__orders_attribution.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/shopify_holistic_reporting__orders_attribution.sql b/models/shopify_holistic_reporting__orders_attribution.sql index df1ef72..afd618e 100644 --- a/models/shopify_holistic_reporting__orders_attribution.sql +++ b/models/shopify_holistic_reporting__orders_attribution.sql @@ -6,7 +6,7 @@ "field": "created_timestamp", "data_type": "timestamp" } if target.type == 'bigquery' else none, - incremental_strategy = 'merge', + incremental_strategy = 'merge' if target.type != 'postgres' else 'delete+insert', file_format = 'delta' ) }} From 9b1163fb8f95638e00a0c50d989435c2c72a735a Mon Sep 17 00:00:00 2001 From: Jamie Rodriguez <65564846+fivetran-jamie@users.noreply.github.com> Date: Wed, 12 Oct 2022 17:14:19 -0700 Subject: [PATCH 06/13] reorder tests --- .circleci/config.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4536478..4725ae8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -47,17 +47,6 @@ jobs: dbt run --target bigquery --full-refresh dbt run --target bigquery dbt test --target bigquery - - 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 --target redshift - dbt test --target redshift - run: name: "Run Tests - Snowflake" command: | @@ -79,4 +68,15 @@ jobs: dbt seed --target spark --full-refresh dbt run --target spark --full-refresh dbt run --target spark - dbt test --target spark \ No newline at end of file + 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 --target redshift + dbt test --target redshift \ No newline at end of file From cb1f560aa0a73653fda3b069aff9505a95f1e3db Mon Sep 17 00:00:00 2001 From: Jamie Rodriguez <65564846+fivetran-jamie@users.noreply.github.com> Date: Thu, 13 Oct 2022 09:40:31 -0700 Subject: [PATCH 07/13] add postgres change to changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b1636b..3f92947 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ This is a 🚨 Breaking Change 🚨 as **you will need to run a full refresh**. +## Under the Hood +- Ensures that the incremental strategy used by postgres adapters in the `shopify_holistic_reporting__orders_attribution` model is `delete+insert` ([#9](https://github.com/fivetran/dbt_shopify_holistic_reporting/pull/9)). + # dbt_shopify_holistic_reporting v0.1.1 ## Bug Fixes Incorporate the try_cast macro from fivetran_utils to ensure that the numeric_value field in int__daily_klaviyo_user_metrics is the same data type as '0'. ([#6](https://github.com/fivetran/dbt_shopify_holistic_reporting/pull/6)) From a2b73df41bff659bc3cb4e6cb5261440dcf1a65c Mon Sep 17 00:00:00 2001 From: Jamie Rodriguez <65564846+fivetran-jamie@users.noreply.github.com> Date: Thu, 13 Oct 2022 10:58:31 -0700 Subject: [PATCH 08/13] tweak changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f92947..6e66046 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ This is a 🚨 Breaking Change 🚨 as **you will need to run a full refresh**. ## Under the Hood -- Ensures that the incremental strategy used by postgres adapters in the `shopify_holistic_reporting__orders_attribution` model is `delete+insert` ([#9](https://github.com/fivetran/dbt_shopify_holistic_reporting/pull/9)). +- Ensures that the incremental strategy used by postgres adapters in the `shopify_holistic_reporting__orders_attribution` model is `delete+insert` ([#9](https://github.com/fivetran/dbt_shopify_holistic_reporting/pull/9)). Newer versions of dbt-postgres introduced an error message if the provided incremental strategy is not `append` or `delete+insert`. # dbt_shopify_holistic_reporting v0.1.1 ## Bug Fixes From e6c23ab2194b7ccb9e42c7bff3da050a00314d95 Mon Sep 17 00:00:00 2001 From: Jamie Rodriguez <65564846+fivetran-jamie@users.noreply.github.com> Date: Thu, 13 Oct 2022 11:25:04 -0700 Subject: [PATCH 09/13] reorder --- .circleci/config.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4725ae8..ff0f58f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -33,6 +33,17 @@ jobs: dbt run --target postgres --full-refresh dbt run --target postgres dbt test --target postgres + - 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 --target redshift + dbt test --target redshift - run: name: "Run Tests - BigQuery" environment: @@ -68,15 +79,4 @@ jobs: dbt seed --target spark --full-refresh dbt run --target spark --full-refresh dbt run --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 --target redshift - dbt test --target redshift \ No newline at end of file + dbt test --target spark \ No newline at end of file From 56d820f856a35dcdb2e31070f16fb71c02f98c80 Mon Sep 17 00:00:00 2001 From: Jamie Rodriguez <65564846+fivetran-jamie@users.noreply.github.com> Date: Thu, 13 Oct 2022 11:37:45 -0700 Subject: [PATCH 10/13] Redshift too --- CHANGELOG.md | 2 +- models/shopify_holistic_reporting__orders_attribution.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e66046..437a5ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ This is a 🚨 Breaking Change 🚨 as **you will need to run a full refresh**. ## Under the Hood -- Ensures that the incremental strategy used by postgres adapters in the `shopify_holistic_reporting__orders_attribution` model is `delete+insert` ([#9](https://github.com/fivetran/dbt_shopify_holistic_reporting/pull/9)). Newer versions of dbt-postgres introduced an error message if the provided incremental strategy is not `append` or `delete+insert`. +- Ensures that the incremental strategy used by Postgres and Redshift adapters in the `shopify_holistic_reporting__orders_attribution` model is `delete+insert` ([#9](https://github.com/fivetran/dbt_shopify_holistic_reporting/pull/9)). Newer versions of dbt introduced an error message if the provided incremental strategy is not `append` or `delete+insert` for these adapters. # dbt_shopify_holistic_reporting v0.1.1 ## Bug Fixes diff --git a/models/shopify_holistic_reporting__orders_attribution.sql b/models/shopify_holistic_reporting__orders_attribution.sql index afd618e..f0eb67f 100644 --- a/models/shopify_holistic_reporting__orders_attribution.sql +++ b/models/shopify_holistic_reporting__orders_attribution.sql @@ -6,7 +6,7 @@ "field": "created_timestamp", "data_type": "timestamp" } if target.type == 'bigquery' else none, - incremental_strategy = 'merge' if target.type != 'postgres' else 'delete+insert', + incremental_strategy = 'merge' if target.type not in ('postgres', 'redshift') else 'delete+insert', file_format = 'delta' ) }} From 4538de41705a9f05400891638f95ceb258599a3d Mon Sep 17 00:00:00 2001 From: Jamie Rodriguez <65564846+fivetran-jamie@users.noreply.github.com> Date: Thu, 13 Oct 2022 16:11:54 -0700 Subject: [PATCH 11/13] docs and cap circle ci dbt versions --- .circleci/config.yml | 28 ++++++++++++++-------------- docs/catalog.json | 2 +- docs/graph.gpickle | Bin 297527 -> 383143 bytes docs/index.html | 20 ++++++++++---------- docs/manifest.json | 2 +- docs/partial_parse.msgpack | Bin 1158825 -> 1343656 bytes docs/run_results.json | 2 +- integration_tests/requirements.txt | 12 ++++++------ 8 files changed, 33 insertions(+), 33 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ff0f58f..d9ff35b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -22,6 +22,20 @@ jobs: pip install -r integration_tests/requirements.txt mkdir -p ~/.dbt cp integration_tests/ci/sample.profiles.yml ~/.dbt/profiles.yml + - 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 --target bigquery + dbt test --target bigquery - run: name: "Run Tests - Postgres" command: | @@ -44,20 +58,6 @@ jobs: dbt run --target redshift --full-refresh dbt run --target redshift dbt test --target redshift - - 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 --target bigquery - dbt test --target bigquery - run: name: "Run Tests - Snowflake" command: | diff --git a/docs/catalog.json b/docs/catalog.json index 45d9b0f..33a7a22 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.0", "generated_at": "2022-01-05T19:18:32.006221Z", "invocation_id": "88cce84c-013a-43d2-9d78-733fb6117f26", "env": {}}, "nodes": {"model.klaviyo.int_klaviyo__event_attribution": {"metadata": {"type": "table", "schema": "dbt_transformations", "name": "int_klaviyo__event_attribution", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"variation_id": {"type": "STRING", "index": 1, "name": "variation_id", "comment": null}, "campaign_id": {"type": "STRING", "index": 2, "name": "campaign_id", "comment": null}, "occurred_at": {"type": "TIMESTAMP", "index": 3, "name": "occurred_at", "comment": null}, "flow_id": {"type": "STRING", "index": 4, "name": "flow_id", "comment": null}, "flow_message_id": {"type": "STRING", "index": 5, "name": "flow_message_id", "comment": null}, "event_id": {"type": "STRING", "index": 6, "name": "event_id", "comment": null}, "metric_id": {"type": "STRING", "index": 7, "name": "metric_id", "comment": null}, "person_id": {"type": "STRING", "index": 8, "name": "person_id", "comment": null}, "type": {"type": "STRING", "index": 9, "name": "type", "comment": null}, "uuid": {"type": "STRING", "index": 10, "name": "uuid", "comment": null}, "numeric_value": {"type": "FLOAT64", "index": 11, "name": "numeric_value", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 12, "name": "_fivetran_synced", "comment": null}, "source_relation": {"type": "STRING", "index": 13, "name": "source_relation", "comment": null}, "occurred_on": {"type": "DATE", "index": 14, "name": "occurred_on", "comment": null}, "touch_id": {"type": "STRING", "index": 15, "name": "touch_id", "comment": null}, "touch_type": {"type": "STRING", "index": 16, "name": "touch_type", "comment": null}, "touch_session": {"type": "INT64", "index": 17, "name": "touch_session", "comment": null}, "session_start_at": {"type": "TIMESTAMP", "index": 18, "name": "session_start_at", "comment": null}, "session_event_type": {"type": "STRING", "index": 19, "name": "session_event_type", "comment": null}, "last_touch_id": {"type": "STRING", "index": 20, "name": "last_touch_id", "comment": null}, "session_touch_type": {"type": "STRING", "index": 21, "name": "session_touch_type", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 22891897635.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 125792204.0, "include": true, "description": "Approximate count of rows in this table"}, "partitioning_type": {"id": "partitioning_type", "label": "Partitioned By", "value": "occurred_on", "include": true, "description": "The partitioning column for this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.klaviyo.int_klaviyo__event_attribution"}, "model.klaviyo.klaviyo__campaigns": {"metadata": {"type": "table", "schema": "dbt_transformations", "name": "klaviyo__campaigns", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"campaign_type": {"type": "STRING", "index": 1, "name": "campaign_type", "comment": null}, "created_at": {"type": "TIMESTAMP", "index": 2, "name": "created_at", "comment": null}, "email_template_id": {"type": "STRING", "index": 3, "name": "email_template_id", "comment": null}, "from_email": {"type": "STRING", "index": 4, "name": "from_email", "comment": null}, "from_name": {"type": "STRING", "index": 5, "name": "from_name", "comment": null}, "campaign_id": {"type": "STRING", "index": 6, "name": "campaign_id", "comment": null}, "is_segmented": {"type": "BOOL", "index": 7, "name": "is_segmented", "comment": null}, "campaign_name": {"type": "STRING", "index": 8, "name": "campaign_name", "comment": null}, "scheduled_to_send_at": {"type": "TIMESTAMP", "index": 9, "name": "scheduled_to_send_at", "comment": null}, "sent_at": {"type": "TIMESTAMP", "index": 10, "name": "sent_at", "comment": null}, "status": {"type": "STRING", "index": 11, "name": "status", "comment": null}, "status_id": {"type": "STRING", "index": 12, "name": "status_id", "comment": null}, "subject": {"type": "STRING", "index": 13, "name": "subject", "comment": null}, "updated_at": {"type": "TIMESTAMP", "index": 14, "name": "updated_at", "comment": null}, "source_relation": {"type": "STRING", "index": 15, "name": "source_relation", "comment": null}, "variation_id": {"type": "STRING", "index": 16, "name": "variation_id", "comment": null}, "total_count_unique_people": {"type": "INT64", "index": 17, "name": "total_count_unique_people", "comment": null}, "first_event_at": {"type": "TIMESTAMP", "index": 18, "name": "first_event_at", "comment": null}, "last_event_at": {"type": "TIMESTAMP", "index": 19, "name": "last_event_at", "comment": null}, "sum_revenue_refunded_order": {"type": "FLOAT64", "index": 20, "name": "sum_revenue_refunded_order", "comment": null}, "sum_revenue_placed_order": {"type": "FLOAT64", "index": 21, "name": "sum_revenue_placed_order", "comment": null}, "sum_revenue_ordered_product": {"type": "FLOAT64", "index": 22, "name": "sum_revenue_ordered_product", "comment": null}, "sum_revenue_checkout_started": {"type": "FLOAT64", "index": 23, "name": "sum_revenue_checkout_started", "comment": null}, "sum_revenue_cancelled_order": {"type": "FLOAT64", "index": 24, "name": "sum_revenue_cancelled_order", "comment": null}, "count_active_on_site": {"type": "INT64", "index": 25, "name": "count_active_on_site", "comment": null}, "unique_count_active_on_site": {"type": "INT64", "index": 26, "name": "unique_count_active_on_site", "comment": null}, "count_viewed_product": {"type": "INT64", "index": 27, "name": "count_viewed_product", "comment": null}, "unique_count_viewed_product": {"type": "INT64", "index": 28, "name": "unique_count_viewed_product", "comment": null}, "count_ordered_product": {"type": "INT64", "index": 29, "name": "count_ordered_product", "comment": null}, "unique_count_ordered_product": {"type": "INT64", "index": 30, "name": "unique_count_ordered_product", "comment": null}, "count_placed_order": {"type": "INT64", "index": 31, "name": "count_placed_order", "comment": null}, "unique_count_placed_order": {"type": "INT64", "index": 32, "name": "unique_count_placed_order", "comment": null}, "count_refunded_order": {"type": "INT64", "index": 33, "name": "count_refunded_order", "comment": null}, "unique_count_refunded_order": {"type": "INT64", "index": 34, "name": "unique_count_refunded_order", "comment": null}, "count_received_email": {"type": "INT64", "index": 35, "name": "count_received_email", "comment": null}, "unique_count_received_email": {"type": "INT64", "index": 36, "name": "unique_count_received_email", "comment": null}, "count_clicked_email": {"type": "INT64", "index": 37, "name": "count_clicked_email", "comment": null}, "unique_count_clicked_email": {"type": "INT64", "index": 38, "name": "unique_count_clicked_email", "comment": null}, "count_opened_email": {"type": "INT64", "index": 39, "name": "count_opened_email", "comment": null}, "unique_count_opened_email": {"type": "INT64", "index": 40, "name": "unique_count_opened_email", "comment": null}, "count_marked_email_as_spam": {"type": "INT64", "index": 41, "name": "count_marked_email_as_spam", "comment": null}, "unique_count_marked_email_as_spam": {"type": "INT64", "index": 42, "name": "unique_count_marked_email_as_spam", "comment": null}, "count_unsubscribed": {"type": "INT64", "index": 43, "name": "count_unsubscribed", "comment": null}, "unique_count_unsubscribed": {"type": "INT64", "index": 44, "name": "unique_count_unsubscribed", "comment": null}, "count_received_sms": {"type": "INT64", "index": 45, "name": "count_received_sms", "comment": null}, "unique_count_received_sms": {"type": "INT64", "index": 46, "name": "unique_count_received_sms", "comment": null}, "count_clicked_sms": {"type": "INT64", "index": 47, "name": "count_clicked_sms", "comment": null}, "unique_count_clicked_sms": {"type": "INT64", "index": 48, "name": "unique_count_clicked_sms", "comment": null}, "count_sent_sms": {"type": "INT64", "index": 49, "name": "count_sent_sms", "comment": null}, "unique_count_sent_sms": {"type": "INT64", "index": 50, "name": "unique_count_sent_sms", "comment": null}, "count_unsubscribed_from_sms": {"type": "INT64", "index": 51, "name": "count_unsubscribed_from_sms", "comment": null}, "unique_count_unsubscribed_from_sms": {"type": "INT64", "index": 52, "name": "unique_count_unsubscribed_from_sms", "comment": null}, "campaign_variation_key": {"type": "STRING", "index": 53, "name": "campaign_variation_key", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 724184.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 1416.0, "include": true, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.klaviyo.klaviyo__campaigns"}, "model.klaviyo.int_klaviyo__campaign_flow_metrics": {"metadata": {"type": "view", "schema": "dbt_transformations", "name": "int_klaviyo__campaign_flow_metrics", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"last_touch_campaign_id": {"type": "STRING", "index": 1, "name": "last_touch_campaign_id", "comment": null}, "last_touch_flow_id": {"type": "STRING", "index": 2, "name": "last_touch_flow_id", "comment": null}, "variation_id": {"type": "STRING", "index": 3, "name": "variation_id", "comment": null}, "source_relation": {"type": "STRING", "index": 4, "name": "source_relation", "comment": null}, "total_count_unique_people": {"type": "INT64", "index": 5, "name": "total_count_unique_people", "comment": null}, "first_event_at": {"type": "TIMESTAMP", "index": 6, "name": "first_event_at", "comment": null}, "last_event_at": {"type": "TIMESTAMP", "index": 7, "name": "last_event_at", "comment": null}, "sum_revenue_refunded_order": {"type": "FLOAT64", "index": 8, "name": "sum_revenue_refunded_order", "comment": null}, "sum_revenue_placed_order": {"type": "FLOAT64", "index": 9, "name": "sum_revenue_placed_order", "comment": null}, "sum_revenue_ordered_product": {"type": "FLOAT64", "index": 10, "name": "sum_revenue_ordered_product", "comment": null}, "sum_revenue_checkout_started": {"type": "FLOAT64", "index": 11, "name": "sum_revenue_checkout_started", "comment": null}, "sum_revenue_cancelled_order": {"type": "FLOAT64", "index": 12, "name": "sum_revenue_cancelled_order", "comment": null}, "count_active_on_site": {"type": "INT64", "index": 13, "name": "count_active_on_site", "comment": null}, "unique_count_active_on_site": {"type": "INT64", "index": 14, "name": "unique_count_active_on_site", "comment": null}, "count_viewed_product": {"type": "INT64", "index": 15, "name": "count_viewed_product", "comment": null}, "unique_count_viewed_product": {"type": "INT64", "index": 16, "name": "unique_count_viewed_product", "comment": null}, "count_ordered_product": {"type": "INT64", "index": 17, "name": "count_ordered_product", "comment": null}, "unique_count_ordered_product": {"type": "INT64", "index": 18, "name": "unique_count_ordered_product", "comment": null}, "count_placed_order": {"type": "INT64", "index": 19, "name": "count_placed_order", "comment": null}, "unique_count_placed_order": {"type": "INT64", "index": 20, "name": "unique_count_placed_order", "comment": null}, "count_refunded_order": {"type": "INT64", "index": 21, "name": "count_refunded_order", "comment": null}, "unique_count_refunded_order": {"type": "INT64", "index": 22, "name": "unique_count_refunded_order", "comment": null}, "count_received_email": {"type": "INT64", "index": 23, "name": "count_received_email", "comment": null}, "unique_count_received_email": {"type": "INT64", "index": 24, "name": "unique_count_received_email", "comment": null}, "count_clicked_email": {"type": "INT64", "index": 25, "name": "count_clicked_email", "comment": null}, "unique_count_clicked_email": {"type": "INT64", "index": 26, "name": "unique_count_clicked_email", "comment": null}, "count_opened_email": {"type": "INT64", "index": 27, "name": "count_opened_email", "comment": null}, "unique_count_opened_email": {"type": "INT64", "index": 28, "name": "unique_count_opened_email", "comment": null}, "count_marked_email_as_spam": {"type": "INT64", "index": 29, "name": "count_marked_email_as_spam", "comment": null}, "unique_count_marked_email_as_spam": {"type": "INT64", "index": 30, "name": "unique_count_marked_email_as_spam", "comment": null}, "count_unsubscribed": {"type": "INT64", "index": 31, "name": "count_unsubscribed", "comment": null}, "unique_count_unsubscribed": {"type": "INT64", "index": 32, "name": "unique_count_unsubscribed", "comment": null}, "count_received_sms": {"type": "INT64", "index": 33, "name": "count_received_sms", "comment": null}, "unique_count_received_sms": {"type": "INT64", "index": 34, "name": "unique_count_received_sms", "comment": null}, "count_clicked_sms": {"type": "INT64", "index": 35, "name": "count_clicked_sms", "comment": null}, "unique_count_clicked_sms": {"type": "INT64", "index": 36, "name": "unique_count_clicked_sms", "comment": null}, "count_sent_sms": {"type": "INT64", "index": 37, "name": "count_sent_sms", "comment": null}, "unique_count_sent_sms": {"type": "INT64", "index": 38, "name": "unique_count_sent_sms", "comment": null}, "count_unsubscribed_from_sms": {"type": "INT64", "index": 39, "name": "count_unsubscribed_from_sms", "comment": null}, "unique_count_unsubscribed_from_sms": {"type": "INT64", "index": 40, "name": "unique_count_unsubscribed_from_sms", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.klaviyo.int_klaviyo__campaign_flow_metrics"}, "model.klaviyo.klaviyo__flows": {"metadata": {"type": "table", "schema": "dbt_transformations", "name": "klaviyo__flows", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"created_at": {"type": "TIMESTAMP", "index": 1, "name": "created_at", "comment": null}, "flow_id": {"type": "STRING", "index": 2, "name": "flow_id", "comment": null}, "flow_name": {"type": "STRING", "index": 3, "name": "flow_name", "comment": null}, "status": {"type": "STRING", "index": 4, "name": "status", "comment": null}, "flow_trigger": {"type": "STRING", "index": 5, "name": "flow_trigger", "comment": null}, "updated_at": {"type": "TIMESTAMP", "index": 6, "name": "updated_at", "comment": null}, "person_filter": {"type": "STRING", "index": 7, "name": "person_filter", "comment": null}, "source_relation": {"type": "STRING", "index": 8, "name": "source_relation", "comment": null}, "variation_id": {"type": "STRING", "index": 9, "name": "variation_id", "comment": null}, "total_count_unique_people": {"type": "INT64", "index": 10, "name": "total_count_unique_people", "comment": null}, "first_event_at": {"type": "TIMESTAMP", "index": 11, "name": "first_event_at", "comment": null}, "last_event_at": {"type": "TIMESTAMP", "index": 12, "name": "last_event_at", "comment": null}, "sum_revenue_refunded_order": {"type": "FLOAT64", "index": 13, "name": "sum_revenue_refunded_order", "comment": null}, "sum_revenue_placed_order": {"type": "FLOAT64", "index": 14, "name": "sum_revenue_placed_order", "comment": null}, "sum_revenue_ordered_product": {"type": "FLOAT64", "index": 15, "name": "sum_revenue_ordered_product", "comment": null}, "sum_revenue_checkout_started": {"type": "FLOAT64", "index": 16, "name": "sum_revenue_checkout_started", "comment": null}, "sum_revenue_cancelled_order": {"type": "FLOAT64", "index": 17, "name": "sum_revenue_cancelled_order", "comment": null}, "count_active_on_site": {"type": "INT64", "index": 18, "name": "count_active_on_site", "comment": null}, "unique_count_active_on_site": {"type": "INT64", "index": 19, "name": "unique_count_active_on_site", "comment": null}, "count_viewed_product": {"type": "INT64", "index": 20, "name": "count_viewed_product", "comment": null}, "unique_count_viewed_product": {"type": "INT64", "index": 21, "name": "unique_count_viewed_product", "comment": null}, "count_ordered_product": {"type": "INT64", "index": 22, "name": "count_ordered_product", "comment": null}, "unique_count_ordered_product": {"type": "INT64", "index": 23, "name": "unique_count_ordered_product", "comment": null}, "count_placed_order": {"type": "INT64", "index": 24, "name": "count_placed_order", "comment": null}, "unique_count_placed_order": {"type": "INT64", "index": 25, "name": "unique_count_placed_order", "comment": null}, "count_refunded_order": {"type": "INT64", "index": 26, "name": "count_refunded_order", "comment": null}, "unique_count_refunded_order": {"type": "INT64", "index": 27, "name": "unique_count_refunded_order", "comment": null}, "count_received_email": {"type": "INT64", "index": 28, "name": "count_received_email", "comment": null}, "unique_count_received_email": {"type": "INT64", "index": 29, "name": "unique_count_received_email", "comment": null}, "count_clicked_email": {"type": "INT64", "index": 30, "name": "count_clicked_email", "comment": null}, "unique_count_clicked_email": {"type": "INT64", "index": 31, "name": "unique_count_clicked_email", "comment": null}, "count_opened_email": {"type": "INT64", "index": 32, "name": "count_opened_email", "comment": null}, "unique_count_opened_email": {"type": "INT64", "index": 33, "name": "unique_count_opened_email", "comment": null}, "count_marked_email_as_spam": {"type": "INT64", "index": 34, "name": "count_marked_email_as_spam", "comment": null}, "unique_count_marked_email_as_spam": {"type": "INT64", "index": 35, "name": "unique_count_marked_email_as_spam", "comment": null}, "count_unsubscribed": {"type": "INT64", "index": 36, "name": "count_unsubscribed", "comment": null}, "unique_count_unsubscribed": {"type": "INT64", "index": 37, "name": "unique_count_unsubscribed", "comment": null}, "count_received_sms": {"type": "INT64", "index": 38, "name": "count_received_sms", "comment": null}, "unique_count_received_sms": {"type": "INT64", "index": 39, "name": "unique_count_received_sms", "comment": null}, "count_clicked_sms": {"type": "INT64", "index": 40, "name": "count_clicked_sms", "comment": null}, "unique_count_clicked_sms": {"type": "INT64", "index": 41, "name": "unique_count_clicked_sms", "comment": null}, "count_sent_sms": {"type": "INT64", "index": 42, "name": "count_sent_sms", "comment": null}, "unique_count_sent_sms": {"type": "INT64", "index": 43, "name": "unique_count_sent_sms", "comment": null}, "count_unsubscribed_from_sms": {"type": "INT64", "index": 44, "name": "count_unsubscribed_from_sms", "comment": null}, "unique_count_unsubscribed_from_sms": {"type": "INT64", "index": 45, "name": "unique_count_unsubscribed_from_sms", "comment": null}, "flow_variation_key": {"type": "STRING", "index": 46, "name": "flow_variation_key", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 9856.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 17.0, "include": true, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.klaviyo.klaviyo__flows"}, "model.klaviyo.klaviyo__persons": {"metadata": {"type": "table", "schema": "dbt_transformations", "name": "klaviyo__persons", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"person_id": {"type": "STRING", "index": 1, "name": "person_id", "comment": null}, "address_1": {"type": "STRING", "index": 2, "name": "address_1", "comment": null}, "address_2": {"type": "STRING", "index": 3, "name": "address_2", "comment": null}, "city": {"type": "STRING", "index": 4, "name": "city", "comment": null}, "country": {"type": "STRING", "index": 5, "name": "country", "comment": null}, "zip": {"type": "STRING", "index": 6, "name": "zip", "comment": null}, "created_at": {"type": "TIMESTAMP", "index": 7, "name": "created_at", "comment": null}, "email": {"type": "STRING", "index": 8, "name": "email", "comment": null}, "full_name": {"type": "STRING", "index": 9, "name": "full_name", "comment": null}, "latitude": {"type": "FLOAT64", "index": 10, "name": "latitude", "comment": null}, "longitude": {"type": "FLOAT64", "index": 11, "name": "longitude", "comment": null}, "organization": {"type": "STRING", "index": 12, "name": "organization", "comment": null}, "phone_number": {"type": "STRING", "index": 13, "name": "phone_number", "comment": null}, "region": {"type": "STRING", "index": 14, "name": "region", "comment": null}, "timezone": {"type": "STRING", "index": 15, "name": "timezone", "comment": null}, "title": {"type": "STRING", "index": 16, "name": "title", "comment": null}, "updated_at": {"type": "TIMESTAMP", "index": 17, "name": "updated_at", "comment": null}, "source_relation": {"type": "STRING", "index": 18, "name": "source_relation", "comment": null}, "count_total_campaigns": {"type": "INT64", "index": 19, "name": "count_total_campaigns", "comment": null}, "count_total_flows": {"type": "INT64", "index": 20, "name": "count_total_flows", "comment": null}, "first_event_at": {"type": "TIMESTAMP", "index": 21, "name": "first_event_at", "comment": null}, "last_event_at": {"type": "TIMESTAMP", "index": 22, "name": "last_event_at", "comment": null}, "first_campaign_touch_at": {"type": "TIMESTAMP", "index": 23, "name": "first_campaign_touch_at", "comment": null}, "last_campaign_touch_at": {"type": "TIMESTAMP", "index": 24, "name": "last_campaign_touch_at", "comment": null}, "first_flow_touch_at": {"type": "TIMESTAMP", "index": 25, "name": "first_flow_touch_at", "comment": null}, "last_flow_touch_at": {"type": "TIMESTAMP", "index": 26, "name": "last_flow_touch_at", "comment": null}, "total_sum_revenue_refunded_order": {"type": "FLOAT64", "index": 27, "name": "total_sum_revenue_refunded_order", "comment": null}, "organic_sum_revenue_refunded_order": {"type": "FLOAT64", "index": 28, "name": "organic_sum_revenue_refunded_order", "comment": null}, "total_sum_revenue_placed_order": {"type": "FLOAT64", "index": 29, "name": "total_sum_revenue_placed_order", "comment": null}, "organic_sum_revenue_placed_order": {"type": "FLOAT64", "index": 30, "name": "organic_sum_revenue_placed_order", "comment": null}, "total_sum_revenue_ordered_product": {"type": "FLOAT64", "index": 31, "name": "total_sum_revenue_ordered_product", "comment": null}, "organic_sum_revenue_ordered_product": {"type": "FLOAT64", "index": 32, "name": "organic_sum_revenue_ordered_product", "comment": null}, "total_sum_revenue_checkout_started": {"type": "FLOAT64", "index": 33, "name": "total_sum_revenue_checkout_started", "comment": null}, "organic_sum_revenue_checkout_started": {"type": "FLOAT64", "index": 34, "name": "organic_sum_revenue_checkout_started", "comment": null}, "total_sum_revenue_cancelled_order": {"type": "FLOAT64", "index": 35, "name": "total_sum_revenue_cancelled_order", "comment": null}, "organic_sum_revenue_cancelled_order": {"type": "FLOAT64", "index": 36, "name": "organic_sum_revenue_cancelled_order", "comment": null}, "total_count_active_on_site": {"type": "INT64", "index": 37, "name": "total_count_active_on_site", "comment": null}, "total_count_viewed_product": {"type": "INT64", "index": 38, "name": "total_count_viewed_product", "comment": null}, "total_count_ordered_product": {"type": "INT64", "index": 39, "name": "total_count_ordered_product", "comment": null}, "total_count_placed_order": {"type": "INT64", "index": 40, "name": "total_count_placed_order", "comment": null}, "total_count_refunded_order": {"type": "INT64", "index": 41, "name": "total_count_refunded_order", "comment": null}, "total_count_received_email": {"type": "INT64", "index": 42, "name": "total_count_received_email", "comment": null}, "total_count_clicked_email": {"type": "INT64", "index": 43, "name": "total_count_clicked_email", "comment": null}, "total_count_opened_email": {"type": "INT64", "index": 44, "name": "total_count_opened_email", "comment": null}, "total_count_marked_email_as_spam": {"type": "INT64", "index": 45, "name": "total_count_marked_email_as_spam", "comment": null}, "total_count_unsubscribed": {"type": "INT64", "index": 46, "name": "total_count_unsubscribed", "comment": null}, "total_count_received_sms": {"type": "INT64", "index": 47, "name": "total_count_received_sms", "comment": null}, "total_count_clicked_sms": {"type": "INT64", "index": 48, "name": "total_count_clicked_sms", "comment": null}, "total_count_sent_sms": {"type": "INT64", "index": 49, "name": "total_count_sent_sms", "comment": null}, "total_count_unsubscribed_from_sms": {"type": "INT64", "index": 50, "name": "total_count_unsubscribed_from_sms", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 156636117.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 389584.0, "include": true, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.klaviyo.klaviyo__persons"}, "model.klaviyo.klaviyo__person_campaign_flow": {"metadata": {"type": "table", "schema": "dbt_transformations", "name": "klaviyo__person_campaign_flow", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"person_id": {"type": "STRING", "index": 1, "name": "person_id", "comment": null}, "last_touch_campaign_id": {"type": "STRING", "index": 2, "name": "last_touch_campaign_id", "comment": null}, "last_touch_flow_id": {"type": "STRING", "index": 3, "name": "last_touch_flow_id", "comment": null}, "campaign_name": {"type": "STRING", "index": 4, "name": "campaign_name", "comment": null}, "flow_name": {"type": "STRING", "index": 5, "name": "flow_name", "comment": null}, "variation_id": {"type": "STRING", "index": 6, "name": "variation_id", "comment": null}, "source_relation": {"type": "STRING", "index": 7, "name": "source_relation", "comment": null}, "first_event_at": {"type": "TIMESTAMP", "index": 8, "name": "first_event_at", "comment": null}, "last_event_at": {"type": "TIMESTAMP", "index": 9, "name": "last_event_at", "comment": null}, "sum_revenue_refunded_order": {"type": "FLOAT64", "index": 10, "name": "sum_revenue_refunded_order", "comment": null}, "sum_revenue_placed_order": {"type": "FLOAT64", "index": 11, "name": "sum_revenue_placed_order", "comment": null}, "sum_revenue_ordered_product": {"type": "FLOAT64", "index": 12, "name": "sum_revenue_ordered_product", "comment": null}, "sum_revenue_checkout_started": {"type": "FLOAT64", "index": 13, "name": "sum_revenue_checkout_started", "comment": null}, "sum_revenue_cancelled_order": {"type": "FLOAT64", "index": 14, "name": "sum_revenue_cancelled_order", "comment": null}, "count_active_on_site": {"type": "INT64", "index": 15, "name": "count_active_on_site", "comment": null}, "count_viewed_product": {"type": "INT64", "index": 16, "name": "count_viewed_product", "comment": null}, "count_ordered_product": {"type": "INT64", "index": 17, "name": "count_ordered_product", "comment": null}, "count_placed_order": {"type": "INT64", "index": 18, "name": "count_placed_order", "comment": null}, "count_refunded_order": {"type": "INT64", "index": 19, "name": "count_refunded_order", "comment": null}, "count_received_email": {"type": "INT64", "index": 20, "name": "count_received_email", "comment": null}, "count_clicked_email": {"type": "INT64", "index": 21, "name": "count_clicked_email", "comment": null}, "count_opened_email": {"type": "INT64", "index": 22, "name": "count_opened_email", "comment": null}, "count_marked_email_as_spam": {"type": "INT64", "index": 23, "name": "count_marked_email_as_spam", "comment": null}, "count_unsubscribed": {"type": "INT64", "index": 24, "name": "count_unsubscribed", "comment": null}, "count_received_sms": {"type": "INT64", "index": 25, "name": "count_received_sms", "comment": null}, "count_clicked_sms": {"type": "INT64", "index": 26, "name": "count_clicked_sms", "comment": null}, "count_sent_sms": {"type": "INT64", "index": 27, "name": "count_sent_sms", "comment": null}, "count_unsubscribed_from_sms": {"type": "INT64", "index": 28, "name": "count_unsubscribed_from_sms", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 15557655279.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 71930153.0, "include": true, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.klaviyo.klaviyo__person_campaign_flow"}, "model.klaviyo.int_klaviyo__person_metrics": {"metadata": {"type": "view", "schema": "dbt_transformations", "name": "int_klaviyo__person_metrics", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"person_id": {"type": "STRING", "index": 1, "name": "person_id", "comment": null}, "source_relation": {"type": "STRING", "index": 2, "name": "source_relation", "comment": null}, "count_total_campaigns": {"type": "INT64", "index": 3, "name": "count_total_campaigns", "comment": null}, "count_total_flows": {"type": "INT64", "index": 4, "name": "count_total_flows", "comment": null}, "first_event_at": {"type": "TIMESTAMP", "index": 5, "name": "first_event_at", "comment": null}, "last_event_at": {"type": "TIMESTAMP", "index": 6, "name": "last_event_at", "comment": null}, "first_campaign_touch_at": {"type": "TIMESTAMP", "index": 7, "name": "first_campaign_touch_at", "comment": null}, "last_campaign_touch_at": {"type": "TIMESTAMP", "index": 8, "name": "last_campaign_touch_at", "comment": null}, "first_flow_touch_at": {"type": "TIMESTAMP", "index": 9, "name": "first_flow_touch_at", "comment": null}, "last_flow_touch_at": {"type": "TIMESTAMP", "index": 10, "name": "last_flow_touch_at", "comment": null}, "total_sum_revenue_refunded_order": {"type": "FLOAT64", "index": 11, "name": "total_sum_revenue_refunded_order", "comment": null}, "organic_sum_revenue_refunded_order": {"type": "FLOAT64", "index": 12, "name": "organic_sum_revenue_refunded_order", "comment": null}, "total_sum_revenue_placed_order": {"type": "FLOAT64", "index": 13, "name": "total_sum_revenue_placed_order", "comment": null}, "organic_sum_revenue_placed_order": {"type": "FLOAT64", "index": 14, "name": "organic_sum_revenue_placed_order", "comment": null}, "total_sum_revenue_ordered_product": {"type": "FLOAT64", "index": 15, "name": "total_sum_revenue_ordered_product", "comment": null}, "organic_sum_revenue_ordered_product": {"type": "FLOAT64", "index": 16, "name": "organic_sum_revenue_ordered_product", "comment": null}, "total_sum_revenue_checkout_started": {"type": "FLOAT64", "index": 17, "name": "total_sum_revenue_checkout_started", "comment": null}, "organic_sum_revenue_checkout_started": {"type": "FLOAT64", "index": 18, "name": "organic_sum_revenue_checkout_started", "comment": null}, "total_sum_revenue_cancelled_order": {"type": "FLOAT64", "index": 19, "name": "total_sum_revenue_cancelled_order", "comment": null}, "organic_sum_revenue_cancelled_order": {"type": "FLOAT64", "index": 20, "name": "organic_sum_revenue_cancelled_order", "comment": null}, "total_count_active_on_site": {"type": "INT64", "index": 21, "name": "total_count_active_on_site", "comment": null}, "total_count_viewed_product": {"type": "INT64", "index": 22, "name": "total_count_viewed_product", "comment": null}, "total_count_ordered_product": {"type": "INT64", "index": 23, "name": "total_count_ordered_product", "comment": null}, "total_count_placed_order": {"type": "INT64", "index": 24, "name": "total_count_placed_order", "comment": null}, "total_count_refunded_order": {"type": "INT64", "index": 25, "name": "total_count_refunded_order", "comment": null}, "total_count_received_email": {"type": "INT64", "index": 26, "name": "total_count_received_email", "comment": null}, "total_count_clicked_email": {"type": "INT64", "index": 27, "name": "total_count_clicked_email", "comment": null}, "total_count_opened_email": {"type": "INT64", "index": 28, "name": "total_count_opened_email", "comment": null}, "total_count_marked_email_as_spam": {"type": "INT64", "index": 29, "name": "total_count_marked_email_as_spam", "comment": null}, "total_count_unsubscribed": {"type": "INT64", "index": 30, "name": "total_count_unsubscribed", "comment": null}, "total_count_received_sms": {"type": "INT64", "index": 31, "name": "total_count_received_sms", "comment": null}, "total_count_clicked_sms": {"type": "INT64", "index": 32, "name": "total_count_clicked_sms", "comment": null}, "total_count_sent_sms": {"type": "INT64", "index": 33, "name": "total_count_sent_sms", "comment": null}, "total_count_unsubscribed_from_sms": {"type": "INT64", "index": 34, "name": "total_count_unsubscribed_from_sms", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.klaviyo.int_klaviyo__person_metrics"}, "model.klaviyo.klaviyo__events": {"metadata": {"type": "table", "schema": "dbt_transformations", "name": "klaviyo__events", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"variation_id": {"type": "STRING", "index": 1, "name": "variation_id", "comment": null}, "campaign_id": {"type": "STRING", "index": 2, "name": "campaign_id", "comment": null}, "occurred_at": {"type": "TIMESTAMP", "index": 3, "name": "occurred_at", "comment": null}, "flow_id": {"type": "STRING", "index": 4, "name": "flow_id", "comment": null}, "flow_message_id": {"type": "STRING", "index": 5, "name": "flow_message_id", "comment": null}, "event_id": {"type": "STRING", "index": 6, "name": "event_id", "comment": null}, "metric_id": {"type": "STRING", "index": 7, "name": "metric_id", "comment": null}, "person_id": {"type": "STRING", "index": 8, "name": "person_id", "comment": null}, "uuid": {"type": "STRING", "index": 9, "name": "uuid", "comment": null}, "numeric_value": {"type": "FLOAT64", "index": 10, "name": "numeric_value", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 11, "name": "_fivetran_synced", "comment": null}, "source_relation": {"type": "STRING", "index": 12, "name": "source_relation", "comment": null}, "occurred_on": {"type": "DATE", "index": 13, "name": "occurred_on", "comment": null}, "touch_id": {"type": "STRING", "index": 14, "name": "touch_id", "comment": null}, "touch_type": {"type": "STRING", "index": 15, "name": "touch_type", "comment": null}, "type": {"type": "STRING", "index": 16, "name": "type", "comment": null}, "last_touch_campaign_id": {"type": "STRING", "index": 17, "name": "last_touch_campaign_id", "comment": null}, "last_touch_flow_id": {"type": "STRING", "index": 18, "name": "last_touch_flow_id", "comment": null}, "last_touch_at": {"type": "TIMESTAMP", "index": 19, "name": "last_touch_at", "comment": null}, "last_touch_event_type": {"type": "STRING", "index": 20, "name": "last_touch_event_type", "comment": null}, "last_touch_type": {"type": "STRING", "index": 21, "name": "last_touch_type", "comment": null}, "campaign_name": {"type": "STRING", "index": 22, "name": "campaign_name", "comment": null}, "campaign_type": {"type": "STRING", "index": 23, "name": "campaign_type", "comment": null}, "campaign_subject_line": {"type": "STRING", "index": 24, "name": "campaign_subject_line", "comment": null}, "flow_name": {"type": "STRING", "index": 25, "name": "flow_name", "comment": null}, "person_city": {"type": "STRING", "index": 26, "name": "person_city", "comment": null}, "person_country": {"type": "STRING", "index": 27, "name": "person_country", "comment": null}, "person_region": {"type": "STRING", "index": 28, "name": "person_region", "comment": null}, "person_email": {"type": "STRING", "index": 29, "name": "person_email", "comment": null}, "person_timezone": {"type": "STRING", "index": 30, "name": "person_timezone", "comment": null}, "integration_name": {"type": "STRING", "index": 31, "name": "integration_name", "comment": null}, "integration_category": {"type": "STRING", "index": 32, "name": "integration_category", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 41807381247.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 125792204.0, "include": true, "description": "Approximate count of rows in this table"}, "partitioning_type": {"id": "partitioning_type", "label": "Partitioned By", "value": "occurred_on", "include": true, "description": "The partitioning column for this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.klaviyo.klaviyo__events"}, "model.klaviyo_source.stg_klaviyo__person_tmp": {"metadata": {"type": "view", "schema": "dbt_transformations", "name": "stg_klaviyo__person_tmp", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "STRING", "index": 1, "name": "id", "comment": null}, "_fivetran_deleted": {"type": "BOOL", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 3, "name": "_fivetran_synced", "comment": null}, "address_1": {"type": "STRING", "index": 4, "name": "address_1", "comment": null}, "address_2": {"type": "STRING", "index": 5, "name": "address_2", "comment": null}, "city": {"type": "STRING", "index": 6, "name": "city", "comment": null}, "country": {"type": "STRING", "index": 7, "name": "country", "comment": null}, "created": {"type": "TIMESTAMP", "index": 8, "name": "created", "comment": null}, "custom_accepts_marketing": {"type": "BOOL", "index": 9, "name": "custom_accepts_marketing", "comment": null}, "custom_adset_name": {"type": "STRING", "index": 10, "name": "custom_adset_name", "comment": null}, "custom_birthday": {"type": "STRING", "index": 11, "name": "custom_birthday", "comment": null}, "custom_consent": {"type": "STRING", "index": 12, "name": "custom_consent", "comment": null}, "custom_consent_form_id": {"type": "STRING", "index": 13, "name": "custom_consent_form_id", "comment": null}, "custom_consent_form_version": {"type": "INT64", "index": 14, "name": "custom_consent_form_version", "comment": null}, "custom_consent_method": {"type": "STRING", "index": 15, "name": "custom_consent_method", "comment": null}, "custom_consent_timestamp": {"type": "STRING", "index": 16, "name": "custom_consent_timestamp", "comment": null}, "custom_email": {"type": "STRING", "index": 17, "name": "custom_email", "comment": null}, "custom_expected_date_of_next_order": {"type": "STRING", "index": 18, "name": "custom_expected_date_of_next_order", "comment": null}, "custom_facebook": {"type": "BOOL", "index": 19, "name": "custom_facebook", "comment": null}, "custom_first_purchase_date": {"type": "DATE", "index": 20, "name": "custom_first_purchase_date", "comment": null}, "custom_object": {"type": "STRING", "index": 21, "name": "custom_object", "comment": null}, "custom_shopify_tags": {"type": "STRING", "index": 22, "name": "custom_shopify_tags", "comment": null}, "custom_source": {"type": "STRING", "index": 23, "name": "custom_source", "comment": null}, "custom_welcome_series": {"type": "BOOL", "index": 24, "name": "custom_welcome_series", "comment": null}, "email": {"type": "STRING", "index": 25, "name": "email", "comment": null}, "first_name": {"type": "STRING", "index": 26, "name": "first_name", "comment": null}, "last_name": {"type": "STRING", "index": 27, "name": "last_name", "comment": null}, "latitude": {"type": "FLOAT64", "index": 28, "name": "latitude", "comment": null}, "longitude": {"type": "FLOAT64", "index": 29, "name": "longitude", "comment": null}, "organization": {"type": "STRING", "index": 30, "name": "organization", "comment": null}, "phone_number": {"type": "STRING", "index": 31, "name": "phone_number", "comment": null}, "region": {"type": "STRING", "index": 32, "name": "region", "comment": null}, "timezone": {"type": "STRING", "index": 33, "name": "timezone", "comment": null}, "title": {"type": "STRING", "index": 34, "name": "title", "comment": null}, "updated": {"type": "TIMESTAMP", "index": 35, "name": "updated", "comment": null}, "zip": {"type": "STRING", "index": 36, "name": "zip", "comment": null}, "custom_children_birthday": {"type": "STRING", "index": 37, "name": "custom_children_birthday", "comment": null}, "custom_children_gender": {"type": "STRING", "index": 38, "name": "custom_children_gender", "comment": null}, "custom_due_date": {"type": "STRING", "index": 39, "name": "custom_due_date", "comment": null}, "custom_first_purchase_type": {"type": "STRING", "index": 40, "name": "custom_first_purchase_type", "comment": null}, "custom_number_of_children": {"type": "INT64", "index": 41, "name": "custom_number_of_children", "comment": null}, "custom_oldest_child_dow": {"type": "STRING", "index": 42, "name": "custom_oldest_child_dow", "comment": null}, "custom_status": {"type": "STRING", "index": 43, "name": "custom_status", "comment": null}, "custom_work": {"type": "STRING", "index": 44, "name": "custom_work", "comment": null}, "custom_zip": {"type": "STRING", "index": 45, "name": "custom_zip", "comment": null}, "custom_unengaged": {"type": "BOOL", "index": 46, "name": "custom_unengaged", "comment": null}, "custom_coupon": {"type": "STRING", "index": 47, "name": "custom_coupon", "comment": null}, "custom_sms_attentive_signup": {"type": "BOOL", "index": 48, "name": "custom_sms_attentive_signup", "comment": null}, "custom_time_stamp": {"type": "STRING", "index": 49, "name": "custom_time_stamp", "comment": null}, "custom_url": {"type": "STRING", "index": 50, "name": "custom_url", "comment": null}, "custom_id": {"type": "STRING", "index": 51, "name": "custom_id", "comment": null}, "custom_total_emails_opened": {"type": "INT64", "index": 52, "name": "custom_total_emails_opened", "comment": null}, "custom_total_emails_opened_ever": {"type": "INT64", "index": 53, "name": "custom_total_emails_opened_ever", "comment": null}, "custom_last_1_day_in_store_purchasers": {"type": "BOOL", "index": 54, "name": "custom_last_1_day_in_store_purchasers", "comment": null}, "custom_store_purchasers_test": {"type": "BOOL", "index": 55, "name": "custom_store_purchasers_test", "comment": null}, "custom_test_audience_klaviyo": {"type": "BOOL", "index": 56, "name": "custom_test_audience_klaviyo", "comment": null}, "custom_in_store_purchasers_from_2021_02_09": {"type": "BOOL", "index": 57, "name": "custom_in_store_purchasers_from_2021_02_09", "comment": null}, "custom_melrose_store_customers": {"type": "BOOL", "index": 58, "name": "custom_melrose_store_customers", "comment": null}, "custom_manhasset_store_customers": {"type": "BOOL", "index": 59, "name": "custom_manhasset_store_customers", "comment": null}, "custom_madison_ave_store_customers": {"type": "BOOL", "index": 60, "name": "custom_madison_ave_store_customers", "comment": null}, "custom_dallas_store_customers": {"type": "BOOL", "index": 61, "name": "custom_dallas_store_customers", "comment": null}, "custom_georgetown_store_customers": {"type": "BOOL", "index": 62, "name": "custom_georgetown_store_customers", "comment": null}, "custom_unique_list_product_category_purchased": {"type": "STRING", "index": 63, "name": "custom_unique_list_product_category_purchased", "comment": null}, "custom_most_frequent_product_category_purchased": {"type": "STRING", "index": 64, "name": "custom_most_frequent_product_category_purchased", "comment": null}, "custom_fillmore_store_customers": {"type": "BOOL", "index": 65, "name": "custom_fillmore_store_customers", "comment": null}, "custom_bal_harbour_store_customers": {"type": "BOOL", "index": 66, "name": "custom_bal_harbour_store_customers", "comment": null}, "custom_boston_store_customers": {"type": "BOOL", "index": 67, "name": "custom_boston_store_customers", "comment": null}, "custom_soho_store_customers": {"type": "BOOL", "index": 68, "name": "custom_soho_store_customers", "comment": null}, "custom_houston_store_customers": {"type": "BOOL", "index": 69, "name": "custom_houston_store_customers", "comment": null}, "custom_pacific_palisades_store_customers": {"type": "BOOL", "index": 70, "name": "custom_pacific_palisades_store_customers", "comment": null}, "custom_nantucket_store_customers": {"type": "BOOL", "index": 71, "name": "custom_nantucket_store_customers", "comment": null}, "custom_greenwich_store_customers": {"type": "BOOL", "index": 72, "name": "custom_greenwich_store_customers", "comment": null}, "custom_last_utm_medium": {"type": "STRING", "index": 73, "name": "custom_last_utm_medium", "comment": null}, "custom_last_order_timestamp": {"type": "TIMESTAMP", "index": 74, "name": "custom_last_order_timestamp", "comment": null}, "custom_first_utm_source": {"type": "STRING", "index": 75, "name": "custom_first_utm_source", "comment": null}, "custom_first_utm_medium": {"type": "STRING", "index": 76, "name": "custom_first_utm_medium", "comment": null}, "custom_first_order_timestamp": {"type": "TIMESTAMP", "index": 77, "name": "custom_first_order_timestamp", "comment": null}, "custom_last_website_page_viewed_timestamp": {"type": "TIMESTAMP", "index": 78, "name": "custom_last_website_page_viewed_timestamp", "comment": null}, "custom_top_20_k_spenders_all_time": {"type": "BOOL", "index": 79, "name": "custom_top_20_k_spenders_all_time", "comment": null}, "custom_net_sales": {"type": "INT64", "index": 80, "name": "custom_net_sales", "comment": null}, "custom_last_ecom_order_timestamp": {"type": "TIMESTAMP", "index": 81, "name": "custom_last_ecom_order_timestamp", "comment": null}, "custom_top_10_k_spenders_all_time": {"type": "BOOL", "index": 82, "name": "custom_top_10_k_spenders_all_time", "comment": null}, "custom_unique_list_store_s_purchased": {"type": "STRING", "index": 83, "name": "custom_unique_list_store_s_purchased", "comment": null}, "custom_last_in_store_order_timestamp": {"type": "TIMESTAMP", "index": 84, "name": "custom_last_in_store_order_timestamp", "comment": null}, "custom_lapsed_in_store_customers": {"type": "BOOL", "index": 85, "name": "custom_lapsed_in_store_customers", "comment": null}, "custom_segment_database_of_emails": {"type": "BOOL", "index": 86, "name": "custom_segment_database_of_emails", "comment": null}, "custom_in_store_purchasers": {"type": "BOOL", "index": 87, "name": "custom_in_store_purchasers", "comment": null}, "custom_top_10_k_ecom_only_spenders_all_time": {"type": "BOOL", "index": 88, "name": "custom_top_10_k_ecom_only_spenders_all_time", "comment": null}, "custom_lifetime_net_revenue": {"type": "INT64", "index": 89, "name": "custom_lifetime_net_revenue", "comment": null}, "custom_dw_ecom_recency_decile": {"type": "INT64", "index": 90, "name": "custom_dw_ecom_recency_decile", "comment": null}, "custom_dw_first_acquisition_type": {"type": "STRING", "index": 91, "name": "custom_dw_first_acquisition_type", "comment": null}, "custom_dw_last_purchase": {"type": "TIMESTAMP", "index": 92, "name": "custom_dw_last_purchase", "comment": null}, "custom_dw_total_transactions": {"type": "INT64", "index": 93, "name": "custom_dw_total_transactions", "comment": null}, "custom_dw_retail_recency_decile": {"type": "INT64", "index": 94, "name": "custom_dw_retail_recency_decile", "comment": null}, "custom_dw_net_quantity": {"type": "INT64", "index": 95, "name": "custom_dw_net_quantity", "comment": null}, "custom_dw_ecom_net_quantity": {"type": "INT64", "index": 96, "name": "custom_dw_ecom_net_quantity", "comment": null}, "custom_dw_last_ecom_purchase": {"type": "TIMESTAMP", "index": 97, "name": "custom_dw_last_ecom_purchase", "comment": null}, "custom_dw_retail_orders": {"type": "INT64", "index": 98, "name": "custom_dw_retail_orders", "comment": null}, "custom_dw_shopper_type": {"type": "STRING", "index": 99, "name": "custom_dw_shopper_type", "comment": null}, "custom_dw_retail_net_rev_decile": {"type": "INT64", "index": 100, "name": "custom_dw_retail_net_rev_decile", "comment": null}, "custom_dw_recency_decile": {"type": "INT64", "index": 101, "name": "custom_dw_recency_decile", "comment": null}, "custom_dw_first_purchase": {"type": "TIMESTAMP", "index": 102, "name": "custom_dw_first_purchase", "comment": null}, "custom_dw_ecom_orders": {"type": "INT64", "index": 103, "name": "custom_dw_ecom_orders", "comment": null}, "custom_dw_discount_pct": {"type": "FLOAT64", "index": 104, "name": "custom_dw_discount_pct", "comment": null}, "custom_dw_retail_net_quantity": {"type": "INT64", "index": 105, "name": "custom_dw_retail_net_quantity", "comment": null}, "custom_dw_previous_purchase": {"type": "TIMESTAMP", "index": 106, "name": "custom_dw_previous_purchase", "comment": null}, "custom_dw_lifetime_net_ordered": {"type": "FLOAT64", "index": 107, "name": "custom_dw_lifetime_net_ordered", "comment": null}, "custom_dw_lifetime_gross_ordered": {"type": "FLOAT64", "index": 108, "name": "custom_dw_lifetime_gross_ordered", "comment": null}, "custom_dw_last_retail_purchase": {"type": "TIMESTAMP", "index": 109, "name": "custom_dw_last_retail_purchase", "comment": null}, "custom_dw_ecom_net_rev_decile": {"type": "INT64", "index": 110, "name": "custom_dw_ecom_net_rev_decile", "comment": null}, "custom_dw_discount_shopper_type": {"type": "STRING", "index": 111, "name": "custom_dw_discount_shopper_type", "comment": null}, "custom_dw_net_rev_decile": {"type": "INT64", "index": 112, "name": "custom_dw_net_rev_decile", "comment": null}, "custom_dw_home_store": {"type": "INT64", "index": 113, "name": "custom_dw_home_store", "comment": null}, "custom_low_value_customers": {"type": "BOOL", "index": 114, "name": "custom_low_value_customers", "comment": null}, "custom_high_value_omni_customers": {"type": "BOOL", "index": 115, "name": "custom_high_value_omni_customers", "comment": null}, "custom_has_purchased_2021_spring_collection": {"type": "BOOL", "index": 116, "name": "custom_has_purchased_2021_spring_collection", "comment": null}, "custom_2_do_you_follow_current_fashion_trends_": {"type": "STRING", "index": 117, "name": "custom_2_do_you_follow_current_fashion_trends_", "comment": null}, "custom_what_month_do_you_start_shopping_for_your_fall_wardrobe_": {"type": "STRING", "index": 118, "name": "custom_what_month_do_you_start_shopping_for_your_fall_wardrobe_", "comment": null}, "custom_score": {"type": "INT64", "index": 119, "name": "custom_score", "comment": null}, "custom_which_city_is_closest_to_you_": {"type": "STRING", "index": 120, "name": "custom_which_city_is_closest_to_you_", "comment": null}, "custom_now_that_we_seem_to_be_inching_closer_to_pre_pandemic_life_are_you_going_to_be_traveling_again_": {"type": "BOOL", "index": 121, "name": "custom_now_that_we_seem_to_be_inching_closer_to_pre_pandemic_life_are_you_going_to_be_traveling_again_", "comment": null}, "custom_do_you_typically_have_your_own_go_to_store_associate_": {"type": "STRING", "index": 122, "name": "custom_do_you_typically_have_your_own_go_to_store_associate_", "comment": null}, "custom_subscribed_to_list": {"type": "STRING", "index": 123, "name": "custom_subscribed_to_list", "comment": null}, "custom_are_you_going_back_to_an_office_": {"type": "STRING", "index": 124, "name": "custom_are_you_going_back_to_an_office_", "comment": null}, "custom_what_do_you_buy_most_often_from_veronica_beard_": {"type": "STRING", "index": 125, "name": "custom_what_do_you_buy_most_often_from_veronica_beard_", "comment": null}, "custom_what_other_brands_do_you_like_to_shop_": {"type": "STRING", "index": 126, "name": "custom_what_other_brands_do_you_like_to_shop_", "comment": null}, "custom_how_do_you_shop_": {"type": "STRING", "index": 127, "name": "custom_how_do_you_shop_", "comment": null}, "custom_what_is_the_one_piece_in_your_closet_that_you_can_t_live_without_": {"type": "STRING", "index": 128, "name": "custom_what_is_the_one_piece_in_your_closet_that_you_can_t_live_without_", "comment": null}, "custom_what_month_do_you_start_shopping_for_holiday_": {"type": "STRING", "index": 129, "name": "custom_what_month_do_you_start_shopping_for_holiday_", "comment": null}, "custom_what_month_do_you_start_shopping_for_your_spring_wardrobe_": {"type": "STRING", "index": 130, "name": "custom_what_month_do_you_start_shopping_for_your_spring_wardrobe_", "comment": null}, "custom_do_you_ever_buy_veronica_beard_as_a_gift_for_someone_": {"type": "STRING", "index": 131, "name": "custom_do_you_ever_buy_veronica_beard_as_a_gift_for_someone_", "comment": null}, "custom_1_which_of_the_following_influences_your_decision_to_purchase_the_most_rank_in_order_of_importance_": {"type": "STRING", "index": 132, "name": "custom_1_which_of_the_following_influences_your_decision_to_purchase_the_most_rank_in_order_of_importance_", "comment": null}, "custom_what_do_you_spend_on_the_most_": {"type": "STRING", "index": 133, "name": "custom_what_do_you_spend_on_the_most_", "comment": null}, "custom_quickwhat_comes_to_mind_when_you_think_of_veronica_beard_select_up_to_5_that_apply_": {"type": "STRING", "index": 134, "name": "custom_quickwhat_comes_to_mind_when_you_think_of_veronica_beard_select_up_to_5_that_apply_", "comment": null}, "custom_when_": {"type": "STRING", "index": 135, "name": "custom_when_", "comment": null}, "custom_are_you_excited_to_get_dressed_up_again_": {"type": "STRING", "index": 136, "name": "custom_are_you_excited_to_get_dressed_up_again_", "comment": null}, "custom_1_what_is_inspiring_you_to_shop_now_": {"type": "STRING", "index": 137, "name": "custom_1_what_is_inspiring_you_to_shop_now_", "comment": null}, "custom_what_percent_of_your_closet_is_veronica_beard_": {"type": "STRING", "index": 138, "name": "custom_what_percent_of_your_closet_is_veronica_beard_", "comment": null}, "custom_do_you_come_to_veronica_beard_to_buy_entire_outfits_or_key_items_": {"type": "STRING", "index": 139, "name": "custom_do_you_come_to_veronica_beard_to_buy_entire_outfits_or_key_items_", "comment": null}, "custom_how_likely_are_you_to_recommend_veronica_beard_to_your_friends_": {"type": "STRING", "index": 140, "name": "custom_how_likely_are_you_to_recommend_veronica_beard_to_your_friends_", "comment": null}, "custom_what_inspires_you_to_shop_in_a_store_": {"type": "STRING", "index": 141, "name": "custom_what_inspires_you_to_shop_in_a_store_", "comment": null}, "custom_are_you_an_online_shopper_or_store_shopper_": {"type": "STRING", "index": 142, "name": "custom_are_you_an_online_shopper_or_store_shopper_", "comment": null}, "custom_what_do_you_like_about_the_in_store_experience_": {"type": "STRING", "index": 143, "name": "custom_what_do_you_like_about_the_in_store_experience_", "comment": null}, "custom_what_are_you_most_excited_to_buy_for_fall_": {"type": "STRING", "index": 144, "name": "custom_what_are_you_most_excited_to_buy_for_fall_", "comment": null}, "custom_what_s_your_next_trip_": {"type": "STRING", "index": 145, "name": "custom_what_s_your_next_trip_", "comment": null}, "custom_how_did_you_first_find_out_about_veronica_beard_": {"type": "STRING", "index": 146, "name": "custom_how_did_you_first_find_out_about_veronica_beard_", "comment": null}, "custom_for_whom_and_why_": {"type": "STRING", "index": 147, "name": "custom_for_whom_and_why_", "comment": null}, "custom_please_confirm_your_email_address_to_enter_to_win_one_of_three_750_gift_cards_": {"type": "STRING", "index": 148, "name": "custom_please_confirm_your_email_address_to_enter_to_win_one_of_three_750_gift_cards_", "comment": null}, "custom_just_between_us_whats_your_age_": {"type": "STRING", "index": 149, "name": "custom_just_between_us_whats_your_age_", "comment": null}, "custom_has_purchased_2020_spring_collection": {"type": "BOOL", "index": 150, "name": "custom_has_purchased_2020_spring_collection", "comment": null}, "custom_what_inspires_you_to_shop_online_": {"type": "STRING", "index": 151, "name": "custom_what_inspires_you_to_shop_online_", "comment": null}, "custom_where_do_you_see_yourself_shopping_this_fall_": {"type": "STRING", "index": 152, "name": "custom_where_do_you_see_yourself_shopping_this_fall_", "comment": null}, "custom_what_is_your_source_of_inspiration_": {"type": "STRING", "index": 153, "name": "custom_what_is_your_source_of_inspiration_", "comment": null}, "custom_please_specify": {"type": "STRING", "index": 154, "name": "custom_please_specify", "comment": null}, "custom_latest_shipping_delivered_date": {"type": "TIMESTAMP", "index": 155, "name": "custom_latest_shipping_delivered_date", "comment": null}, "custom_count_of_amex_coupon_code_used_in_2021_spring_campaign": {"type": "INT64", "index": 156, "name": "custom_count_of_amex_coupon_code_used_in_2021_spring_campaign", "comment": null}, "custom_latest_cancel_reason_type": {"type": "STRING", "index": 157, "name": "custom_latest_cancel_reason_type", "comment": null}, "custom_aov_year_2021_higher_than_800_dollars": {"type": "BOOL", "index": 158, "name": "custom_aov_year_2021_higher_than_800_dollars", "comment": null}, "custom_exchange_id": {"type": "STRING", "index": 159, "name": "custom_exchange_id", "comment": null}, "custom_spring_2021_amex_customers_with_unique_purchase": {"type": "BOOL", "index": 160, "name": "custom_spring_2021_amex_customers_with_unique_purchase", "comment": null}, "custom_southampton_store_customers": {"type": "BOOL", "index": 161, "name": "custom_southampton_store_customers", "comment": null}, "custom_chicago_store_customers": {"type": "BOOL", "index": 162, "name": "custom_chicago_store_customers", "comment": null}, "custom_j_o_amex_customers_spring_amex_2021_unique_purchasers_mc_8_wi": {"type": "BOOL", "index": 163, "name": "custom_j_o_amex_customers_spring_amex_2021_unique_purchasers_mc_8_wi", "comment": null}, "custom_address": {"type": "STRING", "index": 164, "name": "custom_address", "comment": null}, "custom_fall_3_ecomm_video_vs_ecomm_static_on_collection_pages": {"type": "STRING", "index": 165, "name": "custom_fall_3_ecomm_video_vs_ecomm_static_on_collection_pages", "comment": null}, "custom_homepage_product_recs": {"type": "STRING", "index": 166, "name": "custom_homepage_product_recs", "comment": null}, "custom_mobile_pdp_size_drawer_ux": {"type": "STRING", "index": 167, "name": "custom_mobile_pdp_size_drawer_ux", "comment": null}, "custom_name": {"type": "STRING", "index": 168, "name": "custom_name", "comment": null}, "custom_experiment_id": {"type": "STRING", "index": 169, "name": "custom_experiment_id", "comment": null}, "custom_scarcity_test_v_2": {"type": "STRING", "index": 170, "name": "custom_scarcity_test_v_2", "comment": null}, "custom_no_results_page_product_recs": {"type": "STRING", "index": 171, "name": "custom_no_results_page_product_recs", "comment": null}, "custom_video_on_collection_pages": {"type": "STRING", "index": 172, "name": "custom_video_on_collection_pages", "comment": null}, "custom_exenta_latest_cancel_reason": {"type": "STRING", "index": 173, "name": "custom_exenta_latest_cancel_reason", "comment": null}, "custom_back_to_work_email_campaign": {"type": "BOOL", "index": 174, "name": "custom_back_to_work_email_campaign", "comment": null}, "custom_exenta_latest_cancel_date": {"type": "TIMESTAMP", "index": 175, "name": "custom_exenta_latest_cancel_date", "comment": null}, "custom_exposing_filters_on_collection_pages": {"type": "STRING", "index": 176, "name": "custom_exposing_filters_on_collection_pages", "comment": null}, "custom_swim_vs_coverup_verbiage_in_nav": {"type": "STRING", "index": 177, "name": "custom_swim_vs_coverup_verbiage_in_nav", "comment": null}, "custom_desktop_pdp_favorite_icon": {"type": "STRING", "index": 178, "name": "custom_desktop_pdp_favorite_icon", "comment": null}, "custom_variation_name_handle": {"type": "STRING", "index": 179, "name": "custom_variation_name_handle", "comment": null}, "custom_pdp_favorite_icon": {"type": "STRING", "index": 180, "name": "custom_pdp_favorite_icon", "comment": null}, "custom_wip_pdp_recs_aug_2021_": {"type": "STRING", "index": 181, "name": "custom_wip_pdp_recs_aug_2021_", "comment": null}, "custom_intl_visitors_hidden_service_info": {"type": "STRING", "index": 182, "name": "custom_intl_visitors_hidden_service_info", "comment": null}, "custom_intl_hide_customer_service_info": {"type": "STRING", "index": 183, "name": "custom_intl_hide_customer_service_info", "comment": null}, "custom_added_md_product_to_cart_past_30_days_but_hasn_t_placed_an_order": {"type": "BOOL", "index": 184, "name": "custom_added_md_product_to_cart_past_30_days_but_hasn_t_placed_an_order", "comment": null}, "custom_pdp_recs_september_2021_": {"type": "STRING", "index": 185, "name": "custom_pdp_recs_september_2021_", "comment": null}, "custom_default_address": {"type": "STRING", "index": 186, "name": "custom_default_address", "comment": null}, "custom_dw_customer_type": {"type": "STRING", "index": 187, "name": "custom_dw_customer_type", "comment": null}, "custom_dw_is_md_customer": {"type": "BOOL", "index": 188, "name": "custom_dw_is_md_customer", "comment": null}, "custom_exenta_cancellation_customer_appeasement": {"type": "BOOL", "index": 189, "name": "custom_exenta_cancellation_customer_appeasement", "comment": null}, "custom_mini_cart_v_notification": {"type": "STRING", "index": 190, "name": "custom_mini_cart_v_notification", "comment": null}, "custom_desktop_mini_cart_slide_out": {"type": "STRING", "index": 191, "name": "custom_desktop_mini_cart_slide_out", "comment": null}, "custom_desktop_pdp_mini_cart_slide_out": {"type": "STRING", "index": 192, "name": "custom_desktop_pdp_mini_cart_slide_out", "comment": null}, "custom_v_2_pdp_recs_october_2021_": {"type": "STRING", "index": 193, "name": "custom_v_2_pdp_recs_october_2021_", "comment": null}, "custom_desktop_plp_mini_cart_slide_out": {"type": "STRING", "index": 194, "name": "custom_desktop_plp_mini_cart_slide_out", "comment": null}, "custom_creative_id": {"type": "INT64", "index": 195, "name": "custom_creative_id", "comment": null}, "custom_phone": {"type": "STRING", "index": 196, "name": "custom_phone", "comment": null}, "custom_google_lead_form_submitted": {"type": "BOOL", "index": 197, "name": "custom_google_lead_form_submitted", "comment": null}, "custom_international_hide_customer_service_info": {"type": "STRING", "index": 198, "name": "custom_international_hide_customer_service_info", "comment": null}, "custom_geo_target_store_location": {"type": "STRING", "index": 199, "name": "custom_geo_target_store_location", "comment": null}, "custom_10_29_new_nsr_date": {"type": "STRING", "index": 200, "name": "custom_10_29_new_nsr_date", "comment": null}, "custom_10_29_order_number": {"type": "INT64", "index": 201, "name": "custom_10_29_order_number", "comment": null}, "custom_10_29_style_name": {"type": "STRING", "index": 202, "name": "custom_10_29_style_name", "comment": null}, "custom_undefined": {"type": "STRING", "index": 203, "name": "custom_undefined", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.klaviyo_source.stg_klaviyo__person_tmp"}, "model.klaviyo_source.stg_klaviyo__integration": {"metadata": {"type": "table", "schema": "dbt_transformations", "name": "stg_klaviyo__integration", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"category": {"type": "STRING", "index": 1, "name": "category", "comment": null}, "integration_id": {"type": "STRING", "index": 2, "name": "integration_id", "comment": null}, "integration_name": {"type": "STRING", "index": 3, "name": "integration_name", "comment": null}, "source_relation": {"type": "STRING", "index": 4, "name": "source_relation", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 167.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 5.0, "include": true, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.klaviyo_source.stg_klaviyo__integration"}, "model.klaviyo_source.stg_klaviyo__event": {"metadata": {"type": "table", "schema": "dbt_transformations", "name": "stg_klaviyo__event", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"variation_id": {"type": "STRING", "index": 1, "name": "variation_id", "comment": null}, "campaign_id": {"type": "STRING", "index": 2, "name": "campaign_id", "comment": null}, "occurred_at": {"type": "TIMESTAMP", "index": 3, "name": "occurred_at", "comment": null}, "flow_id": {"type": "STRING", "index": 4, "name": "flow_id", "comment": null}, "flow_message_id": {"type": "STRING", "index": 5, "name": "flow_message_id", "comment": null}, "event_id": {"type": "STRING", "index": 6, "name": "event_id", "comment": null}, "metric_id": {"type": "STRING", "index": 7, "name": "metric_id", "comment": null}, "person_id": {"type": "STRING", "index": 8, "name": "person_id", "comment": null}, "type": {"type": "STRING", "index": 9, "name": "type", "comment": null}, "uuid": {"type": "STRING", "index": 10, "name": "uuid", "comment": null}, "numeric_value": {"type": "FLOAT64", "index": 11, "name": "numeric_value", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 12, "name": "_fivetran_synced", "comment": null}, "source_relation": {"type": "STRING", "index": 13, "name": "source_relation", "comment": null}, "occurred_on": {"type": "DATE", "index": 14, "name": "occurred_on", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 14999346149.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 125792204.0, "include": true, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.klaviyo_source.stg_klaviyo__event"}, "model.klaviyo_source.stg_klaviyo__event_tmp": {"metadata": {"type": "view", "schema": "dbt_transformations", "name": "stg_klaviyo__event_tmp", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "STRING", "index": 1, "name": "id", "comment": null}, "_fivetran_deleted": {"type": "BOOL", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 3, "name": "_fivetran_synced", "comment": null}, "_variation": {"type": "STRING", "index": 4, "name": "_variation", "comment": null}, "campaign_id": {"type": "STRING", "index": 5, "name": "campaign_id", "comment": null}, "datetime": {"type": "TIMESTAMP", "index": 6, "name": "datetime", "comment": null}, "flow_id": {"type": "STRING", "index": 7, "name": "flow_id", "comment": null}, "flow_message_id": {"type": "STRING", "index": 8, "name": "flow_message_id", "comment": null}, "metric_id": {"type": "STRING", "index": 9, "name": "metric_id", "comment": null}, "person_id": {"type": "STRING", "index": 10, "name": "person_id", "comment": null}, "property_attribute_acadaca_color": {"type": "STRING", "index": 11, "name": "property_attribute_acadaca_color", "comment": null}, "property_attribute_acadaca_size": {"type": "STRING", "index": 12, "name": "property_attribute_acadaca_size", "comment": null}, "property_attribute_acadaca_sku": {"type": "STRING", "index": 13, "name": "property_attribute_acadaca_sku", "comment": null}, "property_collections": {"type": "STRING", "index": 14, "name": "property_collections", "comment": null}, "property_discount_codes": {"type": "STRING", "index": 15, "name": "property_discount_codes", "comment": null}, "property_extra": {"type": "STRING", "index": 16, "name": "property_extra", "comment": null}, "property_item_count": {"type": "INT64", "index": 17, "name": "property_item_count", "comment": null}, "property_items": {"type": "STRING", "index": 18, "name": "property_items", "comment": null}, "property_name": {"type": "STRING", "index": 19, "name": "property_name", "comment": null}, "property_quantity": {"type": "INT64", "index": 20, "name": "property_quantity", "comment": null}, "property_shipping_rate": {"type": "STRING", "index": 21, "name": "property_shipping_rate", "comment": null}, "property_sku": {"type": "STRING", "index": 22, "name": "property_sku", "comment": null}, "property_source_name": {"type": "STRING", "index": 23, "name": "property_source_name", "comment": null}, "property_tags": {"type": "STRING", "index": 24, "name": "property_tags", "comment": null}, "property_total_discounts": {"type": "FLOAT64", "index": 25, "name": "property_total_discounts", "comment": null}, "property_value": {"type": "FLOAT64", "index": 26, "name": "property_value", "comment": null}, "timestamp": {"type": "TIMESTAMP", "index": 27, "name": "timestamp", "comment": null}, "type": {"type": "STRING", "index": 28, "name": "type", "comment": null}, "uuid": {"type": "STRING", "index": 29, "name": "uuid", "comment": null}, "property_ad_group_id": {"type": "INT64", "index": 30, "name": "property_ad_group_id", "comment": null}, "property_ad_id": {"type": "INT64", "index": 31, "name": "property_ad_id", "comment": null}, "property_ad_name": {"type": "STRING", "index": 32, "name": "property_ad_name", "comment": null}, "property_adset_name": {"type": "STRING", "index": 33, "name": "property_adset_name", "comment": null}, "property_amount": {"type": "STRING", "index": 34, "name": "property_amount", "comment": null}, "property_attribute_card_message": {"type": "STRING", "index": 35, "name": "property_attribute_card_message", "comment": null}, "property_attribute_recipient_email": {"type": "STRING", "index": 36, "name": "property_attribute_recipient_email", "comment": null}, "property_attribute_recipient_name": {"type": "STRING", "index": 37, "name": "property_attribute_recipient_name", "comment": null}, "property_attribute_send_date": {"type": "STRING", "index": 38, "name": "property_attribute_send_date", "comment": null}, "property_attribute_senders_name": {"type": "STRING", "index": 39, "name": "property_attribute_senders_name", "comment": null}, "property_available": {"type": "BOOL", "index": 40, "name": "property_available", "comment": null}, "property_billing_info": {"type": "STRING", "index": 41, "name": "property_billing_info", "comment": null}, "property_bounce_type": {"type": "STRING", "index": 42, "name": "property_bounce_type", "comment": null}, "property_brand": {"type": "STRING", "index": 43, "name": "property_brand", "comment": null}, "property_browser": {"type": "STRING", "index": 44, "name": "property_browser", "comment": null}, "property_campaign_name": {"type": "STRING", "index": 45, "name": "property_campaign_name", "comment": null}, "property_card_message": {"type": "STRING", "index": 46, "name": "property_card_message", "comment": null}, "property_categories": {"type": "STRING", "index": 47, "name": "property_categories", "comment": null}, "property_client_canonical": {"type": "STRING", "index": 48, "name": "property_client_canonical", "comment": null}, "property_client_name": {"type": "STRING", "index": 49, "name": "property_client_name", "comment": null}, "property_client_os": {"type": "STRING", "index": 50, "name": "property_client_os", "comment": null}, "property_client_os_family": {"type": "STRING", "index": 51, "name": "property_client_os_family", "comment": null}, "property_client_type": {"type": "STRING", "index": 52, "name": "property_client_type", "comment": null}, "property_cohort_message_send_cohort": {"type": "STRING", "index": 53, "name": "property_cohort_message_send_cohort", "comment": null}, "property_cohort_variation_send_cohort": {"type": "STRING", "index": 54, "name": "property_cohort_variation_send_cohort", "comment": null}, "property_compare_at_price": {"type": "STRING", "index": 55, "name": "property_compare_at_price", "comment": null}, "property_created_at": {"type": "TIMESTAMP", "index": 56, "name": "property_created_at", "comment": null}, "property_discount_total": {"type": "FLOAT64", "index": 57, "name": "property_discount_total", "comment": null}, "property_email": {"type": "STRING", "index": 58, "name": "property_email", "comment": null}, "property_email_domain": {"type": "STRING", "index": 59, "name": "property_email_domain", "comment": null}, "property_event_id": {"type": "STRING", "index": 60, "name": "property_event_id", "comment": null}, "property_featured_image": {"type": "STRING", "index": 61, "name": "property_featured_image", "comment": null}, "property_financial_status": {"type": "STRING", "index": 62, "name": "property_financial_status", "comment": null}, "property_form_name": {"type": "STRING", "index": 63, "name": "property_form_name", "comment": null}, "property_fulfillment_hours": {"type": "INT64", "index": 64, "name": "property_fulfillment_hours", "comment": null}, "property_fulfillment_status": {"type": "STRING", "index": 65, "name": "property_fulfillment_status", "comment": null}, "property_fulfillments": {"type": "STRING", "index": 66, "name": "property_fulfillments", "comment": null}, "property_gift_card_url": {"type": "STRING", "index": 67, "name": "property_gift_card_url", "comment": null}, "property_id": {"type": "INT64", "index": 68, "name": "property_id", "comment": null}, "property_image_url": {"type": "STRING", "index": 69, "name": "property_image_url", "comment": null}, "property_internal": {"type": "STRING", "index": 70, "name": "property_internal", "comment": null}, "property_inventory_management": {"type": "STRING", "index": 71, "name": "property_inventory_management", "comment": null}, "property_is_organic": {"type": "BOOL", "index": 72, "name": "property_is_organic", "comment": null}, "property_is_session_activity": {"type": "BOOL", "index": 73, "name": "property_is_session_activity", "comment": null}, "property_item_id": {"type": "INT64", "index": 74, "name": "property_item_id", "comment": null}, "property_item_name": {"type": "STRING", "index": 75, "name": "property_item_name", "comment": null}, "property_item_price": {"type": "STRING", "index": 76, "name": "property_item_price", "comment": null}, "property_item_sku": {"type": "INT64", "index": 77, "name": "property_item_sku", "comment": null}, "property_line_items": {"type": "STRING", "index": 78, "name": "property_line_items", "comment": null}, "property_list": {"type": "STRING", "index": 79, "name": "property_list", "comment": null}, "property_message_interaction": {"type": "STRING", "index": 80, "name": "property_message_interaction", "comment": null}, "property_metadata": {"type": "STRING", "index": 81, "name": "property_metadata", "comment": null}, "property_option_1": {"type": "STRING", "index": 82, "name": "property_option_1", "comment": null}, "property_option_2": {"type": "STRING", "index": 83, "name": "property_option_2", "comment": null}, "property_options": {"type": "STRING", "index": 84, "name": "property_options", "comment": null}, "property_order_name": {"type": "STRING", "index": 85, "name": "property_order_name", "comment": null}, "property_order_number": {"type": "INT64", "index": 86, "name": "property_order_number", "comment": null}, "property_order_status_url": {"type": "STRING", "index": 87, "name": "property_order_status_url", "comment": null}, "property_os": {"type": "STRING", "index": 88, "name": "property_os", "comment": null}, "property_page": {"type": "STRING", "index": 89, "name": "property_page", "comment": null}, "property_page_name": {"type": "STRING", "index": 90, "name": "property_page_name", "comment": null}, "property_payment_line": {"type": "STRING", "index": 91, "name": "property_payment_line", "comment": null}, "property_platform": {"type": "STRING", "index": 92, "name": "property_platform", "comment": null}, "property_price": {"type": "STRING", "index": 93, "name": "property_price", "comment": null}, "property_product_id": {"type": "INT64", "index": 94, "name": "property_product_id", "comment": null}, "property_product_name": {"type": "STRING", "index": 95, "name": "property_product_name", "comment": null}, "property_public_title": {"type": "STRING", "index": 96, "name": "property_public_title", "comment": null}, "property_recipient_name": {"type": "STRING", "index": 97, "name": "property_recipient_name", "comment": null}, "property_refunds": {"type": "STRING", "index": 98, "name": "property_refunds", "comment": null}, "property_requires_shipping": {"type": "BOOL", "index": 99, "name": "property_requires_shipping", "comment": null}, "property_restocking_total": {"type": "FLOAT64", "index": 100, "name": "property_restocking_total", "comment": null}, "property_return_authorizations": {"type": "STRING", "index": 101, "name": "property_return_authorizations", "comment": null}, "property_return_total": {"type": "FLOAT64", "index": 102, "name": "property_return_total", "comment": null}, "property_senders_name": {"type": "STRING", "index": 103, "name": "property_senders_name", "comment": null}, "property_session_end": {"type": "INT64", "index": 104, "name": "property_session_end", "comment": null}, "property_style_id": {"type": "STRING", "index": 105, "name": "property_style_id", "comment": null}, "property_sub_total": {"type": "FLOAT64", "index": 106, "name": "property_sub_total", "comment": null}, "property_subject": {"type": "STRING", "index": 107, "name": "property_subject", "comment": null}, "property_subtotal_price": {"type": "FLOAT64", "index": 108, "name": "property_subtotal_price", "comment": null}, "property_tax_total": {"type": "FLOAT64", "index": 109, "name": "property_tax_total", "comment": null}, "property_taxable": {"type": "BOOL", "index": 110, "name": "property_taxable", "comment": null}, "property_title": {"type": "STRING", "index": 111, "name": "property_title", "comment": null}, "property_total_price": {"type": "FLOAT64", "index": 112, "name": "property_total_price", "comment": null}, "property_total_tax": {"type": "FLOAT64", "index": 113, "name": "property_total_tax", "comment": null}, "property_tracker_id": {"type": "STRING", "index": 114, "name": "property_tracker_id", "comment": null}, "property_tracking_label": {"type": "STRING", "index": 115, "name": "property_tracking_label", "comment": null}, "property_url": {"type": "STRING", "index": 116, "name": "property_url", "comment": null}, "property_variant_id": {"type": "INT64", "index": 117, "name": "property_variant_id", "comment": null}, "property_variant_name": {"type": "STRING", "index": 118, "name": "property_variant_name", "comment": null}, "property_variant_option_color": {"type": "STRING", "index": 119, "name": "property_variant_option_color", "comment": null}, "property_variant_option_size": {"type": "STRING", "index": 120, "name": "property_variant_option_size", "comment": null}, "property_variant_option_title": {"type": "STRING", "index": 121, "name": "property_variant_option_title", "comment": null}, "property_variants": {"type": "STRING", "index": 122, "name": "property_variants", "comment": null}, "property_vendor": {"type": "STRING", "index": 123, "name": "property_vendor", "comment": null}, "property_weight": {"type": "INT64", "index": 124, "name": "property_weight", "comment": null}, "property_attribute_pre_order_date": {"type": "STRING", "index": 125, "name": "property_attribute_pre_order_date", "comment": null}, "property_attribute_mw_grouped_product_discounted_price": {"type": "FLOAT64", "index": 126, "name": "property_attribute_mw_grouped_product_discounted_price", "comment": null}, "property_attribute_mw_grouped_product_relation": {"type": "INT64", "index": 127, "name": "property_attribute_mw_grouped_product_relation", "comment": null}, "property_attribute_mw_grouped_product_relation_4321154793583": {"type": "INT64", "index": 128, "name": "property_attribute_mw_grouped_product_relation_4321154793583", "comment": null}, "property_attribute_mw_grouped_product_relation_3586136703076": {"type": "INT64", "index": 129, "name": "property_attribute_mw_grouped_product_relation_3586136703076", "comment": null}, "property_attribute_mw_grouped_product_relation_4321154859119": {"type": "INT64", "index": 130, "name": "property_attribute_mw_grouped_product_relation_4321154859119", "comment": null}, "property_attribute_mw_grouped_product_relation_4321154596975": {"type": "INT64", "index": 131, "name": "property_attribute_mw_grouped_product_relation_4321154596975", "comment": null}, "property_attribute_mw_grouped_product_relation_4321154891887": {"type": "INT64", "index": 132, "name": "property_attribute_mw_grouped_product_relation_4321154891887", "comment": null}, "property_attribute_mw_grouped_product_relation_4321154695279": {"type": "INT64", "index": 133, "name": "property_attribute_mw_grouped_product_relation_4321154695279", "comment": null}, "property_attribute_mw_grouped_product_relation_4170368909412": {"type": "INT64", "index": 134, "name": "property_attribute_mw_grouped_product_relation_4170368909412", "comment": null}, "property_attribute_mw_grouped_product_relation_4339644432495": {"type": "INT64", "index": 135, "name": "property_attribute_mw_grouped_product_relation_4339644432495", "comment": null}, "property_attribute_mw_grouped_product_relation_4321154498671": {"type": "INT64", "index": 136, "name": "property_attribute_mw_grouped_product_relation_4321154498671", "comment": null}, "property_total_emails_opened": {"type": "INT64", "index": 137, "name": "property_total_emails_opened", "comment": null}, "property_currency_code": {"type": "STRING", "index": 138, "name": "property_currency_code", "comment": null}, "property_store_purchasers_test": {"type": "BOOL", "index": 139, "name": "property_store_purchasers_test", "comment": null}, "property_test_audience_klaviyo": {"type": "BOOL", "index": 140, "name": "property_test_audience_klaviyo", "comment": null}, "property_audience_key": {"type": "STRING", "index": 141, "name": "property_audience_key", "comment": null}, "property_in_store_purchasers_from_2021_02_09": {"type": "BOOL", "index": 142, "name": "property_in_store_purchasers_from_2021_02_09", "comment": null}, "property_dallas_store_customers": {"type": "BOOL", "index": 143, "name": "property_dallas_store_customers", "comment": null}, "property_madison_ave_store_customers": {"type": "BOOL", "index": 144, "name": "property_madison_ave_store_customers", "comment": null}, "property_manhasset_store_customers": {"type": "BOOL", "index": 145, "name": "property_manhasset_store_customers", "comment": null}, "property_melrose_store_customers": {"type": "BOOL", "index": 146, "name": "property_melrose_store_customers", "comment": null}, "property_georgetown_store_customers": {"type": "BOOL", "index": 147, "name": "property_georgetown_store_customers", "comment": null}, "property_boston_store_customers": {"type": "BOOL", "index": 148, "name": "property_boston_store_customers", "comment": null}, "property_greenwich_store_customers": {"type": "BOOL", "index": 149, "name": "property_greenwich_store_customers", "comment": null}, "property_bal_harbour_store_customers": {"type": "BOOL", "index": 150, "name": "property_bal_harbour_store_customers", "comment": null}, "property_pacific_palisades_store_customers": {"type": "BOOL", "index": 151, "name": "property_pacific_palisades_store_customers", "comment": null}, "property_fillmore_store_customers": {"type": "BOOL", "index": 152, "name": "property_fillmore_store_customers", "comment": null}, "property_soho_store_customers": {"type": "BOOL", "index": 153, "name": "property_soho_store_customers", "comment": null}, "property_nantucket_store_customers": {"type": "BOOL", "index": 154, "name": "property_nantucket_store_customers", "comment": null}, "property_houston_store_customers": {"type": "BOOL", "index": 155, "name": "property_houston_store_customers", "comment": null}, "property_attribution": {"type": "STRING", "index": 156, "name": "property_attribution", "comment": null}, "property_in_store_purchasers": {"type": "BOOL", "index": 157, "name": "property_in_store_purchasers", "comment": null}, "property_variant_option_size_rewind_2021_05_03": {"type": "STRING", "index": 158, "name": "property_variant_option_size_rewind_2021_05_03", "comment": null}, "property_variant_option_color_rewind_2021_05_03": {"type": "STRING", "index": 159, "name": "property_variant_option_color_rewind_2021_05_03", "comment": null}, "property_form_id": {"type": "STRING", "index": 160, "name": "property_form_id", "comment": null}, "property_attribute_is_pre_order": {"type": "BOOL", "index": 161, "name": "property_attribute_is_pre_order", "comment": null}, "property_has_partial_fulfillments": {"type": "BOOL", "index": 162, "name": "property_has_partial_fulfillments", "comment": null}, "property_esp": {"type": "INT64", "index": 163, "name": "property_esp", "comment": null}, "property_attribute_gecart_item_id": {"type": "INT64", "index": 164, "name": "property_attribute_gecart_item_id", "comment": null}, "property_sent_from": {"type": "STRING", "index": 165, "name": "property_sent_from", "comment": null}, "property_creative_id": {"type": "INT64", "index": 166, "name": "property_creative_id", "comment": null}, "property_conversation_id": {"type": "STRING", "index": 167, "name": "property_conversation_id", "comment": null}, "property_network": {"type": "STRING", "index": 168, "name": "property_network", "comment": null}, "property_variation_id": {"type": "STRING", "index": 169, "name": "property_variation_id", "comment": null}, "property_list_id": {"type": "STRING", "index": 170, "name": "property_list_id", "comment": null}, "property_shopify_variant_id": {"type": "INT64", "index": 171, "name": "property_shopify_variant_id", "comment": null}, "property_query": {"type": "STRING", "index": 172, "name": "property_query", "comment": null}, "property_presentment_currency": {"type": "STRING", "index": 173, "name": "property_presentment_currency", "comment": null}, "property_target_id": {"type": "STRING", "index": 174, "name": "property_target_id", "comment": null}, "property_category": {"type": "STRING", "index": 175, "name": "property_category", "comment": null}, "property_order_id": {"type": "STRING", "index": 176, "name": "property_order_id", "comment": null}, "property_cart_id": {"type": "STRING", "index": 177, "name": "property_cart_id", "comment": null}, "property_position": {"type": "STRING", "index": 178, "name": "property_position", "comment": null}, "property_publisher_id": {"type": "INT64", "index": 179, "name": "property_publisher_id", "comment": null}, "property_creative_type": {"type": "INT64", "index": 180, "name": "property_creative_type", "comment": null}, "property_offer_id": {"type": "INT64", "index": 181, "name": "property_offer_id", "comment": null}, "property_shopify_product_id": {"type": "INT64", "index": 182, "name": "property_shopify_product_id", "comment": null}, "property_variant": {"type": "STRING", "index": 183, "name": "property_variant", "comment": null}, "property_site_source_name": {"type": "STRING", "index": 184, "name": "property_site_source_name", "comment": null}, "property_publisher_name": {"type": "STRING", "index": 185, "name": "property_publisher_name", "comment": null}, "property_products": {"type": "STRING", "index": 186, "name": "property_products", "comment": null}, "property_discount": {"type": "STRING", "index": 187, "name": "property_discount", "comment": null}, "property_event_is_realtime": {"type": "BOOL", "index": 188, "name": "property_event_is_realtime", "comment": null}, "property_total": {"type": "FLOAT64", "index": 189, "name": "property_total", "comment": null}, "property_shipping": {"type": "FLOAT64", "index": 190, "name": "property_shipping", "comment": null}, "property_match_type": {"type": "STRING", "index": 191, "name": "property_match_type", "comment": null}, "property_source": {"type": "STRING", "index": 192, "name": "property_source", "comment": null}, "property_visitor_id": {"type": "STRING", "index": 193, "name": "property_visitor_id", "comment": null}, "property_presentment_amount": {"type": "FLOAT64", "index": 194, "name": "property_presentment_amount", "comment": null}, "property_channel": {"type": "STRING", "index": 195, "name": "property_channel", "comment": null}, "property_presentment_total": {"type": "FLOAT64", "index": 196, "name": "property_presentment_total", "comment": null}, "property_experiment_name": {"type": "STRING", "index": 197, "name": "property_experiment_name", "comment": null}, "property_trigger": {"type": "STRING", "index": 198, "name": "property_trigger", "comment": null}, "property_tax": {"type": "FLOAT64", "index": 199, "name": "property_tax", "comment": null}, "property_currency": {"type": "STRING", "index": 200, "name": "property_currency", "comment": null}, "property_user_id": {"type": "INT64", "index": 201, "name": "property_user_id", "comment": null}, "property_associate_id": {"type": "STRING", "index": 202, "name": "property_associate_id", "comment": null}, "property_placement": {"type": "STRING", "index": 203, "name": "property_placement", "comment": null}, "property_rating_value": {"type": "INT64", "index": 204, "name": "property_rating_value", "comment": null}, "property_rating_feedback_value": {"type": "STRING", "index": 205, "name": "property_rating_feedback_value", "comment": null}, "property_conversation_status": {"type": "STRING", "index": 206, "name": "property_conversation_status", "comment": null}, "property_exenta_cancellation_customer_appeasement": {"type": "BOOL", "index": 207, "name": "property_exenta_cancellation_customer_appeasement", "comment": null}, "property_results": {"type": "INT64", "index": 208, "name": "property_results", "comment": null}, "property_adgroup_id": {"type": "INT64", "index": 209, "name": "property_adgroup_id", "comment": null}, "property_campaign_id": {"type": "INT64", "index": 210, "name": "property_campaign_id", "comment": null}, "property_machine_open": {"type": "BOOL", "index": 211, "name": "property_machine_open", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.klaviyo_source.stg_klaviyo__event_tmp"}, "model.klaviyo_source.stg_klaviyo__flow_tmp": {"metadata": {"type": "view", "schema": "dbt_transformations", "name": "stg_klaviyo__flow_tmp", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "STRING", "index": 1, "name": "id", "comment": null}, "_fivetran_deleted": {"type": "BOOL", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 3, "name": "_fivetran_synced", "comment": null}, "created": {"type": "TIMESTAMP", "index": 4, "name": "created", "comment": null}, "customer_filter": {"type": "STRING", "index": 5, "name": "customer_filter", "comment": null}, "name": {"type": "STRING", "index": 6, "name": "name", "comment": null}, "status": {"type": "STRING", "index": 7, "name": "status", "comment": null}, "trigger": {"type": "STRING", "index": 8, "name": "trigger", "comment": null}, "updated": {"type": "TIMESTAMP", "index": 9, "name": "updated", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.klaviyo_source.stg_klaviyo__flow_tmp"}, "model.klaviyo_source.stg_klaviyo__metric": {"metadata": {"type": "table", "schema": "dbt_transformations", "name": "stg_klaviyo__metric", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"created_at": {"type": "TIMESTAMP", "index": 1, "name": "created_at", "comment": null}, "metric_id": {"type": "STRING", "index": 2, "name": "metric_id", "comment": null}, "integration_id": {"type": "STRING", "index": 3, "name": "integration_id", "comment": null}, "metric_name": {"type": "STRING", "index": 4, "name": "metric_name", "comment": null}, "updated_at": {"type": "TIMESTAMP", "index": 5, "name": "updated_at", "comment": null}, "source_relation": {"type": "STRING", "index": 6, "name": "source_relation", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 24731.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 408.0, "include": true, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.klaviyo_source.stg_klaviyo__metric"}, "model.klaviyo_source.stg_klaviyo__campaign_tmp": {"metadata": {"type": "view", "schema": "dbt_transformations", "name": "stg_klaviyo__campaign_tmp", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "STRING", "index": 1, "name": "id", "comment": null}, "_fivetran_deleted": {"type": "BOOL", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 3, "name": "_fivetran_synced", "comment": null}, "campaign_type": {"type": "STRING", "index": 4, "name": "campaign_type", "comment": null}, "created": {"type": "TIMESTAMP", "index": 5, "name": "created", "comment": null}, "email_template_id": {"type": "STRING", "index": 6, "name": "email_template_id", "comment": null}, "from_email": {"type": "STRING", "index": 7, "name": "from_email", "comment": null}, "from_name": {"type": "STRING", "index": 8, "name": "from_name", "comment": null}, "is_segmented": {"type": "BOOL", "index": 9, "name": "is_segmented", "comment": null}, "name": {"type": "STRING", "index": 10, "name": "name", "comment": null}, "send_time": {"type": "TIMESTAMP", "index": 11, "name": "send_time", "comment": null}, "sent_at": {"type": "TIMESTAMP", "index": 12, "name": "sent_at", "comment": null}, "status": {"type": "STRING", "index": 13, "name": "status", "comment": null}, "status_id": {"type": "STRING", "index": 14, "name": "status_id", "comment": null}, "status_label": {"type": "STRING", "index": 15, "name": "status_label", "comment": null}, "subject": {"type": "STRING", "index": 16, "name": "subject", "comment": null}, "updated": {"type": "TIMESTAMP", "index": 17, "name": "updated", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.klaviyo_source.stg_klaviyo__campaign_tmp"}, "model.klaviyo_source.stg_klaviyo__metric_tmp": {"metadata": {"type": "view", "schema": "dbt_transformations", "name": "stg_klaviyo__metric_tmp", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "STRING", "index": 1, "name": "id", "comment": null}, "_fivetran_deleted": {"type": "BOOL", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 3, "name": "_fivetran_synced", "comment": null}, "created": {"type": "TIMESTAMP", "index": 4, "name": "created", "comment": null}, "integration_id": {"type": "STRING", "index": 5, "name": "integration_id", "comment": null}, "name": {"type": "STRING", "index": 6, "name": "name", "comment": null}, "updated": {"type": "TIMESTAMP", "index": 7, "name": "updated", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.klaviyo_source.stg_klaviyo__metric_tmp"}, "model.klaviyo_source.stg_klaviyo__flow": {"metadata": {"type": "table", "schema": "dbt_transformations", "name": "stg_klaviyo__flow", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"created_at": {"type": "TIMESTAMP", "index": 1, "name": "created_at", "comment": null}, "flow_id": {"type": "STRING", "index": 2, "name": "flow_id", "comment": null}, "flow_name": {"type": "STRING", "index": 3, "name": "flow_name", "comment": null}, "status": {"type": "STRING", "index": 4, "name": "status", "comment": null}, "flow_trigger": {"type": "STRING", "index": 5, "name": "flow_trigger", "comment": null}, "updated_at": {"type": "TIMESTAMP", "index": 6, "name": "updated_at", "comment": null}, "person_filter": {"type": "STRING", "index": 7, "name": "person_filter", "comment": null}, "source_relation": {"type": "STRING", "index": 8, "name": "source_relation", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 5534.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 17.0, "include": true, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.klaviyo_source.stg_klaviyo__flow"}, "model.klaviyo_source.stg_klaviyo__integration_tmp": {"metadata": {"type": "view", "schema": "dbt_transformations", "name": "stg_klaviyo__integration_tmp", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "STRING", "index": 1, "name": "id", "comment": null}, "_fivetran_deleted": {"type": "BOOL", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 3, "name": "_fivetran_synced", "comment": null}, "category": {"type": "STRING", "index": 4, "name": "category", "comment": null}, "name": {"type": "STRING", "index": 5, "name": "name", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.klaviyo_source.stg_klaviyo__integration_tmp"}, "model.klaviyo_source.stg_klaviyo__campaign": {"metadata": {"type": "table", "schema": "dbt_transformations", "name": "stg_klaviyo__campaign", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"campaign_type": {"type": "STRING", "index": 1, "name": "campaign_type", "comment": null}, "created_at": {"type": "TIMESTAMP", "index": 2, "name": "created_at", "comment": null}, "email_template_id": {"type": "STRING", "index": 3, "name": "email_template_id", "comment": null}, "from_email": {"type": "STRING", "index": 4, "name": "from_email", "comment": null}, "from_name": {"type": "STRING", "index": 5, "name": "from_name", "comment": null}, "campaign_id": {"type": "STRING", "index": 6, "name": "campaign_id", "comment": null}, "is_segmented": {"type": "BOOL", "index": 7, "name": "is_segmented", "comment": null}, "campaign_name": {"type": "STRING", "index": 8, "name": "campaign_name", "comment": null}, "scheduled_to_send_at": {"type": "TIMESTAMP", "index": 9, "name": "scheduled_to_send_at", "comment": null}, "sent_at": {"type": "TIMESTAMP", "index": 10, "name": "sent_at", "comment": null}, "status": {"type": "STRING", "index": 11, "name": "status", "comment": null}, "status_id": {"type": "STRING", "index": 12, "name": "status_id", "comment": null}, "subject": {"type": "STRING", "index": 13, "name": "subject", "comment": null}, "updated_at": {"type": "TIMESTAMP", "index": 14, "name": "updated_at", "comment": null}, "source_relation": {"type": "STRING", "index": 15, "name": "source_relation", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 160267.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 860.0, "include": true, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.klaviyo_source.stg_klaviyo__campaign"}, "model.klaviyo_source.stg_klaviyo__person": {"metadata": {"type": "table", "schema": "dbt_transformations", "name": "stg_klaviyo__person", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"person_id": {"type": "STRING", "index": 1, "name": "person_id", "comment": null}, "address_1": {"type": "STRING", "index": 2, "name": "address_1", "comment": null}, "address_2": {"type": "STRING", "index": 3, "name": "address_2", "comment": null}, "city": {"type": "STRING", "index": 4, "name": "city", "comment": null}, "country": {"type": "STRING", "index": 5, "name": "country", "comment": null}, "zip": {"type": "STRING", "index": 6, "name": "zip", "comment": null}, "created_at": {"type": "TIMESTAMP", "index": 7, "name": "created_at", "comment": null}, "email": {"type": "STRING", "index": 8, "name": "email", "comment": null}, "full_name": {"type": "STRING", "index": 9, "name": "full_name", "comment": null}, "latitude": {"type": "FLOAT64", "index": 10, "name": "latitude", "comment": null}, "longitude": {"type": "FLOAT64", "index": 11, "name": "longitude", "comment": null}, "organization": {"type": "STRING", "index": 12, "name": "organization", "comment": null}, "phone_number": {"type": "STRING", "index": 13, "name": "phone_number", "comment": null}, "region": {"type": "STRING", "index": 14, "name": "region", "comment": null}, "timezone": {"type": "STRING", "index": 15, "name": "timezone", "comment": null}, "title": {"type": "STRING", "index": 16, "name": "title", "comment": null}, "updated_at": {"type": "TIMESTAMP", "index": 17, "name": "updated_at", "comment": null}, "source_relation": {"type": "STRING", "index": 18, "name": "source_relation", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 59416069.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 389584.0, "include": true, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.klaviyo_source.stg_klaviyo__person"}, "model.shopify_source.stg_shopify__order_adjustment": {"metadata": {"type": "table", "schema": "dbt_transformations", "name": "stg_shopify__order_adjustment", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"order_adjustment_id": {"type": "INT64", "index": 1, "name": "order_adjustment_id", "comment": null}, "order_id": {"type": "INT64", "index": 2, "name": "order_id", "comment": null}, "refund_id": {"type": "INT64", "index": 3, "name": "refund_id", "comment": null}, "amount": {"type": "FLOAT64", "index": 4, "name": "amount", "comment": null}, "tax_amount": {"type": "FLOAT64", "index": 5, "name": "tax_amount", "comment": null}, "kind": {"type": "STRING", "index": 6, "name": "kind", "comment": null}, "reason": {"type": "STRING", "index": 7, "name": "reason", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 8, "name": "_fivetran_synced", "comment": null}, "source_relation": {"type": "STRING", "index": 9, "name": "source_relation", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 2486872.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 27618.0, "include": true, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.shopify_source.stg_shopify__order_adjustment"}, "model.shopify_source.stg_shopify__order_line_tmp": {"metadata": {"type": "view", "schema": "dbt_transformations", "name": "stg_shopify__order_line_tmp", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "order_id": {"type": "INT64", "index": 2, "name": "order_id", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 3, "name": "_fivetran_synced", "comment": null}, "fulfillable_quantity": {"type": "FLOAT64", "index": 4, "name": "fulfillable_quantity", "comment": null}, "fulfillment_service": {"type": "STRING", "index": 5, "name": "fulfillment_service", "comment": null}, "fulfillment_status": {"type": "STRING", "index": 6, "name": "fulfillment_status", "comment": null}, "gift_card": {"type": "BOOL", "index": 7, "name": "gift_card", "comment": null}, "grams": {"type": "INT64", "index": 8, "name": "grams", "comment": null}, "index": {"type": "INT64", "index": 9, "name": "index", "comment": null}, "name": {"type": "STRING", "index": 10, "name": "name", "comment": null}, "pre_tax_price": {"type": "FLOAT64", "index": 11, "name": "pre_tax_price", "comment": null}, "price": {"type": "FLOAT64", "index": 12, "name": "price", "comment": null}, "product_id": {"type": "INT64", "index": 13, "name": "product_id", "comment": null}, "property_acadaca_color": {"type": "STRING", "index": 14, "name": "property_acadaca_color", "comment": null}, "property_acadaca_size": {"type": "STRING", "index": 15, "name": "property_acadaca_size", "comment": null}, "property_acadaca_sku": {"type": "STRING", "index": 16, "name": "property_acadaca_sku", "comment": null}, "quantity": {"type": "FLOAT64", "index": 17, "name": "quantity", "comment": null}, "requires_shipping": {"type": "BOOL", "index": 18, "name": "requires_shipping", "comment": null}, "sku": {"type": "STRING", "index": 19, "name": "sku", "comment": null}, "taxable": {"type": "BOOL", "index": 20, "name": "taxable", "comment": null}, "title": {"type": "STRING", "index": 21, "name": "title", "comment": null}, "total_discount": {"type": "FLOAT64", "index": 22, "name": "total_discount", "comment": null}, "variant_id": {"type": "INT64", "index": 23, "name": "variant_id", "comment": null}, "vendor": {"type": "STRING", "index": 24, "name": "vendor", "comment": null}, "property_card_message": {"type": "STRING", "index": 25, "name": "property_card_message", "comment": null}, "property_mw_grouped_product_discounted_price": {"type": "FLOAT64", "index": 26, "name": "property_mw_grouped_product_discounted_price", "comment": null}, "property_mw_grouped_product_relation": {"type": "INT64", "index": 27, "name": "property_mw_grouped_product_relation", "comment": null}, "property_mw_grouped_product_relation_3586136703076": {"type": "INT64", "index": 28, "name": "property_mw_grouped_product_relation_3586136703076", "comment": null}, "property_mw_grouped_product_relation_4321154596975": {"type": "INT64", "index": 29, "name": "property_mw_grouped_product_relation_4321154596975", "comment": null}, "property_mw_grouped_product_relation_4321154695279": {"type": "INT64", "index": 30, "name": "property_mw_grouped_product_relation_4321154695279", "comment": null}, "property_mw_grouped_product_relation_4321154891887": {"type": "INT64", "index": 31, "name": "property_mw_grouped_product_relation_4321154891887", "comment": null}, "property_mw_grouped_product_relation_4339644432495": {"type": "INT64", "index": 32, "name": "property_mw_grouped_product_relation_4339644432495", "comment": null}, "property_pre_order_date": {"type": "STRING", "index": 33, "name": "property_pre_order_date", "comment": null}, "property_recipient_email": {"type": "STRING", "index": 34, "name": "property_recipient_email", "comment": null}, "property_recipient_name": {"type": "STRING", "index": 35, "name": "property_recipient_name", "comment": null}, "property_send_date": {"type": "STRING", "index": 36, "name": "property_send_date", "comment": null}, "property_senders_name": {"type": "STRING", "index": 37, "name": "property_senders_name", "comment": null}, "property_mw_grouped_product_relation_4170368909412": {"type": "INT64", "index": 38, "name": "property_mw_grouped_product_relation_4170368909412", "comment": null}, "property_mw_grouped_product_relation_4321154498671": {"type": "INT64", "index": 39, "name": "property_mw_grouped_product_relation_4321154498671", "comment": null}, "property_mw_grouped_product_relation_4321154793583": {"type": "INT64", "index": 40, "name": "property_mw_grouped_product_relation_4321154793583", "comment": null}, "property_mw_grouped_product_relation_4321154859119": {"type": "INT64", "index": 41, "name": "property_mw_grouped_product_relation_4321154859119", "comment": null}, "destination_location_address_1": {"type": "STRING", "index": 42, "name": "destination_location_address_1", "comment": null}, "destination_location_address_2": {"type": "STRING", "index": 43, "name": "destination_location_address_2", "comment": null}, "destination_location_city": {"type": "STRING", "index": 44, "name": "destination_location_city", "comment": null}, "destination_location_country_code": {"type": "STRING", "index": 45, "name": "destination_location_country_code", "comment": null}, "destination_location_id": {"type": "INT64", "index": 46, "name": "destination_location_id", "comment": null}, "destination_location_name": {"type": "STRING", "index": 47, "name": "destination_location_name", "comment": null}, "destination_location_province_code": {"type": "STRING", "index": 48, "name": "destination_location_province_code", "comment": null}, "destination_location_zip": {"type": "STRING", "index": 49, "name": "destination_location_zip", "comment": null}, "origin_location_address_1": {"type": "STRING", "index": 50, "name": "origin_location_address_1", "comment": null}, "origin_location_address_2": {"type": "STRING", "index": 51, "name": "origin_location_address_2", "comment": null}, "origin_location_city": {"type": "STRING", "index": 52, "name": "origin_location_city", "comment": null}, "origin_location_country_code": {"type": "STRING", "index": 53, "name": "origin_location_country_code", "comment": null}, "origin_location_id": {"type": "INT64", "index": 54, "name": "origin_location_id", "comment": null}, "origin_location_name": {"type": "STRING", "index": 55, "name": "origin_location_name", "comment": null}, "origin_location_province_code": {"type": "STRING", "index": 56, "name": "origin_location_province_code", "comment": null}, "origin_location_zip": {"type": "STRING", "index": 57, "name": "origin_location_zip", "comment": null}, "pre_tax_price_set": {"type": "STRING", "index": 58, "name": "pre_tax_price_set", "comment": null}, "price_set": {"type": "STRING", "index": 59, "name": "price_set", "comment": null}, "product_exists": {"type": "BOOL", "index": 60, "name": "product_exists", "comment": null}, "tax_code": {"type": "STRING", "index": 61, "name": "tax_code", "comment": null}, "total_discount_set": {"type": "STRING", "index": 62, "name": "total_discount_set", "comment": null}, "variant_inventory_management": {"type": "STRING", "index": 63, "name": "variant_inventory_management", "comment": null}, "variant_title": {"type": "STRING", "index": 64, "name": "variant_title", "comment": null}, "properties": {"type": "STRING", "index": 65, "name": "properties", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.shopify_source.stg_shopify__order_line_tmp"}, "model.shopify_source.stg_shopify__refund_tmp": {"metadata": {"type": "view", "schema": "dbt_transformations", "name": "stg_shopify__refund_tmp", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 2, "name": "_fivetran_synced", "comment": null}, "created_at": {"type": "TIMESTAMP", "index": 3, "name": "created_at", "comment": null}, "note": {"type": "STRING", "index": 4, "name": "note", "comment": null}, "processed_at": {"type": "TIMESTAMP", "index": 5, "name": "processed_at", "comment": null}, "restock": {"type": "BOOL", "index": 6, "name": "restock", "comment": null}, "user_id": {"type": "INT64", "index": 7, "name": "user_id", "comment": null}, "order_id": {"type": "INT64", "index": 8, "name": "order_id", "comment": null}, "total_duties_set": {"type": "STRING", "index": 9, "name": "total_duties_set", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.shopify_source.stg_shopify__refund_tmp"}, "model.shopify_source.stg_shopify__transaction": {"metadata": {"type": "table", "schema": "dbt_transformations", "name": "stg_shopify__transaction", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"transaction_id": {"type": "INT64", "index": 1, "name": "transaction_id", "comment": null}, "order_id": {"type": "INT64", "index": 2, "name": "order_id", "comment": null}, "refund_id": {"type": "INT64", "index": 3, "name": "refund_id", "comment": null}, "amount": {"type": "FLOAT64", "index": 4, "name": "amount", "comment": null}, "created_timestamp": {"type": "TIMESTAMP", "index": 5, "name": "created_timestamp", "comment": null}, "processed_timestamp": {"type": "TIMESTAMP", "index": 6, "name": "processed_timestamp", "comment": null}, "device_id": {"type": "STRING", "index": 7, "name": "device_id", "comment": null}, "gateway": {"type": "STRING", "index": 8, "name": "gateway", "comment": null}, "source_name": {"type": "STRING", "index": 9, "name": "source_name", "comment": null}, "message": {"type": "STRING", "index": 10, "name": "message", "comment": null}, "currency": {"type": "STRING", "index": 11, "name": "currency", "comment": null}, "location_id": {"type": "INT64", "index": 12, "name": "location_id", "comment": null}, "parent_id": {"type": "INT64", "index": 13, "name": "parent_id", "comment": null}, "payment_avs_result_code": {"type": "STRING", "index": 14, "name": "payment_avs_result_code", "comment": null}, "payment_credit_card_bin": {"type": "STRING", "index": 15, "name": "payment_credit_card_bin", "comment": null}, "payment_cvv_result_code": {"type": "STRING", "index": 16, "name": "payment_cvv_result_code", "comment": null}, "payment_credit_card_number": {"type": "STRING", "index": 17, "name": "payment_credit_card_number", "comment": null}, "payment_credit_card_company": {"type": "STRING", "index": 18, "name": "payment_credit_card_company", "comment": null}, "kind": {"type": "STRING", "index": 19, "name": "kind", "comment": null}, "receipt": {"type": "STRING", "index": 20, "name": "receipt", "comment": null}, "currency_exchange_id": {"type": "INT64", "index": 21, "name": "currency_exchange_id", "comment": null}, "currency_exchange_adjustment": {"type": "FLOAT64", "index": 22, "name": "currency_exchange_adjustment", "comment": null}, "currency_exchange_original_amount": {"type": "FLOAT64", "index": 23, "name": "currency_exchange_original_amount", "comment": null}, "currency_exchange_final_amount": {"type": "FLOAT64", "index": 24, "name": "currency_exchange_final_amount", "comment": null}, "currency_exchange_currency": {"type": "STRING", "index": 25, "name": "currency_exchange_currency", "comment": null}, "error_code": {"type": "STRING", "index": 26, "name": "error_code", "comment": null}, "status": {"type": "STRING", "index": 27, "name": "status", "comment": null}, "test": {"type": "BOOL", "index": 28, "name": "test", "comment": null}, "user_id": {"type": "STRING", "index": 29, "name": "user_id", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 30, "name": "_fivetran_synced", "comment": null}, "source_relation": {"type": "STRING", "index": 31, "name": "source_relation", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 985500073.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 529228.0, "include": true, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.shopify_source.stg_shopify__transaction"}, "model.shopify_source.stg_shopify__refund": {"metadata": {"type": "table", "schema": "dbt_transformations", "name": "stg_shopify__refund", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"_fivetran_synced": {"type": "TIMESTAMP", "index": 1, "name": "_fivetran_synced", "comment": null}, "created_at": {"type": "TIMESTAMP", "index": 2, "name": "created_at", "comment": null}, "refund_id": {"type": "INT64", "index": 3, "name": "refund_id", "comment": null}, "note": {"type": "STRING", "index": 4, "name": "note", "comment": null}, "order_id": {"type": "INT64", "index": 5, "name": "order_id", "comment": null}, "processed_at": {"type": "TIMESTAMP", "index": 6, "name": "processed_at", "comment": null}, "restock": {"type": "BOOL", "index": 7, "name": "restock", "comment": null}, "user_id": {"type": "INT64", "index": 8, "name": "user_id", "comment": null}, "source_relation": {"type": "STRING", "index": 9, "name": "source_relation", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 6759802.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 64443.0, "include": true, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.shopify_source.stg_shopify__refund"}, "model.shopify_source.stg_shopify__order_line": {"metadata": {"type": "table", "schema": "dbt_transformations", "name": "stg_shopify__order_line", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"_fivetran_synced": {"type": "TIMESTAMP", "index": 1, "name": "_fivetran_synced", "comment": null}, "fulfillable_quantity": {"type": "FLOAT64", "index": 2, "name": "fulfillable_quantity", "comment": null}, "fulfillment_service": {"type": "STRING", "index": 3, "name": "fulfillment_service", "comment": null}, "fulfillment_status": {"type": "STRING", "index": 4, "name": "fulfillment_status", "comment": null}, "is_gift_card": {"type": "BOOL", "index": 5, "name": "is_gift_card", "comment": null}, "grams": {"type": "INT64", "index": 6, "name": "grams", "comment": null}, "order_line_id": {"type": "INT64", "index": 7, "name": "order_line_id", "comment": null}, "index": {"type": "INT64", "index": 8, "name": "index", "comment": null}, "name": {"type": "STRING", "index": 9, "name": "name", "comment": null}, "order_id": {"type": "INT64", "index": 10, "name": "order_id", "comment": null}, "pre_tax_price": {"type": "FLOAT64", "index": 11, "name": "pre_tax_price", "comment": null}, "price": {"type": "FLOAT64", "index": 12, "name": "price", "comment": null}, "product_id": {"type": "INT64", "index": 13, "name": "product_id", "comment": null}, "property_charge_interval_frequency": {"type": "NUMERIC", "index": 14, "name": "property_charge_interval_frequency", "comment": null}, "property_for_shipping_jan_3_rd_2020": {"type": "STRING", "index": 15, "name": "property_for_shipping_jan_3_rd_2020", "comment": null}, "property_shipping_interval_frequency": {"type": "NUMERIC", "index": 16, "name": "property_shipping_interval_frequency", "comment": null}, "property_shipping_interval_unit_type": {"type": "STRING", "index": 17, "name": "property_shipping_interval_unit_type", "comment": null}, "property_subscription_id": {"type": "NUMERIC", "index": 18, "name": "property_subscription_id", "comment": null}, "quantity": {"type": "FLOAT64", "index": 19, "name": "quantity", "comment": null}, "is_requiring_shipping": {"type": "BOOL", "index": 20, "name": "is_requiring_shipping", "comment": null}, "sku": {"type": "STRING", "index": 21, "name": "sku", "comment": null}, "is_taxable": {"type": "BOOL", "index": 22, "name": "is_taxable", "comment": null}, "title": {"type": "STRING", "index": 23, "name": "title", "comment": null}, "total_discount": {"type": "FLOAT64", "index": 24, "name": "total_discount", "comment": null}, "variant_id": {"type": "INT64", "index": 25, "name": "variant_id", "comment": null}, "vendor": {"type": "STRING", "index": 26, "name": "vendor", "comment": null}, "source_relation": {"type": "STRING", "index": 27, "name": "source_relation", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 108136977.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 565854.0, "include": true, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.shopify_source.stg_shopify__order_line"}, "model.shopify_source.stg_shopify__product_tmp": {"metadata": {"type": "view", "schema": "dbt_transformations", "name": "stg_shopify__product_tmp", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "_fivetran_deleted": {"type": "BOOL", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 3, "name": "_fivetran_synced", "comment": null}, "created_at": {"type": "TIMESTAMP", "index": 4, "name": "created_at", "comment": null}, "handle": {"type": "STRING", "index": 5, "name": "handle", "comment": null}, "product_type": {"type": "STRING", "index": 6, "name": "product_type", "comment": null}, "published_at": {"type": "TIMESTAMP", "index": 7, "name": "published_at", "comment": null}, "published_scope": {"type": "STRING", "index": 8, "name": "published_scope", "comment": null}, "title": {"type": "STRING", "index": 9, "name": "title", "comment": null}, "updated_at": {"type": "TIMESTAMP", "index": 10, "name": "updated_at", "comment": null}, "vendor": {"type": "STRING", "index": 11, "name": "vendor", "comment": null}, "status": {"type": "STRING", "index": 12, "name": "status", "comment": null}, "template_suffix": {"type": "STRING", "index": 13, "name": "template_suffix", "comment": null}, "body_html": {"type": "STRING", "index": 14, "name": "body_html", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.shopify_source.stg_shopify__product_tmp"}, "model.shopify_source.stg_shopify__order_line_refund_tmp": {"metadata": {"type": "view", "schema": "dbt_transformations", "name": "stg_shopify__order_line_refund_tmp", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 2, "name": "_fivetran_synced", "comment": null}, "location_id": {"type": "INT64", "index": 3, "name": "location_id", "comment": null}, "order_line_id": {"type": "INT64", "index": 4, "name": "order_line_id", "comment": null}, "quantity": {"type": "FLOAT64", "index": 5, "name": "quantity", "comment": null}, "refund_id": {"type": "INT64", "index": 6, "name": "refund_id", "comment": null}, "restock_type": {"type": "STRING", "index": 7, "name": "restock_type", "comment": null}, "subtotal": {"type": "FLOAT64", "index": 8, "name": "subtotal", "comment": null}, "subtotal_set": {"type": "STRING", "index": 9, "name": "subtotal_set", "comment": null}, "total_tax": {"type": "FLOAT64", "index": 10, "name": "total_tax", "comment": null}, "total_tax_set": {"type": "STRING", "index": 11, "name": "total_tax_set", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.shopify_source.stg_shopify__order_line_refund_tmp"}, "model.shopify_source.stg_shopify__customer": {"metadata": {"type": "table", "schema": "dbt_transformations", "name": "stg_shopify__customer", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"_fivetran_synced": {"type": "TIMESTAMP", "index": 1, "name": "_fivetran_synced", "comment": null}, "has_accepted_marketing": {"type": "BOOL", "index": 2, "name": "has_accepted_marketing", "comment": null}, "created_timestamp": {"type": "TIMESTAMP", "index": 3, "name": "created_timestamp", "comment": null}, "default_address_id": {"type": "INT64", "index": 4, "name": "default_address_id", "comment": null}, "email": {"type": "STRING", "index": 5, "name": "email", "comment": null}, "first_name": {"type": "STRING", "index": 6, "name": "first_name", "comment": null}, "customer_id": {"type": "INT64", "index": 7, "name": "customer_id", "comment": null}, "last_name": {"type": "STRING", "index": 8, "name": "last_name", "comment": null}, "orders_count": {"type": "INT64", "index": 9, "name": "orders_count", "comment": null}, "phone": {"type": "STRING", "index": 10, "name": "phone", "comment": null}, "account_state": {"type": "STRING", "index": 11, "name": "account_state", "comment": null}, "is_tax_exempt": {"type": "BOOL", "index": 12, "name": "is_tax_exempt", "comment": null}, "total_spent": {"type": "FLOAT64", "index": 13, "name": "total_spent", "comment": null}, "updated_timestamp": {"type": "TIMESTAMP", "index": 14, "name": "updated_timestamp", "comment": null}, "is_verified_email": {"type": "BOOL", "index": 15, "name": "is_verified_email", "comment": null}, "multipass_identifier": {"type": "STRING", "index": 16, "name": "multipass_identifier", "comment": null}, "source_relation": {"type": "STRING", "index": 17, "name": "source_relation", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 19541943.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 185693.0, "include": true, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.shopify_source.stg_shopify__customer"}, "model.shopify_source.stg_shopify__order_adjustment_tmp": {"metadata": {"type": "view", "schema": "dbt_transformations", "name": "stg_shopify__order_adjustment_tmp", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 2, "name": "_fivetran_synced", "comment": null}, "amount": {"type": "FLOAT64", "index": 3, "name": "amount", "comment": null}, "amount_set": {"type": "STRING", "index": 4, "name": "amount_set", "comment": null}, "kind": {"type": "STRING", "index": 5, "name": "kind", "comment": null}, "order_id": {"type": "INT64", "index": 6, "name": "order_id", "comment": null}, "reason": {"type": "STRING", "index": 7, "name": "reason", "comment": null}, "refund_id": {"type": "INT64", "index": 8, "name": "refund_id", "comment": null}, "tax_amount": {"type": "FLOAT64", "index": 9, "name": "tax_amount", "comment": null}, "tax_amount_set": {"type": "STRING", "index": 10, "name": "tax_amount_set", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.shopify_source.stg_shopify__order_adjustment_tmp"}, "model.shopify_source.stg_shopify__product_variant": {"metadata": {"type": "table", "schema": "dbt_transformations", "name": "stg_shopify__product_variant", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"variant_id": {"type": "INT64", "index": 1, "name": "variant_id", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 2, "name": "_fivetran_synced", "comment": null}, "created_timestamp": {"type": "TIMESTAMP", "index": 3, "name": "created_timestamp", "comment": null}, "updated_timestamp": {"type": "TIMESTAMP", "index": 4, "name": "updated_timestamp", "comment": null}, "product_id": {"type": "INT64", "index": 5, "name": "product_id", "comment": null}, "inventory_item_id": {"type": "INT64", "index": 6, "name": "inventory_item_id", "comment": null}, "image_id": {"type": "INT64", "index": 7, "name": "image_id", "comment": null}, "title": {"type": "STRING", "index": 8, "name": "title", "comment": null}, "price": {"type": "FLOAT64", "index": 9, "name": "price", "comment": null}, "sku": {"type": "STRING", "index": 10, "name": "sku", "comment": null}, "position": {"type": "INT64", "index": 11, "name": "position", "comment": null}, "inventory_policy": {"type": "STRING", "index": 12, "name": "inventory_policy", "comment": null}, "compare_at_price": {"type": "FLOAT64", "index": 13, "name": "compare_at_price", "comment": null}, "fulfillment_service": {"type": "STRING", "index": 14, "name": "fulfillment_service", "comment": null}, "inventory_management": {"type": "STRING", "index": 15, "name": "inventory_management", "comment": null}, "is_taxable": {"type": "BOOL", "index": 16, "name": "is_taxable", "comment": null}, "barcode": {"type": "STRING", "index": 17, "name": "barcode", "comment": null}, "grams": {"type": "FLOAT64", "index": 18, "name": "grams", "comment": null}, "inventory_quantity": {"type": "INT64", "index": 19, "name": "inventory_quantity", "comment": null}, "weight": {"type": "FLOAT64", "index": 20, "name": "weight", "comment": null}, "weight_unit": {"type": "STRING", "index": 21, "name": "weight_unit", "comment": null}, "option_1": {"type": "STRING", "index": 22, "name": "option_1", "comment": null}, "option_2": {"type": "STRING", "index": 23, "name": "option_2", "comment": null}, "option_3": {"type": "STRING", "index": 24, "name": "option_3", "comment": null}, "tax_code": {"type": "STRING", "index": 25, "name": "tax_code", "comment": null}, "old_inventory_quantity": {"type": "INT64", "index": 26, "name": "old_inventory_quantity", "comment": null}, "is_requiring_shipping": {"type": "BOOL", "index": 27, "name": "is_requiring_shipping", "comment": null}, "source_relation": {"type": "STRING", "index": 28, "name": "source_relation", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 5225589.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 28022.0, "include": true, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.shopify_source.stg_shopify__product_variant"}, "model.shopify_source.stg_shopify__order_tmp": {"metadata": {"type": "view", "schema": "dbt_transformations", "name": "stg_shopify__order_tmp", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 2, "name": "_fivetran_synced", "comment": null}, "billing_address_address_1": {"type": "STRING", "index": 3, "name": "billing_address_address_1", "comment": null}, "billing_address_address_2": {"type": "STRING", "index": 4, "name": "billing_address_address_2", "comment": null}, "billing_address_city": {"type": "STRING", "index": 5, "name": "billing_address_city", "comment": null}, "billing_address_company": {"type": "STRING", "index": 6, "name": "billing_address_company", "comment": null}, "billing_address_country": {"type": "STRING", "index": 7, "name": "billing_address_country", "comment": null}, "billing_address_country_code": {"type": "STRING", "index": 8, "name": "billing_address_country_code", "comment": null}, "billing_address_first_name": {"type": "STRING", "index": 9, "name": "billing_address_first_name", "comment": null}, "billing_address_last_name": {"type": "STRING", "index": 10, "name": "billing_address_last_name", "comment": null}, "billing_address_latitude": {"type": "STRING", "index": 11, "name": "billing_address_latitude", "comment": null}, "billing_address_longitude": {"type": "STRING", "index": 12, "name": "billing_address_longitude", "comment": null}, "billing_address_name": {"type": "STRING", "index": 13, "name": "billing_address_name", "comment": null}, "billing_address_phone": {"type": "STRING", "index": 14, "name": "billing_address_phone", "comment": null}, "billing_address_province": {"type": "STRING", "index": 15, "name": "billing_address_province", "comment": null}, "billing_address_province_code": {"type": "STRING", "index": 16, "name": "billing_address_province_code", "comment": null}, "billing_address_zip": {"type": "STRING", "index": 17, "name": "billing_address_zip", "comment": null}, "browser_ip": {"type": "STRING", "index": 18, "name": "browser_ip", "comment": null}, "buyer_accepts_marketing": {"type": "BOOL", "index": 19, "name": "buyer_accepts_marketing", "comment": null}, "cancel_reason": {"type": "STRING", "index": 20, "name": "cancel_reason", "comment": null}, "cancelled_at": {"type": "TIMESTAMP", "index": 21, "name": "cancelled_at", "comment": null}, "cart_token": {"type": "STRING", "index": 22, "name": "cart_token", "comment": null}, "checkout_token": {"type": "STRING", "index": 23, "name": "checkout_token", "comment": null}, "closed_at": {"type": "TIMESTAMP", "index": 24, "name": "closed_at", "comment": null}, "created_at": {"type": "TIMESTAMP", "index": 25, "name": "created_at", "comment": null}, "currency": {"type": "STRING", "index": 26, "name": "currency", "comment": null}, "customer_id": {"type": "INT64", "index": 27, "name": "customer_id", "comment": null}, "email": {"type": "STRING", "index": 28, "name": "email", "comment": null}, "financial_status": {"type": "STRING", "index": 29, "name": "financial_status", "comment": null}, "fulfillment_status": {"type": "STRING", "index": 30, "name": "fulfillment_status", "comment": null}, "landing_site_base_url": {"type": "STRING", "index": 31, "name": "landing_site_base_url", "comment": null}, "location_id": {"type": "INT64", "index": 32, "name": "location_id", "comment": null}, "name": {"type": "STRING", "index": 33, "name": "name", "comment": null}, "note": {"type": "STRING", "index": 34, "name": "note", "comment": null}, "number": {"type": "INT64", "index": 35, "name": "number", "comment": null}, "order_number": {"type": "INT64", "index": 36, "name": "order_number", "comment": null}, "processed_at": {"type": "TIMESTAMP", "index": 37, "name": "processed_at", "comment": null}, "processing_method": {"type": "STRING", "index": 38, "name": "processing_method", "comment": null}, "referring_site": {"type": "STRING", "index": 39, "name": "referring_site", "comment": null}, "shipping_address_address_1": {"type": "STRING", "index": 40, "name": "shipping_address_address_1", "comment": null}, "shipping_address_address_2": {"type": "STRING", "index": 41, "name": "shipping_address_address_2", "comment": null}, "shipping_address_city": {"type": "STRING", "index": 42, "name": "shipping_address_city", "comment": null}, "shipping_address_company": {"type": "STRING", "index": 43, "name": "shipping_address_company", "comment": null}, "shipping_address_country": {"type": "STRING", "index": 44, "name": "shipping_address_country", "comment": null}, "shipping_address_country_code": {"type": "STRING", "index": 45, "name": "shipping_address_country_code", "comment": null}, "shipping_address_first_name": {"type": "STRING", "index": 46, "name": "shipping_address_first_name", "comment": null}, "shipping_address_last_name": {"type": "STRING", "index": 47, "name": "shipping_address_last_name", "comment": null}, "shipping_address_latitude": {"type": "STRING", "index": 48, "name": "shipping_address_latitude", "comment": null}, "shipping_address_longitude": {"type": "STRING", "index": 49, "name": "shipping_address_longitude", "comment": null}, "shipping_address_name": {"type": "STRING", "index": 50, "name": "shipping_address_name", "comment": null}, "shipping_address_phone": {"type": "STRING", "index": 51, "name": "shipping_address_phone", "comment": null}, "shipping_address_province": {"type": "STRING", "index": 52, "name": "shipping_address_province", "comment": null}, "shipping_address_province_code": {"type": "STRING", "index": 53, "name": "shipping_address_province_code", "comment": null}, "shipping_address_zip": {"type": "STRING", "index": 54, "name": "shipping_address_zip", "comment": null}, "source_name": {"type": "STRING", "index": 55, "name": "source_name", "comment": null}, "subtotal_price": {"type": "FLOAT64", "index": 56, "name": "subtotal_price", "comment": null}, "taxes_included": {"type": "BOOL", "index": 57, "name": "taxes_included", "comment": null}, "test": {"type": "BOOL", "index": 58, "name": "test", "comment": null}, "token": {"type": "STRING", "index": 59, "name": "token", "comment": null}, "total_discounts": {"type": "FLOAT64", "index": 60, "name": "total_discounts", "comment": null}, "total_line_items_price": {"type": "FLOAT64", "index": 61, "name": "total_line_items_price", "comment": null}, "total_price": {"type": "FLOAT64", "index": 62, "name": "total_price", "comment": null}, "total_tax": {"type": "FLOAT64", "index": 63, "name": "total_tax", "comment": null}, "total_weight": {"type": "INT64", "index": 64, "name": "total_weight", "comment": null}, "updated_at": {"type": "TIMESTAMP", "index": 65, "name": "updated_at", "comment": null}, "user_id": {"type": "INT64", "index": 66, "name": "user_id", "comment": null}, "app_id": {"type": "INT64", "index": 67, "name": "app_id", "comment": null}, "billing_address_id": {"type": "INT64", "index": 68, "name": "billing_address_id", "comment": null}, "billing_address_is_default": {"type": "BOOL", "index": 69, "name": "billing_address_is_default", "comment": null}, "confirmed": {"type": "BOOL", "index": 70, "name": "confirmed", "comment": null}, "current_total_duties_set": {"type": "STRING", "index": 71, "name": "current_total_duties_set", "comment": null}, "customer_locale": {"type": "STRING", "index": 72, "name": "customer_locale", "comment": null}, "device_id": {"type": "STRING", "index": 73, "name": "device_id", "comment": null}, "landing_site_ref": {"type": "STRING", "index": 74, "name": "landing_site_ref", "comment": null}, "original_total_duties_set": {"type": "STRING", "index": 75, "name": "original_total_duties_set", "comment": null}, "payment_gateway_names": {"type": "STRING", "index": 76, "name": "payment_gateway_names", "comment": null}, "presentment_currency": {"type": "STRING", "index": 77, "name": "presentment_currency", "comment": null}, "reference": {"type": "STRING", "index": 78, "name": "reference", "comment": null}, "shipping_address_id": {"type": "INT64", "index": 79, "name": "shipping_address_id", "comment": null}, "shipping_address_is_default": {"type": "BOOL", "index": 80, "name": "shipping_address_is_default", "comment": null}, "source_identifier": {"type": "STRING", "index": 81, "name": "source_identifier", "comment": null}, "source_url": {"type": "STRING", "index": 82, "name": "source_url", "comment": null}, "subtotal_price_set": {"type": "STRING", "index": 83, "name": "subtotal_price_set", "comment": null}, "total_discounts_set": {"type": "STRING", "index": 84, "name": "total_discounts_set", "comment": null}, "total_line_items_price_set": {"type": "STRING", "index": 85, "name": "total_line_items_price_set", "comment": null}, "total_price_set": {"type": "STRING", "index": 86, "name": "total_price_set", "comment": null}, "total_price_usd": {"type": "FLOAT64", "index": 87, "name": "total_price_usd", "comment": null}, "total_shipping_price_set": {"type": "STRING", "index": 88, "name": "total_shipping_price_set", "comment": null}, "total_tax_set": {"type": "STRING", "index": 89, "name": "total_tax_set", "comment": null}, "total_tip_received": {"type": "FLOAT64", "index": 90, "name": "total_tip_received", "comment": null}, "note_attributes": {"type": "STRING", "index": 91, "name": "note_attributes", "comment": null}, "client_details_user_agent": {"type": "STRING", "index": 92, "name": "client_details_user_agent", "comment": null}, "current_subtotal_price_set": {"type": "STRING", "index": 93, "name": "current_subtotal_price_set", "comment": null}, "current_total_tax": {"type": "FLOAT64", "index": 94, "name": "current_total_tax", "comment": null}, "current_total_tax_set": {"type": "STRING", "index": 95, "name": "current_total_tax_set", "comment": null}, "current_total_price_set": {"type": "STRING", "index": 96, "name": "current_total_price_set", "comment": null}, "current_subtotal_price": {"type": "FLOAT64", "index": 97, "name": "current_subtotal_price", "comment": null}, "current_total_price": {"type": "FLOAT64", "index": 98, "name": "current_total_price", "comment": null}, "current_total_discounts": {"type": "FLOAT64", "index": 99, "name": "current_total_discounts", "comment": null}, "current_total_discounts_set": {"type": "STRING", "index": 100, "name": "current_total_discounts_set", "comment": null}, "_fivetran_deleted": {"type": "BOOL", "index": 101, "name": "_fivetran_deleted", "comment": null}, "order_status_url": {"type": "STRING", "index": 102, "name": "order_status_url", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.shopify_source.stg_shopify__order_tmp"}, "model.shopify_source.stg_shopify__transaction_tmp": {"metadata": {"type": "view", "schema": "dbt_transformations", "name": "stg_shopify__transaction_tmp", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 2, "name": "_fivetran_synced", "comment": null}, "amount": {"type": "FLOAT64", "index": 3, "name": "amount", "comment": null}, "authorization": {"type": "STRING", "index": 4, "name": "authorization", "comment": null}, "created_at": {"type": "TIMESTAMP", "index": 5, "name": "created_at", "comment": null}, "currency": {"type": "STRING", "index": 6, "name": "currency", "comment": null}, "currency_exchange_adjustment": {"type": "FLOAT64", "index": 7, "name": "currency_exchange_adjustment", "comment": null}, "currency_exchange_currency": {"type": "STRING", "index": 8, "name": "currency_exchange_currency", "comment": null}, "currency_exchange_final_amount": {"type": "FLOAT64", "index": 9, "name": "currency_exchange_final_amount", "comment": null}, "currency_exchange_id": {"type": "INT64", "index": 10, "name": "currency_exchange_id", "comment": null}, "currency_exchange_original_amount": {"type": "FLOAT64", "index": 11, "name": "currency_exchange_original_amount", "comment": null}, "device_id": {"type": "STRING", "index": 12, "name": "device_id", "comment": null}, "error_code": {"type": "STRING", "index": 13, "name": "error_code", "comment": null}, "gateway": {"type": "STRING", "index": 14, "name": "gateway", "comment": null}, "kind": {"type": "STRING", "index": 15, "name": "kind", "comment": null}, "location_id": {"type": "INT64", "index": 16, "name": "location_id", "comment": null}, "message": {"type": "STRING", "index": 17, "name": "message", "comment": null}, "order_id": {"type": "INT64", "index": 18, "name": "order_id", "comment": null}, "parent_id": {"type": "INT64", "index": 19, "name": "parent_id", "comment": null}, "payment_avs_result_code": {"type": "STRING", "index": 20, "name": "payment_avs_result_code", "comment": null}, "payment_credit_card_bin": {"type": "STRING", "index": 21, "name": "payment_credit_card_bin", "comment": null}, "payment_credit_card_company": {"type": "STRING", "index": 22, "name": "payment_credit_card_company", "comment": null}, "payment_credit_card_number": {"type": "STRING", "index": 23, "name": "payment_credit_card_number", "comment": null}, "payment_cvv_result_code": {"type": "STRING", "index": 24, "name": "payment_cvv_result_code", "comment": null}, "processed_at": {"type": "TIMESTAMP", "index": 25, "name": "processed_at", "comment": null}, "receipt": {"type": "STRING", "index": 26, "name": "receipt", "comment": null}, "refund_id": {"type": "INT64", "index": 27, "name": "refund_id", "comment": null}, "source_name": {"type": "STRING", "index": 28, "name": "source_name", "comment": null}, "status": {"type": "STRING", "index": 29, "name": "status", "comment": null}, "test": {"type": "BOOL", "index": 30, "name": "test", "comment": null}, "user_id": {"type": "STRING", "index": 31, "name": "user_id", "comment": null}, "extended_authorization_standard_authorization_expires_at": {"type": "TIMESTAMP", "index": 32, "name": "extended_authorization_standard_authorization_expires_at", "comment": null}, "authorization_expires_at": {"type": "TIMESTAMP", "index": 33, "name": "authorization_expires_at", "comment": null}, "extended_authorization_extended_authorization_expires_at": {"type": "TIMESTAMP", "index": 34, "name": "extended_authorization_extended_authorization_expires_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.shopify_source.stg_shopify__transaction_tmp"}, "model.shopify_source.stg_shopify__order_line_refund": {"metadata": {"type": "table", "schema": "dbt_transformations", "name": "stg_shopify__order_line_refund", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"_fivetran_synced": {"type": "TIMESTAMP", "index": 1, "name": "_fivetran_synced", "comment": null}, "order_line_refund_id": {"type": "INT64", "index": 2, "name": "order_line_refund_id", "comment": null}, "location_id": {"type": "INT64", "index": 3, "name": "location_id", "comment": null}, "order_line_id": {"type": "INT64", "index": 4, "name": "order_line_id", "comment": null}, "subtotal": {"type": "FLOAT64", "index": 5, "name": "subtotal", "comment": null}, "total_tax": {"type": "FLOAT64", "index": 6, "name": "total_tax", "comment": null}, "quantity": {"type": "FLOAT64", "index": 7, "name": "quantity", "comment": null}, "refund_id": {"type": "INT64", "index": 8, "name": "refund_id", "comment": null}, "restock_type": {"type": "STRING", "index": 9, "name": "restock_type", "comment": null}, "source_relation": {"type": "STRING", "index": 10, "name": "source_relation", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 5968648.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 86756.0, "include": true, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.shopify_source.stg_shopify__order_line_refund"}, "model.shopify_source.stg_shopify__product_variant_tmp": {"metadata": {"type": "view", "schema": "dbt_transformations", "name": "stg_shopify__product_variant_tmp", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 2, "name": "_fivetran_synced", "comment": null}, "barcode": {"type": "STRING", "index": 3, "name": "barcode", "comment": null}, "compare_at_price": {"type": "FLOAT64", "index": 4, "name": "compare_at_price", "comment": null}, "created_at": {"type": "TIMESTAMP", "index": 5, "name": "created_at", "comment": null}, "fulfillment_service": {"type": "STRING", "index": 6, "name": "fulfillment_service", "comment": null}, "grams": {"type": "FLOAT64", "index": 7, "name": "grams", "comment": null}, "image_id": {"type": "INT64", "index": 8, "name": "image_id", "comment": null}, "inventory_item_id": {"type": "INT64", "index": 9, "name": "inventory_item_id", "comment": null}, "inventory_management": {"type": "STRING", "index": 10, "name": "inventory_management", "comment": null}, "inventory_policy": {"type": "STRING", "index": 11, "name": "inventory_policy", "comment": null}, "inventory_quantity": {"type": "INT64", "index": 12, "name": "inventory_quantity", "comment": null}, "old_inventory_quantity": {"type": "INT64", "index": 13, "name": "old_inventory_quantity", "comment": null}, "position": {"type": "INT64", "index": 14, "name": "position", "comment": null}, "price": {"type": "FLOAT64", "index": 15, "name": "price", "comment": null}, "product_id": {"type": "INT64", "index": 16, "name": "product_id", "comment": null}, "requires_shipping": {"type": "BOOL", "index": 17, "name": "requires_shipping", "comment": null}, "sku": {"type": "STRING", "index": 18, "name": "sku", "comment": null}, "taxable": {"type": "BOOL", "index": 19, "name": "taxable", "comment": null}, "title": {"type": "STRING", "index": 20, "name": "title", "comment": null}, "updated_at": {"type": "TIMESTAMP", "index": 21, "name": "updated_at", "comment": null}, "weight": {"type": "FLOAT64", "index": 22, "name": "weight", "comment": null}, "weight_unit": {"type": "STRING", "index": 23, "name": "weight_unit", "comment": null}, "option_1": {"type": "STRING", "index": 24, "name": "option_1", "comment": null}, "option_2": {"type": "STRING", "index": 25, "name": "option_2", "comment": null}, "option_3": {"type": "STRING", "index": 26, "name": "option_3", "comment": null}, "tax_code": {"type": "STRING", "index": 27, "name": "tax_code", "comment": null}, "presentment_prices": {"type": "STRING", "index": 28, "name": "presentment_prices", "comment": null}, "inventory_quantity_adjustment": {"type": "INT64", "index": 29, "name": "inventory_quantity_adjustment", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.shopify_source.stg_shopify__product_variant_tmp"}, "model.shopify_source.stg_shopify__product": {"metadata": {"type": "table", "schema": "dbt_transformations", "name": "stg_shopify__product", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"_fivetran_deleted": {"type": "BOOL", "index": 1, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 2, "name": "_fivetran_synced", "comment": null}, "created_timestamp": {"type": "TIMESTAMP", "index": 3, "name": "created_timestamp", "comment": null}, "handle": {"type": "STRING", "index": 4, "name": "handle", "comment": null}, "product_id": {"type": "INT64", "index": 5, "name": "product_id", "comment": null}, "product_type": {"type": "STRING", "index": 6, "name": "product_type", "comment": null}, "published_timestamp": {"type": "TIMESTAMP", "index": 7, "name": "published_timestamp", "comment": null}, "published_scope": {"type": "STRING", "index": 8, "name": "published_scope", "comment": null}, "title": {"type": "STRING", "index": 9, "name": "title", "comment": null}, "updated_timestamp": {"type": "TIMESTAMP", "index": 10, "name": "updated_timestamp", "comment": null}, "vendor": {"type": "STRING", "index": 11, "name": "vendor", "comment": null}, "source_relation": {"type": "STRING", "index": 12, "name": "source_relation", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 369262.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 3402.0, "include": true, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.shopify_source.stg_shopify__product"}, "model.shopify_source.stg_shopify__customer_tmp": {"metadata": {"type": "view", "schema": "dbt_transformations", "name": "stg_shopify__customer_tmp", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 2, "name": "_fivetran_synced", "comment": null}, "accepts_marketing": {"type": "BOOL", "index": 3, "name": "accepts_marketing", "comment": null}, "created_at": {"type": "TIMESTAMP", "index": 4, "name": "created_at", "comment": null}, "default_address_id": {"type": "INT64", "index": 5, "name": "default_address_id", "comment": null}, "email": {"type": "STRING", "index": 6, "name": "email", "comment": null}, "first_name": {"type": "STRING", "index": 7, "name": "first_name", "comment": null}, "last_name": {"type": "STRING", "index": 8, "name": "last_name", "comment": null}, "orders_count": {"type": "INT64", "index": 9, "name": "orders_count", "comment": null}, "phone": {"type": "STRING", "index": 10, "name": "phone", "comment": null}, "state": {"type": "STRING", "index": 11, "name": "state", "comment": null}, "tax_exempt": {"type": "BOOL", "index": 12, "name": "tax_exempt", "comment": null}, "total_spent": {"type": "FLOAT64", "index": 13, "name": "total_spent", "comment": null}, "updated_at": {"type": "TIMESTAMP", "index": 14, "name": "updated_at", "comment": null}, "verified_email": {"type": "BOOL", "index": 15, "name": "verified_email", "comment": null}, "note": {"type": "STRING", "index": 16, "name": "note", "comment": null}, "accepts_marketing_updated_at": {"type": "TIMESTAMP", "index": 17, "name": "accepts_marketing_updated_at", "comment": null}, "marketing_opt_in_level": {"type": "STRING", "index": 18, "name": "marketing_opt_in_level", "comment": null}, "lifetime_duration": {"type": "STRING", "index": 19, "name": "lifetime_duration", "comment": null}, "can_delete": {"type": "BOOL", "index": 20, "name": "can_delete", "comment": null}, "multipass_identifier": {"type": "STRING", "index": 21, "name": "multipass_identifier", "comment": null}, "_fivetran_deleted": {"type": "BOOL", "index": 22, "name": "_fivetran_deleted", "comment": null}, "metafield": {"type": "STRING", "index": 23, "name": "metafield", "comment": null}, "currency": {"type": "STRING", "index": 24, "name": "currency", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.shopify_source.stg_shopify__customer_tmp"}, "model.shopify_source.stg_shopify__order": {"metadata": {"type": "table", "schema": "dbt_transformations", "name": "stg_shopify__order", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"_fivetran_synced": {"type": "TIMESTAMP", "index": 1, "name": "_fivetran_synced", "comment": null}, "billing_address_address_1": {"type": "STRING", "index": 2, "name": "billing_address_address_1", "comment": null}, "billing_address_address_2": {"type": "STRING", "index": 3, "name": "billing_address_address_2", "comment": null}, "billing_address_city": {"type": "STRING", "index": 4, "name": "billing_address_city", "comment": null}, "billing_address_company": {"type": "STRING", "index": 5, "name": "billing_address_company", "comment": null}, "billing_address_country": {"type": "STRING", "index": 6, "name": "billing_address_country", "comment": null}, "billing_address_country_code": {"type": "STRING", "index": 7, "name": "billing_address_country_code", "comment": null}, "billing_address_first_name": {"type": "STRING", "index": 8, "name": "billing_address_first_name", "comment": null}, "billing_address_last_name": {"type": "STRING", "index": 9, "name": "billing_address_last_name", "comment": null}, "billing_address_latitude": {"type": "STRING", "index": 10, "name": "billing_address_latitude", "comment": null}, "billing_address_longitude": {"type": "STRING", "index": 11, "name": "billing_address_longitude", "comment": null}, "billing_address_name": {"type": "STRING", "index": 12, "name": "billing_address_name", "comment": null}, "billing_address_phone": {"type": "STRING", "index": 13, "name": "billing_address_phone", "comment": null}, "billing_address_province": {"type": "STRING", "index": 14, "name": "billing_address_province", "comment": null}, "billing_address_province_code": {"type": "STRING", "index": 15, "name": "billing_address_province_code", "comment": null}, "billing_address_zip": {"type": "STRING", "index": 16, "name": "billing_address_zip", "comment": null}, "browser_ip": {"type": "STRING", "index": 17, "name": "browser_ip", "comment": null}, "has_buyer_accepted_marketing": {"type": "BOOL", "index": 18, "name": "has_buyer_accepted_marketing", "comment": null}, "cancel_reason": {"type": "STRING", "index": 19, "name": "cancel_reason", "comment": null}, "cancelled_timestamp": {"type": "TIMESTAMP", "index": 20, "name": "cancelled_timestamp", "comment": null}, "cart_token": {"type": "STRING", "index": 21, "name": "cart_token", "comment": null}, "checkout_token": {"type": "STRING", "index": 22, "name": "checkout_token", "comment": null}, "closed_timestamp": {"type": "TIMESTAMP", "index": 23, "name": "closed_timestamp", "comment": null}, "created_timestamp": {"type": "TIMESTAMP", "index": 24, "name": "created_timestamp", "comment": null}, "currency": {"type": "STRING", "index": 25, "name": "currency", "comment": null}, "customer_id": {"type": "INT64", "index": 26, "name": "customer_id", "comment": null}, "email": {"type": "STRING", "index": 27, "name": "email", "comment": null}, "financial_status": {"type": "STRING", "index": 28, "name": "financial_status", "comment": null}, "fulfillment_status": {"type": "STRING", "index": 29, "name": "fulfillment_status", "comment": null}, "order_id": {"type": "INT64", "index": 30, "name": "order_id", "comment": null}, "landing_site_base_url": {"type": "STRING", "index": 31, "name": "landing_site_base_url", "comment": null}, "location_id": {"type": "INT64", "index": 32, "name": "location_id", "comment": null}, "name": {"type": "STRING", "index": 33, "name": "name", "comment": null}, "note": {"type": "STRING", "index": 34, "name": "note", "comment": null}, "number": {"type": "INT64", "index": 35, "name": "number", "comment": null}, "order_number": {"type": "INT64", "index": 36, "name": "order_number", "comment": null}, "processed_timestamp": {"type": "TIMESTAMP", "index": 37, "name": "processed_timestamp", "comment": null}, "processing_method": {"type": "STRING", "index": 38, "name": "processing_method", "comment": null}, "referring_site": {"type": "STRING", "index": 39, "name": "referring_site", "comment": null}, "total_shipping_price_set": {"type": "STRING", "index": 40, "name": "total_shipping_price_set", "comment": null}, "shipping_address_address_1": {"type": "STRING", "index": 41, "name": "shipping_address_address_1", "comment": null}, "shipping_address_address_2": {"type": "STRING", "index": 42, "name": "shipping_address_address_2", "comment": null}, "shipping_address_city": {"type": "STRING", "index": 43, "name": "shipping_address_city", "comment": null}, "shipping_address_company": {"type": "STRING", "index": 44, "name": "shipping_address_company", "comment": null}, "shipping_address_country": {"type": "STRING", "index": 45, "name": "shipping_address_country", "comment": null}, "shipping_address_country_code": {"type": "STRING", "index": 46, "name": "shipping_address_country_code", "comment": null}, "shipping_address_first_name": {"type": "STRING", "index": 47, "name": "shipping_address_first_name", "comment": null}, "shipping_address_last_name": {"type": "STRING", "index": 48, "name": "shipping_address_last_name", "comment": null}, "shipping_address_latitude": {"type": "STRING", "index": 49, "name": "shipping_address_latitude", "comment": null}, "shipping_address_longitude": {"type": "STRING", "index": 50, "name": "shipping_address_longitude", "comment": null}, "shipping_address_name": {"type": "STRING", "index": 51, "name": "shipping_address_name", "comment": null}, "shipping_address_phone": {"type": "STRING", "index": 52, "name": "shipping_address_phone", "comment": null}, "shipping_address_province": {"type": "STRING", "index": 53, "name": "shipping_address_province", "comment": null}, "shipping_address_province_code": {"type": "STRING", "index": 54, "name": "shipping_address_province_code", "comment": null}, "shipping_address_zip": {"type": "STRING", "index": 55, "name": "shipping_address_zip", "comment": null}, "source_name": {"type": "STRING", "index": 56, "name": "source_name", "comment": null}, "subtotal_price": {"type": "FLOAT64", "index": 57, "name": "subtotal_price", "comment": null}, "has_taxes_included": {"type": "BOOL", "index": 58, "name": "has_taxes_included", "comment": null}, "is_test_order": {"type": "BOOL", "index": 59, "name": "is_test_order", "comment": null}, "token": {"type": "STRING", "index": 60, "name": "token", "comment": null}, "total_discounts": {"type": "FLOAT64", "index": 61, "name": "total_discounts", "comment": null}, "total_line_items_price": {"type": "FLOAT64", "index": 62, "name": "total_line_items_price", "comment": null}, "total_price": {"type": "FLOAT64", "index": 63, "name": "total_price", "comment": null}, "total_tax": {"type": "FLOAT64", "index": 64, "name": "total_tax", "comment": null}, "total_weight": {"type": "INT64", "index": 65, "name": "total_weight", "comment": null}, "updated_timestamp": {"type": "TIMESTAMP", "index": 66, "name": "updated_timestamp", "comment": null}, "user_id": {"type": "INT64", "index": 67, "name": "user_id", "comment": null}, "source_relation": {"type": "STRING", "index": 68, "name": "source_relation", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 214269597.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 325105.0, "include": true, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.shopify_source.stg_shopify__order"}, "model.shopify.shopify__calendar": {"metadata": {"type": "table", "schema": "dbt_transformations", "name": "shopify__calendar", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"date_day": {"type": "DATETIME", "index": 1, "name": "date_day", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 8392.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 1049.0, "include": true, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.shopify.shopify__calendar"}, "model.shopify.shopify__orders": {"metadata": {"type": "table", "schema": "dbt_transformations", "name": "shopify__orders", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"_fivetran_synced": {"type": "TIMESTAMP", "index": 1, "name": "_fivetran_synced", "comment": null}, "billing_address_address_1": {"type": "STRING", "index": 2, "name": "billing_address_address_1", "comment": null}, "billing_address_address_2": {"type": "STRING", "index": 3, "name": "billing_address_address_2", "comment": null}, "billing_address_city": {"type": "STRING", "index": 4, "name": "billing_address_city", "comment": null}, "billing_address_company": {"type": "STRING", "index": 5, "name": "billing_address_company", "comment": null}, "billing_address_country": {"type": "STRING", "index": 6, "name": "billing_address_country", "comment": null}, "billing_address_country_code": {"type": "STRING", "index": 7, "name": "billing_address_country_code", "comment": null}, "billing_address_first_name": {"type": "STRING", "index": 8, "name": "billing_address_first_name", "comment": null}, "billing_address_last_name": {"type": "STRING", "index": 9, "name": "billing_address_last_name", "comment": null}, "billing_address_latitude": {"type": "STRING", "index": 10, "name": "billing_address_latitude", "comment": null}, "billing_address_longitude": {"type": "STRING", "index": 11, "name": "billing_address_longitude", "comment": null}, "billing_address_name": {"type": "STRING", "index": 12, "name": "billing_address_name", "comment": null}, "billing_address_phone": {"type": "STRING", "index": 13, "name": "billing_address_phone", "comment": null}, "billing_address_province": {"type": "STRING", "index": 14, "name": "billing_address_province", "comment": null}, "billing_address_province_code": {"type": "STRING", "index": 15, "name": "billing_address_province_code", "comment": null}, "billing_address_zip": {"type": "STRING", "index": 16, "name": "billing_address_zip", "comment": null}, "browser_ip": {"type": "STRING", "index": 17, "name": "browser_ip", "comment": null}, "has_buyer_accepted_marketing": {"type": "BOOL", "index": 18, "name": "has_buyer_accepted_marketing", "comment": null}, "cancel_reason": {"type": "STRING", "index": 19, "name": "cancel_reason", "comment": null}, "cancelled_timestamp": {"type": "TIMESTAMP", "index": 20, "name": "cancelled_timestamp", "comment": null}, "cart_token": {"type": "STRING", "index": 21, "name": "cart_token", "comment": null}, "checkout_token": {"type": "STRING", "index": 22, "name": "checkout_token", "comment": null}, "closed_timestamp": {"type": "TIMESTAMP", "index": 23, "name": "closed_timestamp", "comment": null}, "created_timestamp": {"type": "TIMESTAMP", "index": 24, "name": "created_timestamp", "comment": null}, "currency": {"type": "STRING", "index": 25, "name": "currency", "comment": null}, "customer_id": {"type": "INT64", "index": 26, "name": "customer_id", "comment": null}, "email": {"type": "STRING", "index": 27, "name": "email", "comment": null}, "financial_status": {"type": "STRING", "index": 28, "name": "financial_status", "comment": null}, "fulfillment_status": {"type": "STRING", "index": 29, "name": "fulfillment_status", "comment": null}, "order_id": {"type": "INT64", "index": 30, "name": "order_id", "comment": null}, "landing_site_base_url": {"type": "STRING", "index": 31, "name": "landing_site_base_url", "comment": null}, "location_id": {"type": "INT64", "index": 32, "name": "location_id", "comment": null}, "name": {"type": "STRING", "index": 33, "name": "name", "comment": null}, "note": {"type": "STRING", "index": 34, "name": "note", "comment": null}, "number": {"type": "INT64", "index": 35, "name": "number", "comment": null}, "order_number": {"type": "INT64", "index": 36, "name": "order_number", "comment": null}, "processed_timestamp": {"type": "TIMESTAMP", "index": 37, "name": "processed_timestamp", "comment": null}, "processing_method": {"type": "STRING", "index": 38, "name": "processing_method", "comment": null}, "referring_site": {"type": "STRING", "index": 39, "name": "referring_site", "comment": null}, "total_shipping_price_set": {"type": "STRING", "index": 40, "name": "total_shipping_price_set", "comment": null}, "shipping_address_address_1": {"type": "STRING", "index": 41, "name": "shipping_address_address_1", "comment": null}, "shipping_address_address_2": {"type": "STRING", "index": 42, "name": "shipping_address_address_2", "comment": null}, "shipping_address_city": {"type": "STRING", "index": 43, "name": "shipping_address_city", "comment": null}, "shipping_address_company": {"type": "STRING", "index": 44, "name": "shipping_address_company", "comment": null}, "shipping_address_country": {"type": "STRING", "index": 45, "name": "shipping_address_country", "comment": null}, "shipping_address_country_code": {"type": "STRING", "index": 46, "name": "shipping_address_country_code", "comment": null}, "shipping_address_first_name": {"type": "STRING", "index": 47, "name": "shipping_address_first_name", "comment": null}, "shipping_address_last_name": {"type": "STRING", "index": 48, "name": "shipping_address_last_name", "comment": null}, "shipping_address_latitude": {"type": "STRING", "index": 49, "name": "shipping_address_latitude", "comment": null}, "shipping_address_longitude": {"type": "STRING", "index": 50, "name": "shipping_address_longitude", "comment": null}, "shipping_address_name": {"type": "STRING", "index": 51, "name": "shipping_address_name", "comment": null}, "shipping_address_phone": {"type": "STRING", "index": 52, "name": "shipping_address_phone", "comment": null}, "shipping_address_province": {"type": "STRING", "index": 53, "name": "shipping_address_province", "comment": null}, "shipping_address_province_code": {"type": "STRING", "index": 54, "name": "shipping_address_province_code", "comment": null}, "shipping_address_zip": {"type": "STRING", "index": 55, "name": "shipping_address_zip", "comment": null}, "source_name": {"type": "STRING", "index": 56, "name": "source_name", "comment": null}, "subtotal_price": {"type": "FLOAT64", "index": 57, "name": "subtotal_price", "comment": null}, "has_taxes_included": {"type": "BOOL", "index": 58, "name": "has_taxes_included", "comment": null}, "is_test_order": {"type": "BOOL", "index": 59, "name": "is_test_order", "comment": null}, "token": {"type": "STRING", "index": 60, "name": "token", "comment": null}, "total_discounts": {"type": "FLOAT64", "index": 61, "name": "total_discounts", "comment": null}, "total_line_items_price": {"type": "FLOAT64", "index": 62, "name": "total_line_items_price", "comment": null}, "total_price": {"type": "FLOAT64", "index": 63, "name": "total_price", "comment": null}, "total_tax": {"type": "FLOAT64", "index": 64, "name": "total_tax", "comment": null}, "total_weight": {"type": "INT64", "index": 65, "name": "total_weight", "comment": null}, "updated_timestamp": {"type": "TIMESTAMP", "index": 66, "name": "updated_timestamp", "comment": null}, "user_id": {"type": "INT64", "index": 67, "name": "user_id", "comment": null}, "source_relation": {"type": "STRING", "index": 68, "name": "source_relation", "comment": null}, "shipping_cost": {"type": "FLOAT64", "index": 69, "name": "shipping_cost", "comment": null}, "order_adjustment_amount": {"type": "FLOAT64", "index": 70, "name": "order_adjustment_amount", "comment": null}, "order_adjustment_tax_amount": {"type": "FLOAT64", "index": 71, "name": "order_adjustment_tax_amount", "comment": null}, "refund_subtotal": {"type": "FLOAT64", "index": 72, "name": "refund_subtotal", "comment": null}, "refund_total_tax": {"type": "FLOAT64", "index": 73, "name": "refund_total_tax", "comment": null}, "order_adjusted_total": {"type": "FLOAT64", "index": 74, "name": "order_adjusted_total", "comment": null}, "line_item_count": {"type": "INT64", "index": 75, "name": "line_item_count", "comment": null}, "customer_order_seq_number": {"type": "INT64", "index": 76, "name": "customer_order_seq_number", "comment": null}, "new_vs_repeat": {"type": "STRING", "index": 77, "name": "new_vs_repeat", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 227774698.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 325105.0, "include": true, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.shopify.shopify__orders"}, "model.shopify.shopify__products": {"metadata": {"type": "table", "schema": "dbt_transformations", "name": "shopify__products", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"_fivetran_deleted": {"type": "BOOL", "index": 1, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 2, "name": "_fivetran_synced", "comment": null}, "created_timestamp": {"type": "TIMESTAMP", "index": 3, "name": "created_timestamp", "comment": null}, "handle": {"type": "STRING", "index": 4, "name": "handle", "comment": null}, "product_id": {"type": "INT64", "index": 5, "name": "product_id", "comment": null}, "product_type": {"type": "STRING", "index": 6, "name": "product_type", "comment": null}, "published_timestamp": {"type": "TIMESTAMP", "index": 7, "name": "published_timestamp", "comment": null}, "published_scope": {"type": "STRING", "index": 8, "name": "published_scope", "comment": null}, "title": {"type": "STRING", "index": 9, "name": "title", "comment": null}, "updated_timestamp": {"type": "TIMESTAMP", "index": 10, "name": "updated_timestamp", "comment": null}, "vendor": {"type": "STRING", "index": 11, "name": "vendor", "comment": null}, "source_relation": {"type": "STRING", "index": 12, "name": "source_relation", "comment": null}, "quantity_sold": {"type": "FLOAT64", "index": 13, "name": "quantity_sold", "comment": null}, "subtotal_sold": {"type": "FLOAT64", "index": 14, "name": "subtotal_sold", "comment": null}, "quantity_sold_net_refunds": {"type": "FLOAT64", "index": 15, "name": "quantity_sold_net_refunds", "comment": null}, "subtotal_sold_net_refunds": {"type": "FLOAT64", "index": 16, "name": "subtotal_sold_net_refunds", "comment": null}, "first_order_timestamp": {"type": "TIMESTAMP", "index": 17, "name": "first_order_timestamp", "comment": null}, "most_recent_order_timestamp": {"type": "TIMESTAMP", "index": 18, "name": "most_recent_order_timestamp", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 528350.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 3402.0, "include": true, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.shopify.shopify__products"}, "model.shopify.shopify__customers": {"metadata": {"type": "table", "schema": "dbt_transformations", "name": "shopify__customers", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"_fivetran_synced": {"type": "TIMESTAMP", "index": 1, "name": "_fivetran_synced", "comment": null}, "has_accepted_marketing": {"type": "BOOL", "index": 2, "name": "has_accepted_marketing", "comment": null}, "created_timestamp": {"type": "TIMESTAMP", "index": 3, "name": "created_timestamp", "comment": null}, "default_address_id": {"type": "INT64", "index": 4, "name": "default_address_id", "comment": null}, "email": {"type": "STRING", "index": 5, "name": "email", "comment": null}, "first_name": {"type": "STRING", "index": 6, "name": "first_name", "comment": null}, "customer_id": {"type": "INT64", "index": 7, "name": "customer_id", "comment": null}, "last_name": {"type": "STRING", "index": 8, "name": "last_name", "comment": null}, "phone": {"type": "STRING", "index": 9, "name": "phone", "comment": null}, "account_state": {"type": "STRING", "index": 10, "name": "account_state", "comment": null}, "is_tax_exempt": {"type": "BOOL", "index": 11, "name": "is_tax_exempt", "comment": null}, "updated_timestamp": {"type": "TIMESTAMP", "index": 12, "name": "updated_timestamp", "comment": null}, "is_verified_email": {"type": "BOOL", "index": 13, "name": "is_verified_email", "comment": null}, "multipass_identifier": {"type": "STRING", "index": 14, "name": "multipass_identifier", "comment": null}, "source_relation": {"type": "STRING", "index": 15, "name": "source_relation", "comment": null}, "first_order_timestamp": {"type": "TIMESTAMP", "index": 16, "name": "first_order_timestamp", "comment": null}, "most_recent_order_timestamp": {"type": "TIMESTAMP", "index": 17, "name": "most_recent_order_timestamp", "comment": null}, "average_order_value": {"type": "FLOAT64", "index": 18, "name": "average_order_value", "comment": null}, "lifetime_total_spent": {"type": "FLOAT64", "index": 19, "name": "lifetime_total_spent", "comment": null}, "lifetime_total_refunded": {"type": "FLOAT64", "index": 20, "name": "lifetime_total_refunded", "comment": null}, "lifetime_total_amount": {"type": "FLOAT64", "index": 21, "name": "lifetime_total_amount", "comment": null}, "lifetime_count_orders": {"type": "INT64", "index": 22, "name": "lifetime_count_orders", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 26310655.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 185693.0, "include": true, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.shopify.shopify__customers"}, "model.shopify.shopify__transactions": {"metadata": {"type": "table", "schema": "dbt_transformations", "name": "shopify__transactions", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"transaction_id": {"type": "INT64", "index": 1, "name": "transaction_id", "comment": null}, "order_id": {"type": "INT64", "index": 2, "name": "order_id", "comment": null}, "refund_id": {"type": "INT64", "index": 3, "name": "refund_id", "comment": null}, "amount": {"type": "FLOAT64", "index": 4, "name": "amount", "comment": null}, "created_timestamp": {"type": "TIMESTAMP", "index": 5, "name": "created_timestamp", "comment": null}, "processed_timestamp": {"type": "TIMESTAMP", "index": 6, "name": "processed_timestamp", "comment": null}, "device_id": {"type": "STRING", "index": 7, "name": "device_id", "comment": null}, "gateway": {"type": "STRING", "index": 8, "name": "gateway", "comment": null}, "source_name": {"type": "STRING", "index": 9, "name": "source_name", "comment": null}, "message": {"type": "STRING", "index": 10, "name": "message", "comment": null}, "currency": {"type": "STRING", "index": 11, "name": "currency", "comment": null}, "location_id": {"type": "INT64", "index": 12, "name": "location_id", "comment": null}, "parent_id": {"type": "INT64", "index": 13, "name": "parent_id", "comment": null}, "payment_avs_result_code": {"type": "STRING", "index": 14, "name": "payment_avs_result_code", "comment": null}, "payment_credit_card_bin": {"type": "STRING", "index": 15, "name": "payment_credit_card_bin", "comment": null}, "payment_cvv_result_code": {"type": "STRING", "index": 16, "name": "payment_cvv_result_code", "comment": null}, "payment_credit_card_number": {"type": "STRING", "index": 17, "name": "payment_credit_card_number", "comment": null}, "payment_credit_card_company": {"type": "STRING", "index": 18, "name": "payment_credit_card_company", "comment": null}, "kind": {"type": "STRING", "index": 19, "name": "kind", "comment": null}, "receipt": {"type": "STRING", "index": 20, "name": "receipt", "comment": null}, "currency_exchange_id": {"type": "INT64", "index": 21, "name": "currency_exchange_id", "comment": null}, "currency_exchange_adjustment": {"type": "FLOAT64", "index": 22, "name": "currency_exchange_adjustment", "comment": null}, "currency_exchange_original_amount": {"type": "FLOAT64", "index": 23, "name": "currency_exchange_original_amount", "comment": null}, "currency_exchange_final_amount": {"type": "FLOAT64", "index": 24, "name": "currency_exchange_final_amount", "comment": null}, "currency_exchange_currency": {"type": "STRING", "index": 25, "name": "currency_exchange_currency", "comment": null}, "error_code": {"type": "STRING", "index": 26, "name": "error_code", "comment": null}, "status": {"type": "STRING", "index": 27, "name": "status", "comment": null}, "test": {"type": "BOOL", "index": 28, "name": "test", "comment": null}, "user_id": {"type": "STRING", "index": 29, "name": "user_id", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 30, "name": "_fivetran_synced", "comment": null}, "source_relation": {"type": "STRING", "index": 31, "name": "source_relation", "comment": null}, "exchange_rate": {"type": "NUMERIC", "index": 32, "name": "exchange_rate", "comment": null}, "currency_exchange_calculated_amount": {"type": "FLOAT64", "index": 33, "name": "currency_exchange_calculated_amount", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 998201545.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 529228.0, "include": true, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.shopify.shopify__transactions"}, "model.shopify.shopify__order_lines": {"metadata": {"type": "table", "schema": "dbt_transformations", "name": "shopify__order_lines", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"_fivetran_synced": {"type": "TIMESTAMP", "index": 1, "name": "_fivetran_synced", "comment": null}, "fulfillable_quantity": {"type": "FLOAT64", "index": 2, "name": "fulfillable_quantity", "comment": null}, "fulfillment_service": {"type": "STRING", "index": 3, "name": "fulfillment_service", "comment": null}, "fulfillment_status": {"type": "STRING", "index": 4, "name": "fulfillment_status", "comment": null}, "is_gift_card": {"type": "BOOL", "index": 5, "name": "is_gift_card", "comment": null}, "grams": {"type": "INT64", "index": 6, "name": "grams", "comment": null}, "order_line_id": {"type": "INT64", "index": 7, "name": "order_line_id", "comment": null}, "index": {"type": "INT64", "index": 8, "name": "index", "comment": null}, "name": {"type": "STRING", "index": 9, "name": "name", "comment": null}, "order_id": {"type": "INT64", "index": 10, "name": "order_id", "comment": null}, "pre_tax_price": {"type": "FLOAT64", "index": 11, "name": "pre_tax_price", "comment": null}, "price": {"type": "FLOAT64", "index": 12, "name": "price", "comment": null}, "product_id": {"type": "INT64", "index": 13, "name": "product_id", "comment": null}, "property_charge_interval_frequency": {"type": "NUMERIC", "index": 14, "name": "property_charge_interval_frequency", "comment": null}, "property_for_shipping_jan_3_rd_2020": {"type": "STRING", "index": 15, "name": "property_for_shipping_jan_3_rd_2020", "comment": null}, "property_shipping_interval_frequency": {"type": "NUMERIC", "index": 16, "name": "property_shipping_interval_frequency", "comment": null}, "property_shipping_interval_unit_type": {"type": "STRING", "index": 17, "name": "property_shipping_interval_unit_type", "comment": null}, "property_subscription_id": {"type": "NUMERIC", "index": 18, "name": "property_subscription_id", "comment": null}, "quantity": {"type": "FLOAT64", "index": 19, "name": "quantity", "comment": null}, "is_requiring_shipping": {"type": "BOOL", "index": 20, "name": "is_requiring_shipping", "comment": null}, "sku": {"type": "STRING", "index": 21, "name": "sku", "comment": null}, "is_taxable": {"type": "BOOL", "index": 22, "name": "is_taxable", "comment": null}, "title": {"type": "STRING", "index": 23, "name": "title", "comment": null}, "total_discount": {"type": "FLOAT64", "index": 24, "name": "total_discount", "comment": null}, "variant_id": {"type": "INT64", "index": 25, "name": "variant_id", "comment": null}, "vendor": {"type": "STRING", "index": 26, "name": "vendor", "comment": null}, "source_relation": {"type": "STRING", "index": 27, "name": "source_relation", "comment": null}, "refunded_quantity": {"type": "FLOAT64", "index": 28, "name": "refunded_quantity", "comment": null}, "refunded_subtotal": {"type": "FLOAT64", "index": 29, "name": "refunded_subtotal", "comment": null}, "quantity_net_refunds": {"type": "FLOAT64", "index": 30, "name": "quantity_net_refunds", "comment": null}, "subtotal_net_refunds": {"type": "FLOAT64", "index": 31, "name": "subtotal_net_refunds", "comment": null}, "variant_created_at": {"type": "TIMESTAMP", "index": 32, "name": "variant_created_at", "comment": null}, "variant_updated_at": {"type": "TIMESTAMP", "index": 33, "name": "variant_updated_at", "comment": null}, "inventory_item_id": {"type": "INT64", "index": 34, "name": "inventory_item_id", "comment": null}, "image_id": {"type": "INT64", "index": 35, "name": "image_id", "comment": null}, "variant_title": {"type": "STRING", "index": 36, "name": "variant_title", "comment": null}, "variant_price": {"type": "FLOAT64", "index": 37, "name": "variant_price", "comment": null}, "variant_sku": {"type": "STRING", "index": 38, "name": "variant_sku", "comment": null}, "variant_position": {"type": "INT64", "index": 39, "name": "variant_position", "comment": null}, "variant_inventory_policy": {"type": "STRING", "index": 40, "name": "variant_inventory_policy", "comment": null}, "variant_compare_at_price": {"type": "FLOAT64", "index": 41, "name": "variant_compare_at_price", "comment": null}, "variant_fulfillment_service": {"type": "STRING", "index": 42, "name": "variant_fulfillment_service", "comment": null}, "variant_inventory_management": {"type": "STRING", "index": 43, "name": "variant_inventory_management", "comment": null}, "variant_is_taxable": {"type": "BOOL", "index": 44, "name": "variant_is_taxable", "comment": null}, "variant_barcode": {"type": "STRING", "index": 45, "name": "variant_barcode", "comment": null}, "variant_grams": {"type": "FLOAT64", "index": 46, "name": "variant_grams", "comment": null}, "variant_inventory_quantity": {"type": "INT64", "index": 47, "name": "variant_inventory_quantity", "comment": null}, "variant_weight": {"type": "FLOAT64", "index": 48, "name": "variant_weight", "comment": null}, "variant_weight_unit": {"type": "STRING", "index": 49, "name": "variant_weight_unit", "comment": null}, "variant_option_1": {"type": "STRING", "index": 50, "name": "variant_option_1", "comment": null}, "variant_option_2": {"type": "STRING", "index": 51, "name": "variant_option_2", "comment": null}, "variant_option_3": {"type": "STRING", "index": 52, "name": "variant_option_3", "comment": null}, "variant_tax_code": {"type": "STRING", "index": 53, "name": "variant_tax_code", "comment": null}, "variant_is_requiring_shipping": {"type": "BOOL", "index": 54, "name": "variant_is_requiring_shipping", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 188928879.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 565854.0, "include": true, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.shopify.shopify__order_lines"}, "model.shopify.shopify__customer_cohorts": {"metadata": {"type": "table", "schema": "dbt_transformations", "name": "shopify__customer_cohorts", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"date_month": {"type": "DATETIME", "index": 1, "name": "date_month", "comment": null}, "customer_id": {"type": "INT64", "index": 2, "name": "customer_id", "comment": null}, "first_order_timestamp": {"type": "TIMESTAMP", "index": 3, "name": "first_order_timestamp", "comment": null}, "cohort_month": {"type": "TIMESTAMP", "index": 4, "name": "cohort_month", "comment": null}, "source_relation": {"type": "STRING", "index": 5, "name": "source_relation", "comment": null}, "order_count_in_month": {"type": "INT64", "index": 6, "name": "order_count_in_month", "comment": null}, "total_price_in_month": {"type": "FLOAT64", "index": 7, "name": "total_price_in_month", "comment": null}, "line_item_count_in_month": {"type": "INT64", "index": 8, "name": "line_item_count_in_month", "comment": null}, "total_price_lifetime": {"type": "FLOAT64", "index": 9, "name": "total_price_lifetime", "comment": null}, "order_count_lifetime": {"type": "INT64", "index": 10, "name": "order_count_lifetime", "comment": null}, "line_item_count_lifetime": {"type": "INT64", "index": 11, "name": "line_item_count_lifetime", "comment": null}, "cohort_month_number": {"type": "INT64", "index": 12, "name": "cohort_month_number", "comment": null}, "customer_cohort_id": {"type": "STRING", "index": 13, "name": "customer_cohort_id", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 333889096.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 2692654.0, "include": true, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.shopify.shopify__customer_cohorts"}, "model.shopify_holistic_reporting.shopify_holistic_reporting__customer_enhanced": {"metadata": {"type": "table", "schema": "dbt_transformations", "name": "shopify_holistic_reporting__customer_enhanced", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"email": {"type": "STRING", "index": 1, "name": "email", "comment": null}, "full_name": {"type": "STRING", "index": 2, "name": "full_name", "comment": null}, "shopify_customer_ids": {"type": "STRING", "index": 3, "name": "shopify_customer_ids", "comment": null}, "klaviyo_person_ids": {"type": "STRING", "index": 4, "name": "klaviyo_person_ids", "comment": null}, "phone_number": {"type": "STRING", "index": 5, "name": "phone_number", "comment": null}, "shopify_customer_first_created_at": {"type": "TIMESTAMP", "index": 6, "name": "shopify_customer_first_created_at", "comment": null}, "shopify_customer_last_created_at": {"type": "TIMESTAMP", "index": 7, "name": "shopify_customer_last_created_at", "comment": null}, "klaviyo_person_first_created_at": {"type": "TIMESTAMP", "index": 8, "name": "klaviyo_person_first_created_at", "comment": null}, "klaviyo_person_last_created_at": {"type": "TIMESTAMP", "index": 9, "name": "klaviyo_person_last_created_at", "comment": null}, "shopify_customer_last_updated_at": {"type": "TIMESTAMP", "index": 10, "name": "shopify_customer_last_updated_at", "comment": null}, "klaviyo_person_last_updated_at": {"type": "TIMESTAMP", "index": 11, "name": "klaviyo_person_last_updated_at", "comment": null}, "is_shopify_email_verified": {"type": "BOOL", "index": 12, "name": "is_shopify_email_verified", "comment": null}, "shopify_source_relation": {"type": "STRING", "index": 13, "name": "shopify_source_relation", "comment": null}, "shopify_first_order_at": {"type": "TIMESTAMP", "index": 14, "name": "shopify_first_order_at", "comment": null}, "shopify_last_order_at": {"type": "TIMESTAMP", "index": 15, "name": "shopify_last_order_at", "comment": null}, "shopify_lifetime_total_spent": {"type": "FLOAT64", "index": 16, "name": "shopify_lifetime_total_spent", "comment": null}, "shopify_lifetime_total_refunded": {"type": "FLOAT64", "index": 17, "name": "shopify_lifetime_total_refunded", "comment": null}, "shopify_lifetime_total_amount": {"type": "FLOAT64", "index": 18, "name": "shopify_lifetime_total_amount", "comment": null}, "shopify_lifetime_count_orders": {"type": "INT64", "index": 19, "name": "shopify_lifetime_count_orders", "comment": null}, "shopify_average_order_value": {"type": "FLOAT64", "index": 20, "name": "shopify_average_order_value", "comment": null}, "shopify_has_accepted_marketing": {"type": "BOOL", "index": 21, "name": "shopify_has_accepted_marketing", "comment": null}, "shopify_is_tax_exempt": {"type": "BOOL", "index": 22, "name": "shopify_is_tax_exempt", "comment": null}, "shopify_default_address_id": {"type": "INT64", "index": 23, "name": "shopify_default_address_id", "comment": null}, "shopify_account_state": {"type": "STRING", "index": 24, "name": "shopify_account_state", "comment": null}, "shopify_multipass_identifier": {"type": "STRING", "index": 25, "name": "shopify_multipass_identifier", "comment": null}, "klaviyo_source_relation": {"type": "STRING", "index": 26, "name": "klaviyo_source_relation", "comment": null}, "klaviyo_first_event_at": {"type": "TIMESTAMP", "index": 27, "name": "klaviyo_first_event_at", "comment": null}, "klaviyo_last_event_at": {"type": "TIMESTAMP", "index": 28, "name": "klaviyo_last_event_at", "comment": null}, "klaviyo_first_campaign_touch_at": {"type": "TIMESTAMP", "index": 29, "name": "klaviyo_first_campaign_touch_at", "comment": null}, "klaviyo_last_campaign_touch_at": {"type": "TIMESTAMP", "index": 30, "name": "klaviyo_last_campaign_touch_at", "comment": null}, "klaviyo_first_flow_touch_at": {"type": "TIMESTAMP", "index": 31, "name": "klaviyo_first_flow_touch_at", "comment": null}, "klaviyo_last_flow_touch_at": {"type": "TIMESTAMP", "index": 32, "name": "klaviyo_last_flow_touch_at", "comment": null}, "klaviyo_count_total_campaigns": {"type": "INT64", "index": 33, "name": "klaviyo_count_total_campaigns", "comment": null}, "klaviyo_count_total_flows": {"type": "INT64", "index": 34, "name": "klaviyo_count_total_flows", "comment": null}, "klaviyo_address_1": {"type": "STRING", "index": 35, "name": "klaviyo_address_1", "comment": null}, "klaviyo_address_2": {"type": "STRING", "index": 36, "name": "klaviyo_address_2", "comment": null}, "klaviyo_city": {"type": "STRING", "index": 37, "name": "klaviyo_city", "comment": null}, "klaviyo_country": {"type": "STRING", "index": 38, "name": "klaviyo_country", "comment": null}, "klaviyo_zip": {"type": "STRING", "index": 39, "name": "klaviyo_zip", "comment": null}, "klaviyo_latitude": {"type": "FLOAT64", "index": 40, "name": "klaviyo_latitude", "comment": null}, "klaviyo_longitude": {"type": "FLOAT64", "index": 41, "name": "klaviyo_longitude", "comment": null}, "klaviyo_organization": {"type": "STRING", "index": 42, "name": "klaviyo_organization", "comment": null}, "klaviyo_region": {"type": "STRING", "index": 43, "name": "klaviyo_region", "comment": null}, "klaviyo_timezone": {"type": "STRING", "index": 44, "name": "klaviyo_timezone", "comment": null}, "klaviyo_title": {"type": "STRING", "index": 45, "name": "klaviyo_title", "comment": null}, "klaviyo_total_sum_revenue_refunded_order": {"type": "FLOAT64", "index": 46, "name": "klaviyo_total_sum_revenue_refunded_order", "comment": null}, "klaviyo_organic_sum_revenue_refunded_order": {"type": "FLOAT64", "index": 47, "name": "klaviyo_organic_sum_revenue_refunded_order", "comment": null}, "klaviyo_total_sum_revenue_placed_order": {"type": "FLOAT64", "index": 48, "name": "klaviyo_total_sum_revenue_placed_order", "comment": null}, "klaviyo_organic_sum_revenue_placed_order": {"type": "FLOAT64", "index": 49, "name": "klaviyo_organic_sum_revenue_placed_order", "comment": null}, "klaviyo_total_sum_revenue_ordered_product": {"type": "FLOAT64", "index": 50, "name": "klaviyo_total_sum_revenue_ordered_product", "comment": null}, "klaviyo_organic_sum_revenue_ordered_product": {"type": "FLOAT64", "index": 51, "name": "klaviyo_organic_sum_revenue_ordered_product", "comment": null}, "klaviyo_total_sum_revenue_checkout_started": {"type": "FLOAT64", "index": 52, "name": "klaviyo_total_sum_revenue_checkout_started", "comment": null}, "klaviyo_organic_sum_revenue_checkout_started": {"type": "FLOAT64", "index": 53, "name": "klaviyo_organic_sum_revenue_checkout_started", "comment": null}, "klaviyo_total_sum_revenue_cancelled_order": {"type": "FLOAT64", "index": 54, "name": "klaviyo_total_sum_revenue_cancelled_order", "comment": null}, "klaviyo_organic_sum_revenue_cancelled_order": {"type": "FLOAT64", "index": 55, "name": "klaviyo_organic_sum_revenue_cancelled_order", "comment": null}, "klaviyo_total_count_active_on_site": {"type": "INT64", "index": 56, "name": "klaviyo_total_count_active_on_site", "comment": null}, "klaviyo_total_count_viewed_product": {"type": "INT64", "index": 57, "name": "klaviyo_total_count_viewed_product", "comment": null}, "klaviyo_total_count_ordered_product": {"type": "INT64", "index": 58, "name": "klaviyo_total_count_ordered_product", "comment": null}, "klaviyo_total_count_placed_order": {"type": "INT64", "index": 59, "name": "klaviyo_total_count_placed_order", "comment": null}, "klaviyo_total_count_refunded_order": {"type": "INT64", "index": 60, "name": "klaviyo_total_count_refunded_order", "comment": null}, "klaviyo_total_count_received_email": {"type": "INT64", "index": 61, "name": "klaviyo_total_count_received_email", "comment": null}, "klaviyo_total_count_clicked_email": {"type": "INT64", "index": 62, "name": "klaviyo_total_count_clicked_email", "comment": null}, "klaviyo_total_count_opened_email": {"type": "INT64", "index": 63, "name": "klaviyo_total_count_opened_email", "comment": null}, "klaviyo_total_count_marked_email_as_spam": {"type": "INT64", "index": 64, "name": "klaviyo_total_count_marked_email_as_spam", "comment": null}, "klaviyo_total_count_unsubscribed": {"type": "INT64", "index": 65, "name": "klaviyo_total_count_unsubscribed", "comment": null}, "klaviyo_total_count_received_sms": {"type": "INT64", "index": 66, "name": "klaviyo_total_count_received_sms", "comment": null}, "klaviyo_total_count_clicked_sms": {"type": "INT64", "index": 67, "name": "klaviyo_total_count_clicked_sms", "comment": null}, "klaviyo_total_count_sent_sms": {"type": "INT64", "index": 68, "name": "klaviyo_total_count_sent_sms", "comment": null}, "klaviyo_total_count_unsubscribed_from_sms": {"type": "INT64", "index": 69, "name": "klaviyo_total_count_unsubscribed_from_sms", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 180351334.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 402715.0, "include": true, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.shopify_holistic_reporting.shopify_holistic_reporting__customer_enhanced"}, "model.shopify_holistic_reporting.shopify_holistic_reporting__orders_attribution": {"metadata": {"type": "table", "schema": "dbt_transformations", "name": "shopify_holistic_reporting__orders_attribution", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"_fivetran_synced": {"type": "TIMESTAMP", "index": 1, "name": "_fivetran_synced", "comment": null}, "billing_address_address_1": {"type": "STRING", "index": 2, "name": "billing_address_address_1", "comment": null}, "billing_address_address_2": {"type": "STRING", "index": 3, "name": "billing_address_address_2", "comment": null}, "billing_address_city": {"type": "STRING", "index": 4, "name": "billing_address_city", "comment": null}, "billing_address_company": {"type": "STRING", "index": 5, "name": "billing_address_company", "comment": null}, "billing_address_country": {"type": "STRING", "index": 6, "name": "billing_address_country", "comment": null}, "billing_address_country_code": {"type": "STRING", "index": 7, "name": "billing_address_country_code", "comment": null}, "billing_address_first_name": {"type": "STRING", "index": 8, "name": "billing_address_first_name", "comment": null}, "billing_address_last_name": {"type": "STRING", "index": 9, "name": "billing_address_last_name", "comment": null}, "billing_address_latitude": {"type": "STRING", "index": 10, "name": "billing_address_latitude", "comment": null}, "billing_address_longitude": {"type": "STRING", "index": 11, "name": "billing_address_longitude", "comment": null}, "billing_address_name": {"type": "STRING", "index": 12, "name": "billing_address_name", "comment": null}, "billing_address_phone": {"type": "STRING", "index": 13, "name": "billing_address_phone", "comment": null}, "billing_address_province": {"type": "STRING", "index": 14, "name": "billing_address_province", "comment": null}, "billing_address_province_code": {"type": "STRING", "index": 15, "name": "billing_address_province_code", "comment": null}, "billing_address_zip": {"type": "STRING", "index": 16, "name": "billing_address_zip", "comment": null}, "browser_ip": {"type": "STRING", "index": 17, "name": "browser_ip", "comment": null}, "has_buyer_accepted_marketing": {"type": "BOOL", "index": 18, "name": "has_buyer_accepted_marketing", "comment": null}, "cancel_reason": {"type": "STRING", "index": 19, "name": "cancel_reason", "comment": null}, "cancelled_timestamp": {"type": "TIMESTAMP", "index": 20, "name": "cancelled_timestamp", "comment": null}, "cart_token": {"type": "STRING", "index": 21, "name": "cart_token", "comment": null}, "checkout_token": {"type": "STRING", "index": 22, "name": "checkout_token", "comment": null}, "closed_timestamp": {"type": "TIMESTAMP", "index": 23, "name": "closed_timestamp", "comment": null}, "created_timestamp": {"type": "TIMESTAMP", "index": 24, "name": "created_timestamp", "comment": null}, "currency": {"type": "STRING", "index": 25, "name": "currency", "comment": null}, "customer_id": {"type": "INT64", "index": 26, "name": "customer_id", "comment": null}, "email": {"type": "STRING", "index": 27, "name": "email", "comment": null}, "financial_status": {"type": "STRING", "index": 28, "name": "financial_status", "comment": null}, "fulfillment_status": {"type": "STRING", "index": 29, "name": "fulfillment_status", "comment": null}, "order_id": {"type": "INT64", "index": 30, "name": "order_id", "comment": null}, "landing_site_base_url": {"type": "STRING", "index": 31, "name": "landing_site_base_url", "comment": null}, "location_id": {"type": "INT64", "index": 32, "name": "location_id", "comment": null}, "name": {"type": "STRING", "index": 33, "name": "name", "comment": null}, "note": {"type": "STRING", "index": 34, "name": "note", "comment": null}, "number": {"type": "INT64", "index": 35, "name": "number", "comment": null}, "order_number": {"type": "INT64", "index": 36, "name": "order_number", "comment": null}, "processed_timestamp": {"type": "TIMESTAMP", "index": 37, "name": "processed_timestamp", "comment": null}, "processing_method": {"type": "STRING", "index": 38, "name": "processing_method", "comment": null}, "referring_site": {"type": "STRING", "index": 39, "name": "referring_site", "comment": null}, "total_shipping_price_set": {"type": "STRING", "index": 40, "name": "total_shipping_price_set", "comment": null}, "shipping_address_address_1": {"type": "STRING", "index": 41, "name": "shipping_address_address_1", "comment": null}, "shipping_address_address_2": {"type": "STRING", "index": 42, "name": "shipping_address_address_2", "comment": null}, "shipping_address_city": {"type": "STRING", "index": 43, "name": "shipping_address_city", "comment": null}, "shipping_address_company": {"type": "STRING", "index": 44, "name": "shipping_address_company", "comment": null}, "shipping_address_country": {"type": "STRING", "index": 45, "name": "shipping_address_country", "comment": null}, "shipping_address_country_code": {"type": "STRING", "index": 46, "name": "shipping_address_country_code", "comment": null}, "shipping_address_first_name": {"type": "STRING", "index": 47, "name": "shipping_address_first_name", "comment": null}, "shipping_address_last_name": {"type": "STRING", "index": 48, "name": "shipping_address_last_name", "comment": null}, "shipping_address_latitude": {"type": "STRING", "index": 49, "name": "shipping_address_latitude", "comment": null}, "shipping_address_longitude": {"type": "STRING", "index": 50, "name": "shipping_address_longitude", "comment": null}, "shipping_address_name": {"type": "STRING", "index": 51, "name": "shipping_address_name", "comment": null}, "shipping_address_phone": {"type": "STRING", "index": 52, "name": "shipping_address_phone", "comment": null}, "shipping_address_province": {"type": "STRING", "index": 53, "name": "shipping_address_province", "comment": null}, "shipping_address_province_code": {"type": "STRING", "index": 54, "name": "shipping_address_province_code", "comment": null}, "shipping_address_zip": {"type": "STRING", "index": 55, "name": "shipping_address_zip", "comment": null}, "source_name": {"type": "STRING", "index": 56, "name": "source_name", "comment": null}, "subtotal_price": {"type": "FLOAT64", "index": 57, "name": "subtotal_price", "comment": null}, "has_taxes_included": {"type": "BOOL", "index": 58, "name": "has_taxes_included", "comment": null}, "is_test_order": {"type": "BOOL", "index": 59, "name": "is_test_order", "comment": null}, "token": {"type": "STRING", "index": 60, "name": "token", "comment": null}, "total_discounts": {"type": "FLOAT64", "index": 61, "name": "total_discounts", "comment": null}, "total_line_items_price": {"type": "FLOAT64", "index": 62, "name": "total_line_items_price", "comment": null}, "total_price": {"type": "FLOAT64", "index": 63, "name": "total_price", "comment": null}, "total_tax": {"type": "FLOAT64", "index": 64, "name": "total_tax", "comment": null}, "total_weight": {"type": "INT64", "index": 65, "name": "total_weight", "comment": null}, "updated_timestamp": {"type": "TIMESTAMP", "index": 66, "name": "updated_timestamp", "comment": null}, "user_id": {"type": "INT64", "index": 67, "name": "user_id", "comment": null}, "shipping_cost": {"type": "FLOAT64", "index": 68, "name": "shipping_cost", "comment": null}, "order_adjustment_amount": {"type": "FLOAT64", "index": 69, "name": "order_adjustment_amount", "comment": null}, "order_adjustment_tax_amount": {"type": "FLOAT64", "index": 70, "name": "order_adjustment_tax_amount", "comment": null}, "refund_subtotal": {"type": "FLOAT64", "index": 71, "name": "refund_subtotal", "comment": null}, "refund_total_tax": {"type": "FLOAT64", "index": 72, "name": "refund_total_tax", "comment": null}, "order_adjusted_total": {"type": "FLOAT64", "index": 73, "name": "order_adjusted_total", "comment": null}, "line_item_count": {"type": "INT64", "index": 74, "name": "line_item_count", "comment": null}, "customer_order_seq_number": {"type": "INT64", "index": 75, "name": "customer_order_seq_number", "comment": null}, "new_vs_repeat": {"type": "STRING", "index": 76, "name": "new_vs_repeat", "comment": null}, "is_attributed": {"type": "BOOL", "index": 77, "name": "is_attributed", "comment": null}, "last_touch_campaign_id": {"type": "STRING", "index": 78, "name": "last_touch_campaign_id", "comment": null}, "last_touch_flow_id": {"type": "STRING", "index": 79, "name": "last_touch_flow_id", "comment": null}, "last_touch_variation_id": {"type": "STRING", "index": 80, "name": "last_touch_variation_id", "comment": null}, "last_touch_campaign_name": {"type": "STRING", "index": 81, "name": "last_touch_campaign_name", "comment": null}, "last_touch_campaign_subject_line": {"type": "STRING", "index": 82, "name": "last_touch_campaign_subject_line", "comment": null}, "last_touch_campaign_type": {"type": "STRING", "index": 83, "name": "last_touch_campaign_type", "comment": null}, "last_touch_flow_name": {"type": "STRING", "index": 84, "name": "last_touch_flow_name", "comment": null}, "count_interactions_with_campaign": {"type": "INT64", "index": 85, "name": "count_interactions_with_campaign", "comment": null}, "count_interactions_with_flow": {"type": "INT64", "index": 86, "name": "count_interactions_with_flow", "comment": null}, "last_touch_event_id": {"type": "STRING", "index": 87, "name": "last_touch_event_id", "comment": null}, "last_touch_event_occurred_at": {"type": "TIMESTAMP", "index": 88, "name": "last_touch_event_occurred_at", "comment": null}, "last_touch_event_type": {"type": "STRING", "index": 89, "name": "last_touch_event_type", "comment": null}, "last_touch_integration_name": {"type": "STRING", "index": 90, "name": "last_touch_integration_name", "comment": null}, "last_touch_integration_category": {"type": "STRING", "index": 91, "name": "last_touch_integration_category", "comment": null}, "shopify_source_relation": {"type": "STRING", "index": 92, "name": "shopify_source_relation", "comment": null}, "klaviyo_source_relation": {"type": "STRING", "index": 93, "name": "klaviyo_source_relation", "comment": null}, "unique_order_key": {"type": "STRING", "index": 94, "name": "unique_order_key", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 260386421.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 325105.0, "include": true, "description": "Approximate count of rows in this table"}, "partitioning_type": {"id": "partitioning_type", "label": "Partitioned By", "value": "created_timestamp", "include": true, "description": "The partitioning column for this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.shopify_holistic_reporting.shopify_holistic_reporting__orders_attribution"}, "model.shopify_holistic_reporting.int__daily_shopify_customer_orders": {"metadata": {"type": "table", "schema": "dbt_transformations", "name": "int__daily_shopify_customer_orders", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"date_day": {"type": "DATE", "index": 1, "name": "date_day", "comment": null}, "email": {"type": "STRING", "index": 2, "name": "email", "comment": null}, "last_touch_campaign_id": {"type": "STRING", "index": 3, "name": "last_touch_campaign_id", "comment": null}, "last_touch_flow_id": {"type": "STRING", "index": 4, "name": "last_touch_flow_id", "comment": null}, "campaign_name": {"type": "STRING", "index": 5, "name": "campaign_name", "comment": null}, "flow_name": {"type": "STRING", "index": 6, "name": "flow_name", "comment": null}, "variation_id": {"type": "STRING", "index": 7, "name": "variation_id", "comment": null}, "campaign_subject_line": {"type": "STRING", "index": 8, "name": "campaign_subject_line", "comment": null}, "campaign_type": {"type": "STRING", "index": 9, "name": "campaign_type", "comment": null}, "source_relation": {"type": "STRING", "index": 10, "name": "source_relation", "comment": null}, "total_orders": {"type": "INT64", "index": 11, "name": "total_orders", "comment": null}, "total_price": {"type": "FLOAT64", "index": 12, "name": "total_price", "comment": null}, "count_line_items": {"type": "INT64", "index": 13, "name": "count_line_items", "comment": null}, "total_line_items_price": {"type": "FLOAT64", "index": 14, "name": "total_line_items_price", "comment": null}, "total_discounts": {"type": "FLOAT64", "index": 15, "name": "total_discounts", "comment": null}, "total_tax": {"type": "FLOAT64", "index": 16, "name": "total_tax", "comment": null}, "total_shipping_cost": {"type": "FLOAT64", "index": 17, "name": "total_shipping_cost", "comment": null}, "total_refund_subtotal": {"type": "FLOAT64", "index": 18, "name": "total_refund_subtotal", "comment": null}, "total_refund_tax": {"type": "FLOAT64", "index": 19, "name": "total_refund_tax", "comment": null}, "count_cancelled_orders": {"type": "INT64", "index": 20, "name": "count_cancelled_orders", "comment": null}, "count_products": {"type": "INT64", "index": 21, "name": "count_products", "comment": null}, "count_product_variants": {"type": "INT64", "index": 22, "name": "count_product_variants", "comment": null}, "sum_quantity": {"type": "FLOAT64", "index": 23, "name": "sum_quantity", "comment": null}, "total_order_adjustment_amount": {"type": "FLOAT64", "index": 24, "name": "total_order_adjustment_amount", "comment": null}, "total_order_adjustment_tax_amount": {"type": "FLOAT64", "index": 25, "name": "total_order_adjustment_tax_amount", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 42218141.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 274937.0, "include": true, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.shopify_holistic_reporting.int__daily_shopify_customer_orders"}, "model.shopify_holistic_reporting.int__shopify_customer_rollup": {"metadata": {"type": "table", "schema": "dbt_transformations", "name": "int__shopify_customer_rollup", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"email": {"type": "STRING", "index": 1, "name": "email", "comment": null}, "source_relation": {"type": "STRING", "index": 2, "name": "source_relation", "comment": null}, "customer_ids": {"type": "STRING", "index": 3, "name": "customer_ids", "comment": null}, "phone_numbers": {"type": "STRING", "index": 4, "name": "phone_numbers", "comment": null}, "full_name": {"type": "STRING", "index": 5, "name": "full_name", "comment": null}, "first_shopify_account_made_at": {"type": "TIMESTAMP", "index": 6, "name": "first_shopify_account_made_at", "comment": null}, "last_shopify_account_made_at": {"type": "TIMESTAMP", "index": 7, "name": "last_shopify_account_made_at", "comment": null}, "first_order_at": {"type": "TIMESTAMP", "index": 8, "name": "first_order_at", "comment": null}, "last_order_at": {"type": "TIMESTAMP", "index": 9, "name": "last_order_at", "comment": null}, "last_updated_at": {"type": "TIMESTAMP", "index": 10, "name": "last_updated_at", "comment": null}, "lifetime_total_spent": {"type": "FLOAT64", "index": 11, "name": "lifetime_total_spent", "comment": null}, "lifetime_total_refunded": {"type": "FLOAT64", "index": 12, "name": "lifetime_total_refunded", "comment": null}, "lifetime_total_amount": {"type": "FLOAT64", "index": 13, "name": "lifetime_total_amount", "comment": null}, "lifetime_count_orders": {"type": "INT64", "index": 14, "name": "lifetime_count_orders", "comment": null}, "average_order_value": {"type": "FLOAT64", "index": 15, "name": "average_order_value", "comment": null}, "has_accepted_marketing": {"type": "BOOL", "index": 16, "name": "has_accepted_marketing", "comment": null}, "is_tax_exempt": {"type": "BOOL", "index": 17, "name": "is_tax_exempt", "comment": null}, "is_verified_email": {"type": "BOOL", "index": 18, "name": "is_verified_email", "comment": null}, "default_address_id": {"type": "INT64", "index": 19, "name": "default_address_id", "comment": null}, "account_state": {"type": "STRING", "index": 20, "name": "account_state", "comment": null}, "multipass_identifier": {"type": "STRING", "index": 21, "name": "multipass_identifier", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 27166543.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 183448.0, "include": true, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.shopify_holistic_reporting.int__shopify_customer_rollup"}}, "sources": {"source.klaviyo_source.klaviyo.integration": {"metadata": {"type": "table", "schema": "klaviyo", "name": "integration", "database": "fivetran-db", "comment": null, "owner": null}, "columns": {"id": {"type": "STRING", "index": 1, "name": "id", "comment": null}, "_fivetran_deleted": {"type": "BOOL", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 3, "name": "_fivetran_synced", "comment": null}, "category": {"type": "STRING", "index": 4, "name": "category", "comment": null}, "name": {"type": "STRING", "index": 5, "name": "name", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 202.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 5.0, "include": true, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.klaviyo_source.klaviyo.integration"}, "source.klaviyo_source.klaviyo.person": {"metadata": {"type": "table", "schema": "klaviyo", "name": "person", "database": "fivetran-db", "comment": null, "owner": null}, "columns": {"id": {"type": "STRING", "index": 1, "name": "id", "comment": null}, "_fivetran_deleted": {"type": "BOOL", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 3, "name": "_fivetran_synced", "comment": null}, "address_1": {"type": "STRING", "index": 4, "name": "address_1", "comment": null}, "address_2": {"type": "STRING", "index": 5, "name": "address_2", "comment": null}, "city": {"type": "STRING", "index": 6, "name": "city", "comment": null}, "country": {"type": "STRING", "index": 7, "name": "country", "comment": null}, "created": {"type": "TIMESTAMP", "index": 8, "name": "created", "comment": null}, "custom_accepts_marketing": {"type": "BOOL", "index": 9, "name": "custom_accepts_marketing", "comment": null}, "custom_adset_name": {"type": "STRING", "index": 10, "name": "custom_adset_name", "comment": null}, "custom_birthday": {"type": "STRING", "index": 11, "name": "custom_birthday", "comment": null}, "custom_consent": {"type": "STRING", "index": 12, "name": "custom_consent", "comment": null}, "custom_consent_form_id": {"type": "STRING", "index": 13, "name": "custom_consent_form_id", "comment": null}, "custom_consent_form_version": {"type": "INT64", "index": 14, "name": "custom_consent_form_version", "comment": null}, "custom_consent_method": {"type": "STRING", "index": 15, "name": "custom_consent_method", "comment": null}, "custom_consent_timestamp": {"type": "STRING", "index": 16, "name": "custom_consent_timestamp", "comment": null}, "custom_email": {"type": "STRING", "index": 17, "name": "custom_email", "comment": null}, "custom_expected_date_of_next_order": {"type": "STRING", "index": 18, "name": "custom_expected_date_of_next_order", "comment": null}, "custom_facebook": {"type": "BOOL", "index": 19, "name": "custom_facebook", "comment": null}, "custom_first_purchase_date": {"type": "DATE", "index": 20, "name": "custom_first_purchase_date", "comment": null}, "custom_object": {"type": "STRING", "index": 21, "name": "custom_object", "comment": null}, "custom_shopify_tags": {"type": "STRING", "index": 22, "name": "custom_shopify_tags", "comment": null}, "custom_source": {"type": "STRING", "index": 23, "name": "custom_source", "comment": null}, "custom_welcome_series": {"type": "BOOL", "index": 24, "name": "custom_welcome_series", "comment": null}, "email": {"type": "STRING", "index": 25, "name": "email", "comment": null}, "first_name": {"type": "STRING", "index": 26, "name": "first_name", "comment": null}, "last_name": {"type": "STRING", "index": 27, "name": "last_name", "comment": null}, "latitude": {"type": "FLOAT64", "index": 28, "name": "latitude", "comment": null}, "longitude": {"type": "FLOAT64", "index": 29, "name": "longitude", "comment": null}, "organization": {"type": "STRING", "index": 30, "name": "organization", "comment": null}, "phone_number": {"type": "STRING", "index": 31, "name": "phone_number", "comment": null}, "region": {"type": "STRING", "index": 32, "name": "region", "comment": null}, "timezone": {"type": "STRING", "index": 33, "name": "timezone", "comment": null}, "title": {"type": "STRING", "index": 34, "name": "title", "comment": null}, "updated": {"type": "TIMESTAMP", "index": 35, "name": "updated", "comment": null}, "zip": {"type": "STRING", "index": 36, "name": "zip", "comment": null}, "custom_children_birthday": {"type": "STRING", "index": 37, "name": "custom_children_birthday", "comment": null}, "custom_children_gender": {"type": "STRING", "index": 38, "name": "custom_children_gender", "comment": null}, "custom_due_date": {"type": "STRING", "index": 39, "name": "custom_due_date", "comment": null}, "custom_first_purchase_type": {"type": "STRING", "index": 40, "name": "custom_first_purchase_type", "comment": null}, "custom_number_of_children": {"type": "INT64", "index": 41, "name": "custom_number_of_children", "comment": null}, "custom_oldest_child_dow": {"type": "STRING", "index": 42, "name": "custom_oldest_child_dow", "comment": null}, "custom_status": {"type": "STRING", "index": 43, "name": "custom_status", "comment": null}, "custom_work": {"type": "STRING", "index": 44, "name": "custom_work", "comment": null}, "custom_zip": {"type": "STRING", "index": 45, "name": "custom_zip", "comment": null}, "custom_unengaged": {"type": "BOOL", "index": 46, "name": "custom_unengaged", "comment": null}, "custom_coupon": {"type": "STRING", "index": 47, "name": "custom_coupon", "comment": null}, "custom_sms_attentive_signup": {"type": "BOOL", "index": 48, "name": "custom_sms_attentive_signup", "comment": null}, "custom_time_stamp": {"type": "STRING", "index": 49, "name": "custom_time_stamp", "comment": null}, "custom_url": {"type": "STRING", "index": 50, "name": "custom_url", "comment": null}, "custom_id": {"type": "STRING", "index": 51, "name": "custom_id", "comment": null}, "custom_total_emails_opened": {"type": "INT64", "index": 52, "name": "custom_total_emails_opened", "comment": null}, "custom_total_emails_opened_ever": {"type": "INT64", "index": 53, "name": "custom_total_emails_opened_ever", "comment": null}, "custom_last_1_day_in_store_purchasers": {"type": "BOOL", "index": 54, "name": "custom_last_1_day_in_store_purchasers", "comment": null}, "custom_store_purchasers_test": {"type": "BOOL", "index": 55, "name": "custom_store_purchasers_test", "comment": null}, "custom_test_audience_klaviyo": {"type": "BOOL", "index": 56, "name": "custom_test_audience_klaviyo", "comment": null}, "custom_in_store_purchasers_from_2021_02_09": {"type": "BOOL", "index": 57, "name": "custom_in_store_purchasers_from_2021_02_09", "comment": null}, "custom_melrose_store_customers": {"type": "BOOL", "index": 58, "name": "custom_melrose_store_customers", "comment": null}, "custom_manhasset_store_customers": {"type": "BOOL", "index": 59, "name": "custom_manhasset_store_customers", "comment": null}, "custom_madison_ave_store_customers": {"type": "BOOL", "index": 60, "name": "custom_madison_ave_store_customers", "comment": null}, "custom_dallas_store_customers": {"type": "BOOL", "index": 61, "name": "custom_dallas_store_customers", "comment": null}, "custom_georgetown_store_customers": {"type": "BOOL", "index": 62, "name": "custom_georgetown_store_customers", "comment": null}, "custom_unique_list_product_category_purchased": {"type": "STRING", "index": 63, "name": "custom_unique_list_product_category_purchased", "comment": null}, "custom_most_frequent_product_category_purchased": {"type": "STRING", "index": 64, "name": "custom_most_frequent_product_category_purchased", "comment": null}, "custom_fillmore_store_customers": {"type": "BOOL", "index": 65, "name": "custom_fillmore_store_customers", "comment": null}, "custom_bal_harbour_store_customers": {"type": "BOOL", "index": 66, "name": "custom_bal_harbour_store_customers", "comment": null}, "custom_boston_store_customers": {"type": "BOOL", "index": 67, "name": "custom_boston_store_customers", "comment": null}, "custom_soho_store_customers": {"type": "BOOL", "index": 68, "name": "custom_soho_store_customers", "comment": null}, "custom_houston_store_customers": {"type": "BOOL", "index": 69, "name": "custom_houston_store_customers", "comment": null}, "custom_pacific_palisades_store_customers": {"type": "BOOL", "index": 70, "name": "custom_pacific_palisades_store_customers", "comment": null}, "custom_nantucket_store_customers": {"type": "BOOL", "index": 71, "name": "custom_nantucket_store_customers", "comment": null}, "custom_greenwich_store_customers": {"type": "BOOL", "index": 72, "name": "custom_greenwich_store_customers", "comment": null}, "custom_last_utm_medium": {"type": "STRING", "index": 73, "name": "custom_last_utm_medium", "comment": null}, "custom_last_order_timestamp": {"type": "TIMESTAMP", "index": 74, "name": "custom_last_order_timestamp", "comment": null}, "custom_first_utm_source": {"type": "STRING", "index": 75, "name": "custom_first_utm_source", "comment": null}, "custom_first_utm_medium": {"type": "STRING", "index": 76, "name": "custom_first_utm_medium", "comment": null}, "custom_first_order_timestamp": {"type": "TIMESTAMP", "index": 77, "name": "custom_first_order_timestamp", "comment": null}, "custom_last_website_page_viewed_timestamp": {"type": "TIMESTAMP", "index": 78, "name": "custom_last_website_page_viewed_timestamp", "comment": null}, "custom_top_20_k_spenders_all_time": {"type": "BOOL", "index": 79, "name": "custom_top_20_k_spenders_all_time", "comment": null}, "custom_net_sales": {"type": "INT64", "index": 80, "name": "custom_net_sales", "comment": null}, "custom_last_ecom_order_timestamp": {"type": "TIMESTAMP", "index": 81, "name": "custom_last_ecom_order_timestamp", "comment": null}, "custom_top_10_k_spenders_all_time": {"type": "BOOL", "index": 82, "name": "custom_top_10_k_spenders_all_time", "comment": null}, "custom_unique_list_store_s_purchased": {"type": "STRING", "index": 83, "name": "custom_unique_list_store_s_purchased", "comment": null}, "custom_last_in_store_order_timestamp": {"type": "TIMESTAMP", "index": 84, "name": "custom_last_in_store_order_timestamp", "comment": null}, "custom_lapsed_in_store_customers": {"type": "BOOL", "index": 85, "name": "custom_lapsed_in_store_customers", "comment": null}, "custom_segment_database_of_emails": {"type": "BOOL", "index": 86, "name": "custom_segment_database_of_emails", "comment": null}, "custom_in_store_purchasers": {"type": "BOOL", "index": 87, "name": "custom_in_store_purchasers", "comment": null}, "custom_top_10_k_ecom_only_spenders_all_time": {"type": "BOOL", "index": 88, "name": "custom_top_10_k_ecom_only_spenders_all_time", "comment": null}, "custom_lifetime_net_revenue": {"type": "INT64", "index": 89, "name": "custom_lifetime_net_revenue", "comment": null}, "custom_dw_ecom_recency_decile": {"type": "INT64", "index": 90, "name": "custom_dw_ecom_recency_decile", "comment": null}, "custom_dw_first_acquisition_type": {"type": "STRING", "index": 91, "name": "custom_dw_first_acquisition_type", "comment": null}, "custom_dw_last_purchase": {"type": "TIMESTAMP", "index": 92, "name": "custom_dw_last_purchase", "comment": null}, "custom_dw_total_transactions": {"type": "INT64", "index": 93, "name": "custom_dw_total_transactions", "comment": null}, "custom_dw_retail_recency_decile": {"type": "INT64", "index": 94, "name": "custom_dw_retail_recency_decile", "comment": null}, "custom_dw_net_quantity": {"type": "INT64", "index": 95, "name": "custom_dw_net_quantity", "comment": null}, "custom_dw_ecom_net_quantity": {"type": "INT64", "index": 96, "name": "custom_dw_ecom_net_quantity", "comment": null}, "custom_dw_last_ecom_purchase": {"type": "TIMESTAMP", "index": 97, "name": "custom_dw_last_ecom_purchase", "comment": null}, "custom_dw_retail_orders": {"type": "INT64", "index": 98, "name": "custom_dw_retail_orders", "comment": null}, "custom_dw_shopper_type": {"type": "STRING", "index": 99, "name": "custom_dw_shopper_type", "comment": null}, "custom_dw_retail_net_rev_decile": {"type": "INT64", "index": 100, "name": "custom_dw_retail_net_rev_decile", "comment": null}, "custom_dw_recency_decile": {"type": "INT64", "index": 101, "name": "custom_dw_recency_decile", "comment": null}, "custom_dw_first_purchase": {"type": "TIMESTAMP", "index": 102, "name": "custom_dw_first_purchase", "comment": null}, "custom_dw_ecom_orders": {"type": "INT64", "index": 103, "name": "custom_dw_ecom_orders", "comment": null}, "custom_dw_discount_pct": {"type": "FLOAT64", "index": 104, "name": "custom_dw_discount_pct", "comment": null}, "custom_dw_retail_net_quantity": {"type": "INT64", "index": 105, "name": "custom_dw_retail_net_quantity", "comment": null}, "custom_dw_previous_purchase": {"type": "TIMESTAMP", "index": 106, "name": "custom_dw_previous_purchase", "comment": null}, "custom_dw_lifetime_net_ordered": {"type": "FLOAT64", "index": 107, "name": "custom_dw_lifetime_net_ordered", "comment": null}, "custom_dw_lifetime_gross_ordered": {"type": "FLOAT64", "index": 108, "name": "custom_dw_lifetime_gross_ordered", "comment": null}, "custom_dw_last_retail_purchase": {"type": "TIMESTAMP", "index": 109, "name": "custom_dw_last_retail_purchase", "comment": null}, "custom_dw_ecom_net_rev_decile": {"type": "INT64", "index": 110, "name": "custom_dw_ecom_net_rev_decile", "comment": null}, "custom_dw_discount_shopper_type": {"type": "STRING", "index": 111, "name": "custom_dw_discount_shopper_type", "comment": null}, "custom_dw_net_rev_decile": {"type": "INT64", "index": 112, "name": "custom_dw_net_rev_decile", "comment": null}, "custom_dw_home_store": {"type": "INT64", "index": 113, "name": "custom_dw_home_store", "comment": null}, "custom_low_value_customers": {"type": "BOOL", "index": 114, "name": "custom_low_value_customers", "comment": null}, "custom_high_value_omni_customers": {"type": "BOOL", "index": 115, "name": "custom_high_value_omni_customers", "comment": null}, "custom_has_purchased_2021_spring_collection": {"type": "BOOL", "index": 116, "name": "custom_has_purchased_2021_spring_collection", "comment": null}, "custom_2_do_you_follow_current_fashion_trends_": {"type": "STRING", "index": 117, "name": "custom_2_do_you_follow_current_fashion_trends_", "comment": null}, "custom_what_month_do_you_start_shopping_for_your_fall_wardrobe_": {"type": "STRING", "index": 118, "name": "custom_what_month_do_you_start_shopping_for_your_fall_wardrobe_", "comment": null}, "custom_score": {"type": "INT64", "index": 119, "name": "custom_score", "comment": null}, "custom_which_city_is_closest_to_you_": {"type": "STRING", "index": 120, "name": "custom_which_city_is_closest_to_you_", "comment": null}, "custom_now_that_we_seem_to_be_inching_closer_to_pre_pandemic_life_are_you_going_to_be_traveling_again_": {"type": "BOOL", "index": 121, "name": "custom_now_that_we_seem_to_be_inching_closer_to_pre_pandemic_life_are_you_going_to_be_traveling_again_", "comment": null}, "custom_do_you_typically_have_your_own_go_to_store_associate_": {"type": "STRING", "index": 122, "name": "custom_do_you_typically_have_your_own_go_to_store_associate_", "comment": null}, "custom_subscribed_to_list": {"type": "STRING", "index": 123, "name": "custom_subscribed_to_list", "comment": null}, "custom_are_you_going_back_to_an_office_": {"type": "STRING", "index": 124, "name": "custom_are_you_going_back_to_an_office_", "comment": null}, "custom_what_do_you_buy_most_often_from_veronica_beard_": {"type": "STRING", "index": 125, "name": "custom_what_do_you_buy_most_often_from_veronica_beard_", "comment": null}, "custom_what_other_brands_do_you_like_to_shop_": {"type": "STRING", "index": 126, "name": "custom_what_other_brands_do_you_like_to_shop_", "comment": null}, "custom_how_do_you_shop_": {"type": "STRING", "index": 127, "name": "custom_how_do_you_shop_", "comment": null}, "custom_what_is_the_one_piece_in_your_closet_that_you_can_t_live_without_": {"type": "STRING", "index": 128, "name": "custom_what_is_the_one_piece_in_your_closet_that_you_can_t_live_without_", "comment": null}, "custom_what_month_do_you_start_shopping_for_holiday_": {"type": "STRING", "index": 129, "name": "custom_what_month_do_you_start_shopping_for_holiday_", "comment": null}, "custom_what_month_do_you_start_shopping_for_your_spring_wardrobe_": {"type": "STRING", "index": 130, "name": "custom_what_month_do_you_start_shopping_for_your_spring_wardrobe_", "comment": null}, "custom_do_you_ever_buy_veronica_beard_as_a_gift_for_someone_": {"type": "STRING", "index": 131, "name": "custom_do_you_ever_buy_veronica_beard_as_a_gift_for_someone_", "comment": null}, "custom_1_which_of_the_following_influences_your_decision_to_purchase_the_most_rank_in_order_of_importance_": {"type": "STRING", "index": 132, "name": "custom_1_which_of_the_following_influences_your_decision_to_purchase_the_most_rank_in_order_of_importance_", "comment": null}, "custom_what_do_you_spend_on_the_most_": {"type": "STRING", "index": 133, "name": "custom_what_do_you_spend_on_the_most_", "comment": null}, "custom_quickwhat_comes_to_mind_when_you_think_of_veronica_beard_select_up_to_5_that_apply_": {"type": "STRING", "index": 134, "name": "custom_quickwhat_comes_to_mind_when_you_think_of_veronica_beard_select_up_to_5_that_apply_", "comment": null}, "custom_when_": {"type": "STRING", "index": 135, "name": "custom_when_", "comment": null}, "custom_are_you_excited_to_get_dressed_up_again_": {"type": "STRING", "index": 136, "name": "custom_are_you_excited_to_get_dressed_up_again_", "comment": null}, "custom_1_what_is_inspiring_you_to_shop_now_": {"type": "STRING", "index": 137, "name": "custom_1_what_is_inspiring_you_to_shop_now_", "comment": null}, "custom_what_percent_of_your_closet_is_veronica_beard_": {"type": "STRING", "index": 138, "name": "custom_what_percent_of_your_closet_is_veronica_beard_", "comment": null}, "custom_do_you_come_to_veronica_beard_to_buy_entire_outfits_or_key_items_": {"type": "STRING", "index": 139, "name": "custom_do_you_come_to_veronica_beard_to_buy_entire_outfits_or_key_items_", "comment": null}, "custom_how_likely_are_you_to_recommend_veronica_beard_to_your_friends_": {"type": "STRING", "index": 140, "name": "custom_how_likely_are_you_to_recommend_veronica_beard_to_your_friends_", "comment": null}, "custom_what_inspires_you_to_shop_in_a_store_": {"type": "STRING", "index": 141, "name": "custom_what_inspires_you_to_shop_in_a_store_", "comment": null}, "custom_are_you_an_online_shopper_or_store_shopper_": {"type": "STRING", "index": 142, "name": "custom_are_you_an_online_shopper_or_store_shopper_", "comment": null}, "custom_what_do_you_like_about_the_in_store_experience_": {"type": "STRING", "index": 143, "name": "custom_what_do_you_like_about_the_in_store_experience_", "comment": null}, "custom_what_are_you_most_excited_to_buy_for_fall_": {"type": "STRING", "index": 144, "name": "custom_what_are_you_most_excited_to_buy_for_fall_", "comment": null}, "custom_what_s_your_next_trip_": {"type": "STRING", "index": 145, "name": "custom_what_s_your_next_trip_", "comment": null}, "custom_how_did_you_first_find_out_about_veronica_beard_": {"type": "STRING", "index": 146, "name": "custom_how_did_you_first_find_out_about_veronica_beard_", "comment": null}, "custom_for_whom_and_why_": {"type": "STRING", "index": 147, "name": "custom_for_whom_and_why_", "comment": null}, "custom_please_confirm_your_email_address_to_enter_to_win_one_of_three_750_gift_cards_": {"type": "STRING", "index": 148, "name": "custom_please_confirm_your_email_address_to_enter_to_win_one_of_three_750_gift_cards_", "comment": null}, "custom_just_between_us_whats_your_age_": {"type": "STRING", "index": 149, "name": "custom_just_between_us_whats_your_age_", "comment": null}, "custom_has_purchased_2020_spring_collection": {"type": "BOOL", "index": 150, "name": "custom_has_purchased_2020_spring_collection", "comment": null}, "custom_what_inspires_you_to_shop_online_": {"type": "STRING", "index": 151, "name": "custom_what_inspires_you_to_shop_online_", "comment": null}, "custom_where_do_you_see_yourself_shopping_this_fall_": {"type": "STRING", "index": 152, "name": "custom_where_do_you_see_yourself_shopping_this_fall_", "comment": null}, "custom_what_is_your_source_of_inspiration_": {"type": "STRING", "index": 153, "name": "custom_what_is_your_source_of_inspiration_", "comment": null}, "custom_please_specify": {"type": "STRING", "index": 154, "name": "custom_please_specify", "comment": null}, "custom_latest_shipping_delivered_date": {"type": "TIMESTAMP", "index": 155, "name": "custom_latest_shipping_delivered_date", "comment": null}, "custom_count_of_amex_coupon_code_used_in_2021_spring_campaign": {"type": "INT64", "index": 156, "name": "custom_count_of_amex_coupon_code_used_in_2021_spring_campaign", "comment": null}, "custom_latest_cancel_reason_type": {"type": "STRING", "index": 157, "name": "custom_latest_cancel_reason_type", "comment": null}, "custom_aov_year_2021_higher_than_800_dollars": {"type": "BOOL", "index": 158, "name": "custom_aov_year_2021_higher_than_800_dollars", "comment": null}, "custom_exchange_id": {"type": "STRING", "index": 159, "name": "custom_exchange_id", "comment": null}, "custom_spring_2021_amex_customers_with_unique_purchase": {"type": "BOOL", "index": 160, "name": "custom_spring_2021_amex_customers_with_unique_purchase", "comment": null}, "custom_southampton_store_customers": {"type": "BOOL", "index": 161, "name": "custom_southampton_store_customers", "comment": null}, "custom_chicago_store_customers": {"type": "BOOL", "index": 162, "name": "custom_chicago_store_customers", "comment": null}, "custom_j_o_amex_customers_spring_amex_2021_unique_purchasers_mc_8_wi": {"type": "BOOL", "index": 163, "name": "custom_j_o_amex_customers_spring_amex_2021_unique_purchasers_mc_8_wi", "comment": null}, "custom_address": {"type": "STRING", "index": 164, "name": "custom_address", "comment": null}, "custom_fall_3_ecomm_video_vs_ecomm_static_on_collection_pages": {"type": "STRING", "index": 165, "name": "custom_fall_3_ecomm_video_vs_ecomm_static_on_collection_pages", "comment": null}, "custom_homepage_product_recs": {"type": "STRING", "index": 166, "name": "custom_homepage_product_recs", "comment": null}, "custom_mobile_pdp_size_drawer_ux": {"type": "STRING", "index": 167, "name": "custom_mobile_pdp_size_drawer_ux", "comment": null}, "custom_name": {"type": "STRING", "index": 168, "name": "custom_name", "comment": null}, "custom_experiment_id": {"type": "STRING", "index": 169, "name": "custom_experiment_id", "comment": null}, "custom_scarcity_test_v_2": {"type": "STRING", "index": 170, "name": "custom_scarcity_test_v_2", "comment": null}, "custom_no_results_page_product_recs": {"type": "STRING", "index": 171, "name": "custom_no_results_page_product_recs", "comment": null}, "custom_video_on_collection_pages": {"type": "STRING", "index": 172, "name": "custom_video_on_collection_pages", "comment": null}, "custom_exenta_latest_cancel_reason": {"type": "STRING", "index": 173, "name": "custom_exenta_latest_cancel_reason", "comment": null}, "custom_back_to_work_email_campaign": {"type": "BOOL", "index": 174, "name": "custom_back_to_work_email_campaign", "comment": null}, "custom_exenta_latest_cancel_date": {"type": "TIMESTAMP", "index": 175, "name": "custom_exenta_latest_cancel_date", "comment": null}, "custom_exposing_filters_on_collection_pages": {"type": "STRING", "index": 176, "name": "custom_exposing_filters_on_collection_pages", "comment": null}, "custom_swim_vs_coverup_verbiage_in_nav": {"type": "STRING", "index": 177, "name": "custom_swim_vs_coverup_verbiage_in_nav", "comment": null}, "custom_desktop_pdp_favorite_icon": {"type": "STRING", "index": 178, "name": "custom_desktop_pdp_favorite_icon", "comment": null}, "custom_variation_name_handle": {"type": "STRING", "index": 179, "name": "custom_variation_name_handle", "comment": null}, "custom_pdp_favorite_icon": {"type": "STRING", "index": 180, "name": "custom_pdp_favorite_icon", "comment": null}, "custom_wip_pdp_recs_aug_2021_": {"type": "STRING", "index": 181, "name": "custom_wip_pdp_recs_aug_2021_", "comment": null}, "custom_intl_visitors_hidden_service_info": {"type": "STRING", "index": 182, "name": "custom_intl_visitors_hidden_service_info", "comment": null}, "custom_intl_hide_customer_service_info": {"type": "STRING", "index": 183, "name": "custom_intl_hide_customer_service_info", "comment": null}, "custom_added_md_product_to_cart_past_30_days_but_hasn_t_placed_an_order": {"type": "BOOL", "index": 184, "name": "custom_added_md_product_to_cart_past_30_days_but_hasn_t_placed_an_order", "comment": null}, "custom_pdp_recs_september_2021_": {"type": "STRING", "index": 185, "name": "custom_pdp_recs_september_2021_", "comment": null}, "custom_default_address": {"type": "STRING", "index": 186, "name": "custom_default_address", "comment": null}, "custom_dw_customer_type": {"type": "STRING", "index": 187, "name": "custom_dw_customer_type", "comment": null}, "custom_dw_is_md_customer": {"type": "BOOL", "index": 188, "name": "custom_dw_is_md_customer", "comment": null}, "custom_exenta_cancellation_customer_appeasement": {"type": "BOOL", "index": 189, "name": "custom_exenta_cancellation_customer_appeasement", "comment": null}, "custom_mini_cart_v_notification": {"type": "STRING", "index": 190, "name": "custom_mini_cart_v_notification", "comment": null}, "custom_desktop_mini_cart_slide_out": {"type": "STRING", "index": 191, "name": "custom_desktop_mini_cart_slide_out", "comment": null}, "custom_desktop_pdp_mini_cart_slide_out": {"type": "STRING", "index": 192, "name": "custom_desktop_pdp_mini_cart_slide_out", "comment": null}, "custom_v_2_pdp_recs_october_2021_": {"type": "STRING", "index": 193, "name": "custom_v_2_pdp_recs_october_2021_", "comment": null}, "custom_desktop_plp_mini_cart_slide_out": {"type": "STRING", "index": 194, "name": "custom_desktop_plp_mini_cart_slide_out", "comment": null}, "custom_creative_id": {"type": "INT64", "index": 195, "name": "custom_creative_id", "comment": null}, "custom_phone": {"type": "STRING", "index": 196, "name": "custom_phone", "comment": null}, "custom_google_lead_form_submitted": {"type": "BOOL", "index": 197, "name": "custom_google_lead_form_submitted", "comment": null}, "custom_international_hide_customer_service_info": {"type": "STRING", "index": 198, "name": "custom_international_hide_customer_service_info", "comment": null}, "custom_geo_target_store_location": {"type": "STRING", "index": 199, "name": "custom_geo_target_store_location", "comment": null}, "custom_10_29_new_nsr_date": {"type": "STRING", "index": 200, "name": "custom_10_29_new_nsr_date", "comment": null}, "custom_10_29_order_number": {"type": "INT64", "index": 201, "name": "custom_10_29_order_number", "comment": null}, "custom_10_29_style_name": {"type": "STRING", "index": 202, "name": "custom_10_29_style_name", "comment": null}, "custom_undefined": {"type": "STRING", "index": 203, "name": "custom_undefined", "comment": null}, "custom_facebook_lead_generation_campaign_subscribers": {"type": "BOOL", "index": 204, "name": "custom_facebook_lead_generation_campaign_subscribers", "comment": null}, "custom_12_13_order_number_coralee": {"type": "STRING", "index": 205, "name": "custom_12_13_order_number_coralee", "comment": null}, "custom_12_13_order_number_shoes": {"type": "INT64", "index": 206, "name": "custom_12_13_order_number_shoes", "comment": null}, "custom_12_13_style_name_shoes": {"type": "STRING", "index": 207, "name": "custom_12_13_style_name_shoes", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 170280001.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 423219.0, "include": true, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.klaviyo_source.klaviyo.person"}, "source.klaviyo_source.klaviyo.metric": {"metadata": {"type": "table", "schema": "klaviyo", "name": "metric", "database": "fivetran-db", "comment": null, "owner": null}, "columns": {"id": {"type": "STRING", "index": 1, "name": "id", "comment": null}, "_fivetran_deleted": {"type": "BOOL", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 3, "name": "_fivetran_synced", "comment": null}, "created": {"type": "TIMESTAMP", "index": 4, "name": "created", "comment": null}, "integration_id": {"type": "STRING", "index": 5, "name": "integration_id", "comment": null}, "name": {"type": "STRING", "index": 6, "name": "name", "comment": null}, "updated": {"type": "TIMESTAMP", "index": 7, "name": "updated", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 27998.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 412.0, "include": true, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.klaviyo_source.klaviyo.metric"}, "source.klaviyo_source.klaviyo.flow": {"metadata": {"type": "table", "schema": "klaviyo", "name": "flow", "database": "fivetran-db", "comment": null, "owner": null}, "columns": {"id": {"type": "STRING", "index": 1, "name": "id", "comment": null}, "_fivetran_deleted": {"type": "BOOL", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 3, "name": "_fivetran_synced", "comment": null}, "created": {"type": "TIMESTAMP", "index": 4, "name": "created", "comment": null}, "customer_filter": {"type": "STRING", "index": 5, "name": "customer_filter", "comment": null}, "name": {"type": "STRING", "index": 6, "name": "name", "comment": null}, "status": {"type": "STRING", "index": 7, "name": "status", "comment": null}, "trigger": {"type": "STRING", "index": 8, "name": "trigger", "comment": null}, "updated": {"type": "TIMESTAMP", "index": 9, "name": "updated", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 23209.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 53.0, "include": true, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.klaviyo_source.klaviyo.flow"}, "source.klaviyo_source.klaviyo.campaign": {"metadata": {"type": "table", "schema": "klaviyo", "name": "campaign", "database": "fivetran-db", "comment": null, "owner": null}, "columns": {"id": {"type": "STRING", "index": 1, "name": "id", "comment": null}, "_fivetran_deleted": {"type": "BOOL", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 3, "name": "_fivetran_synced", "comment": null}, "campaign_type": {"type": "STRING", "index": 4, "name": "campaign_type", "comment": null}, "created": {"type": "TIMESTAMP", "index": 5, "name": "created", "comment": null}, "email_template_id": {"type": "STRING", "index": 6, "name": "email_template_id", "comment": null}, "from_email": {"type": "STRING", "index": 7, "name": "from_email", "comment": null}, "from_name": {"type": "STRING", "index": 8, "name": "from_name", "comment": null}, "is_segmented": {"type": "BOOL", "index": 9, "name": "is_segmented", "comment": null}, "name": {"type": "STRING", "index": 10, "name": "name", "comment": null}, "send_time": {"type": "TIMESTAMP", "index": 11, "name": "send_time", "comment": null}, "sent_at": {"type": "TIMESTAMP", "index": 12, "name": "sent_at", "comment": null}, "status": {"type": "STRING", "index": 13, "name": "status", "comment": null}, "status_id": {"type": "STRING", "index": 14, "name": "status_id", "comment": null}, "status_label": {"type": "STRING", "index": 15, "name": "status_label", "comment": null}, "subject": {"type": "STRING", "index": 16, "name": "subject", "comment": null}, "updated": {"type": "TIMESTAMP", "index": 17, "name": "updated", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 187476.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 942.0, "include": true, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.klaviyo_source.klaviyo.campaign"}, "source.klaviyo_source.klaviyo.event": {"metadata": {"type": "table", "schema": "klaviyo", "name": "event", "database": "fivetran-db", "comment": null, "owner": null}, "columns": {"id": {"type": "STRING", "index": 1, "name": "id", "comment": null}, "_fivetran_deleted": {"type": "BOOL", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 3, "name": "_fivetran_synced", "comment": null}, "_variation": {"type": "STRING", "index": 4, "name": "_variation", "comment": null}, "campaign_id": {"type": "STRING", "index": 5, "name": "campaign_id", "comment": null}, "datetime": {"type": "TIMESTAMP", "index": 6, "name": "datetime", "comment": null}, "flow_id": {"type": "STRING", "index": 7, "name": "flow_id", "comment": null}, "flow_message_id": {"type": "STRING", "index": 8, "name": "flow_message_id", "comment": null}, "metric_id": {"type": "STRING", "index": 9, "name": "metric_id", "comment": null}, "person_id": {"type": "STRING", "index": 10, "name": "person_id", "comment": null}, "property_attribute_acadaca_color": {"type": "STRING", "index": 11, "name": "property_attribute_acadaca_color", "comment": null}, "property_attribute_acadaca_size": {"type": "STRING", "index": 12, "name": "property_attribute_acadaca_size", "comment": null}, "property_attribute_acadaca_sku": {"type": "STRING", "index": 13, "name": "property_attribute_acadaca_sku", "comment": null}, "property_collections": {"type": "STRING", "index": 14, "name": "property_collections", "comment": null}, "property_discount_codes": {"type": "STRING", "index": 15, "name": "property_discount_codes", "comment": null}, "property_extra": {"type": "STRING", "index": 16, "name": "property_extra", "comment": null}, "property_item_count": {"type": "INT64", "index": 17, "name": "property_item_count", "comment": null}, "property_items": {"type": "STRING", "index": 18, "name": "property_items", "comment": null}, "property_name": {"type": "STRING", "index": 19, "name": "property_name", "comment": null}, "property_quantity": {"type": "INT64", "index": 20, "name": "property_quantity", "comment": null}, "property_shipping_rate": {"type": "STRING", "index": 21, "name": "property_shipping_rate", "comment": null}, "property_sku": {"type": "STRING", "index": 22, "name": "property_sku", "comment": null}, "property_source_name": {"type": "STRING", "index": 23, "name": "property_source_name", "comment": null}, "property_tags": {"type": "STRING", "index": 24, "name": "property_tags", "comment": null}, "property_total_discounts": {"type": "FLOAT64", "index": 25, "name": "property_total_discounts", "comment": null}, "property_value": {"type": "FLOAT64", "index": 26, "name": "property_value", "comment": null}, "timestamp": {"type": "TIMESTAMP", "index": 27, "name": "timestamp", "comment": null}, "type": {"type": "STRING", "index": 28, "name": "type", "comment": null}, "uuid": {"type": "STRING", "index": 29, "name": "uuid", "comment": null}, "property_ad_group_id": {"type": "INT64", "index": 30, "name": "property_ad_group_id", "comment": null}, "property_ad_id": {"type": "INT64", "index": 31, "name": "property_ad_id", "comment": null}, "property_ad_name": {"type": "STRING", "index": 32, "name": "property_ad_name", "comment": null}, "property_adset_name": {"type": "STRING", "index": 33, "name": "property_adset_name", "comment": null}, "property_amount": {"type": "STRING", "index": 34, "name": "property_amount", "comment": null}, "property_attribute_card_message": {"type": "STRING", "index": 35, "name": "property_attribute_card_message", "comment": null}, "property_attribute_recipient_email": {"type": "STRING", "index": 36, "name": "property_attribute_recipient_email", "comment": null}, "property_attribute_recipient_name": {"type": "STRING", "index": 37, "name": "property_attribute_recipient_name", "comment": null}, "property_attribute_send_date": {"type": "STRING", "index": 38, "name": "property_attribute_send_date", "comment": null}, "property_attribute_senders_name": {"type": "STRING", "index": 39, "name": "property_attribute_senders_name", "comment": null}, "property_available": {"type": "BOOL", "index": 40, "name": "property_available", "comment": null}, "property_billing_info": {"type": "STRING", "index": 41, "name": "property_billing_info", "comment": null}, "property_bounce_type": {"type": "STRING", "index": 42, "name": "property_bounce_type", "comment": null}, "property_brand": {"type": "STRING", "index": 43, "name": "property_brand", "comment": null}, "property_browser": {"type": "STRING", "index": 44, "name": "property_browser", "comment": null}, "property_campaign_name": {"type": "STRING", "index": 45, "name": "property_campaign_name", "comment": null}, "property_card_message": {"type": "STRING", "index": 46, "name": "property_card_message", "comment": null}, "property_categories": {"type": "STRING", "index": 47, "name": "property_categories", "comment": null}, "property_client_canonical": {"type": "STRING", "index": 48, "name": "property_client_canonical", "comment": null}, "property_client_name": {"type": "STRING", "index": 49, "name": "property_client_name", "comment": null}, "property_client_os": {"type": "STRING", "index": 50, "name": "property_client_os", "comment": null}, "property_client_os_family": {"type": "STRING", "index": 51, "name": "property_client_os_family", "comment": null}, "property_client_type": {"type": "STRING", "index": 52, "name": "property_client_type", "comment": null}, "property_cohort_message_send_cohort": {"type": "STRING", "index": 53, "name": "property_cohort_message_send_cohort", "comment": null}, "property_cohort_variation_send_cohort": {"type": "STRING", "index": 54, "name": "property_cohort_variation_send_cohort", "comment": null}, "property_compare_at_price": {"type": "STRING", "index": 55, "name": "property_compare_at_price", "comment": null}, "property_created_at": {"type": "TIMESTAMP", "index": 56, "name": "property_created_at", "comment": null}, "property_discount_total": {"type": "FLOAT64", "index": 57, "name": "property_discount_total", "comment": null}, "property_email": {"type": "STRING", "index": 58, "name": "property_email", "comment": null}, "property_email_domain": {"type": "STRING", "index": 59, "name": "property_email_domain", "comment": null}, "property_event_id": {"type": "STRING", "index": 60, "name": "property_event_id", "comment": null}, "property_featured_image": {"type": "STRING", "index": 61, "name": "property_featured_image", "comment": null}, "property_financial_status": {"type": "STRING", "index": 62, "name": "property_financial_status", "comment": null}, "property_form_name": {"type": "STRING", "index": 63, "name": "property_form_name", "comment": null}, "property_fulfillment_hours": {"type": "INT64", "index": 64, "name": "property_fulfillment_hours", "comment": null}, "property_fulfillment_status": {"type": "STRING", "index": 65, "name": "property_fulfillment_status", "comment": null}, "property_fulfillments": {"type": "STRING", "index": 66, "name": "property_fulfillments", "comment": null}, "property_gift_card_url": {"type": "STRING", "index": 67, "name": "property_gift_card_url", "comment": null}, "property_id": {"type": "INT64", "index": 68, "name": "property_id", "comment": null}, "property_image_url": {"type": "STRING", "index": 69, "name": "property_image_url", "comment": null}, "property_internal": {"type": "STRING", "index": 70, "name": "property_internal", "comment": null}, "property_inventory_management": {"type": "STRING", "index": 71, "name": "property_inventory_management", "comment": null}, "property_is_organic": {"type": "BOOL", "index": 72, "name": "property_is_organic", "comment": null}, "property_is_session_activity": {"type": "BOOL", "index": 73, "name": "property_is_session_activity", "comment": null}, "property_item_id": {"type": "INT64", "index": 74, "name": "property_item_id", "comment": null}, "property_item_name": {"type": "STRING", "index": 75, "name": "property_item_name", "comment": null}, "property_item_price": {"type": "STRING", "index": 76, "name": "property_item_price", "comment": null}, "property_item_sku": {"type": "INT64", "index": 77, "name": "property_item_sku", "comment": null}, "property_line_items": {"type": "STRING", "index": 78, "name": "property_line_items", "comment": null}, "property_list": {"type": "STRING", "index": 79, "name": "property_list", "comment": null}, "property_message_interaction": {"type": "STRING", "index": 80, "name": "property_message_interaction", "comment": null}, "property_metadata": {"type": "STRING", "index": 81, "name": "property_metadata", "comment": null}, "property_option_1": {"type": "STRING", "index": 82, "name": "property_option_1", "comment": null}, "property_option_2": {"type": "STRING", "index": 83, "name": "property_option_2", "comment": null}, "property_options": {"type": "STRING", "index": 84, "name": "property_options", "comment": null}, "property_order_name": {"type": "STRING", "index": 85, "name": "property_order_name", "comment": null}, "property_order_number": {"type": "INT64", "index": 86, "name": "property_order_number", "comment": null}, "property_order_status_url": {"type": "STRING", "index": 87, "name": "property_order_status_url", "comment": null}, "property_os": {"type": "STRING", "index": 88, "name": "property_os", "comment": null}, "property_page": {"type": "STRING", "index": 89, "name": "property_page", "comment": null}, "property_page_name": {"type": "STRING", "index": 90, "name": "property_page_name", "comment": null}, "property_payment_line": {"type": "STRING", "index": 91, "name": "property_payment_line", "comment": null}, "property_platform": {"type": "STRING", "index": 92, "name": "property_platform", "comment": null}, "property_price": {"type": "STRING", "index": 93, "name": "property_price", "comment": null}, "property_product_id": {"type": "INT64", "index": 94, "name": "property_product_id", "comment": null}, "property_product_name": {"type": "STRING", "index": 95, "name": "property_product_name", "comment": null}, "property_public_title": {"type": "STRING", "index": 96, "name": "property_public_title", "comment": null}, "property_recipient_name": {"type": "STRING", "index": 97, "name": "property_recipient_name", "comment": null}, "property_refunds": {"type": "STRING", "index": 98, "name": "property_refunds", "comment": null}, "property_requires_shipping": {"type": "BOOL", "index": 99, "name": "property_requires_shipping", "comment": null}, "property_restocking_total": {"type": "FLOAT64", "index": 100, "name": "property_restocking_total", "comment": null}, "property_return_authorizations": {"type": "STRING", "index": 101, "name": "property_return_authorizations", "comment": null}, "property_return_total": {"type": "FLOAT64", "index": 102, "name": "property_return_total", "comment": null}, "property_senders_name": {"type": "STRING", "index": 103, "name": "property_senders_name", "comment": null}, "property_session_end": {"type": "INT64", "index": 104, "name": "property_session_end", "comment": null}, "property_style_id": {"type": "STRING", "index": 105, "name": "property_style_id", "comment": null}, "property_sub_total": {"type": "FLOAT64", "index": 106, "name": "property_sub_total", "comment": null}, "property_subject": {"type": "STRING", "index": 107, "name": "property_subject", "comment": null}, "property_subtotal_price": {"type": "FLOAT64", "index": 108, "name": "property_subtotal_price", "comment": null}, "property_tax_total": {"type": "FLOAT64", "index": 109, "name": "property_tax_total", "comment": null}, "property_taxable": {"type": "BOOL", "index": 110, "name": "property_taxable", "comment": null}, "property_title": {"type": "STRING", "index": 111, "name": "property_title", "comment": null}, "property_total_price": {"type": "FLOAT64", "index": 112, "name": "property_total_price", "comment": null}, "property_total_tax": {"type": "FLOAT64", "index": 113, "name": "property_total_tax", "comment": null}, "property_tracker_id": {"type": "STRING", "index": 114, "name": "property_tracker_id", "comment": null}, "property_tracking_label": {"type": "STRING", "index": 115, "name": "property_tracking_label", "comment": null}, "property_url": {"type": "STRING", "index": 116, "name": "property_url", "comment": null}, "property_variant_id": {"type": "INT64", "index": 117, "name": "property_variant_id", "comment": null}, "property_variant_name": {"type": "STRING", "index": 118, "name": "property_variant_name", "comment": null}, "property_variant_option_color": {"type": "STRING", "index": 119, "name": "property_variant_option_color", "comment": null}, "property_variant_option_size": {"type": "STRING", "index": 120, "name": "property_variant_option_size", "comment": null}, "property_variant_option_title": {"type": "STRING", "index": 121, "name": "property_variant_option_title", "comment": null}, "property_variants": {"type": "STRING", "index": 122, "name": "property_variants", "comment": null}, "property_vendor": {"type": "STRING", "index": 123, "name": "property_vendor", "comment": null}, "property_weight": {"type": "INT64", "index": 124, "name": "property_weight", "comment": null}, "property_attribute_pre_order_date": {"type": "STRING", "index": 125, "name": "property_attribute_pre_order_date", "comment": null}, "property_attribute_mw_grouped_product_discounted_price": {"type": "FLOAT64", "index": 126, "name": "property_attribute_mw_grouped_product_discounted_price", "comment": null}, "property_attribute_mw_grouped_product_relation": {"type": "INT64", "index": 127, "name": "property_attribute_mw_grouped_product_relation", "comment": null}, "property_attribute_mw_grouped_product_relation_4321154793583": {"type": "INT64", "index": 128, "name": "property_attribute_mw_grouped_product_relation_4321154793583", "comment": null}, "property_attribute_mw_grouped_product_relation_3586136703076": {"type": "INT64", "index": 129, "name": "property_attribute_mw_grouped_product_relation_3586136703076", "comment": null}, "property_attribute_mw_grouped_product_relation_4321154859119": {"type": "INT64", "index": 130, "name": "property_attribute_mw_grouped_product_relation_4321154859119", "comment": null}, "property_attribute_mw_grouped_product_relation_4321154596975": {"type": "INT64", "index": 131, "name": "property_attribute_mw_grouped_product_relation_4321154596975", "comment": null}, "property_attribute_mw_grouped_product_relation_4321154891887": {"type": "INT64", "index": 132, "name": "property_attribute_mw_grouped_product_relation_4321154891887", "comment": null}, "property_attribute_mw_grouped_product_relation_4321154695279": {"type": "INT64", "index": 133, "name": "property_attribute_mw_grouped_product_relation_4321154695279", "comment": null}, "property_attribute_mw_grouped_product_relation_4170368909412": {"type": "INT64", "index": 134, "name": "property_attribute_mw_grouped_product_relation_4170368909412", "comment": null}, "property_attribute_mw_grouped_product_relation_4339644432495": {"type": "INT64", "index": 135, "name": "property_attribute_mw_grouped_product_relation_4339644432495", "comment": null}, "property_attribute_mw_grouped_product_relation_4321154498671": {"type": "INT64", "index": 136, "name": "property_attribute_mw_grouped_product_relation_4321154498671", "comment": null}, "property_total_emails_opened": {"type": "INT64", "index": 137, "name": "property_total_emails_opened", "comment": null}, "property_currency_code": {"type": "STRING", "index": 138, "name": "property_currency_code", "comment": null}, "property_store_purchasers_test": {"type": "BOOL", "index": 139, "name": "property_store_purchasers_test", "comment": null}, "property_test_audience_klaviyo": {"type": "BOOL", "index": 140, "name": "property_test_audience_klaviyo", "comment": null}, "property_audience_key": {"type": "STRING", "index": 141, "name": "property_audience_key", "comment": null}, "property_in_store_purchasers_from_2021_02_09": {"type": "BOOL", "index": 142, "name": "property_in_store_purchasers_from_2021_02_09", "comment": null}, "property_dallas_store_customers": {"type": "BOOL", "index": 143, "name": "property_dallas_store_customers", "comment": null}, "property_madison_ave_store_customers": {"type": "BOOL", "index": 144, "name": "property_madison_ave_store_customers", "comment": null}, "property_manhasset_store_customers": {"type": "BOOL", "index": 145, "name": "property_manhasset_store_customers", "comment": null}, "property_melrose_store_customers": {"type": "BOOL", "index": 146, "name": "property_melrose_store_customers", "comment": null}, "property_georgetown_store_customers": {"type": "BOOL", "index": 147, "name": "property_georgetown_store_customers", "comment": null}, "property_boston_store_customers": {"type": "BOOL", "index": 148, "name": "property_boston_store_customers", "comment": null}, "property_greenwich_store_customers": {"type": "BOOL", "index": 149, "name": "property_greenwich_store_customers", "comment": null}, "property_bal_harbour_store_customers": {"type": "BOOL", "index": 150, "name": "property_bal_harbour_store_customers", "comment": null}, "property_pacific_palisades_store_customers": {"type": "BOOL", "index": 151, "name": "property_pacific_palisades_store_customers", "comment": null}, "property_fillmore_store_customers": {"type": "BOOL", "index": 152, "name": "property_fillmore_store_customers", "comment": null}, "property_soho_store_customers": {"type": "BOOL", "index": 153, "name": "property_soho_store_customers", "comment": null}, "property_nantucket_store_customers": {"type": "BOOL", "index": 154, "name": "property_nantucket_store_customers", "comment": null}, "property_houston_store_customers": {"type": "BOOL", "index": 155, "name": "property_houston_store_customers", "comment": null}, "property_attribution": {"type": "STRING", "index": 156, "name": "property_attribution", "comment": null}, "property_in_store_purchasers": {"type": "BOOL", "index": 157, "name": "property_in_store_purchasers", "comment": null}, "property_variant_option_size_rewind_2021_05_03": {"type": "STRING", "index": 158, "name": "property_variant_option_size_rewind_2021_05_03", "comment": null}, "property_variant_option_color_rewind_2021_05_03": {"type": "STRING", "index": 159, "name": "property_variant_option_color_rewind_2021_05_03", "comment": null}, "property_form_id": {"type": "STRING", "index": 160, "name": "property_form_id", "comment": null}, "property_attribute_is_pre_order": {"type": "BOOL", "index": 161, "name": "property_attribute_is_pre_order", "comment": null}, "property_has_partial_fulfillments": {"type": "BOOL", "index": 162, "name": "property_has_partial_fulfillments", "comment": null}, "property_esp": {"type": "INT64", "index": 163, "name": "property_esp", "comment": null}, "property_attribute_gecart_item_id": {"type": "INT64", "index": 164, "name": "property_attribute_gecart_item_id", "comment": null}, "property_sent_from": {"type": "STRING", "index": 165, "name": "property_sent_from", "comment": null}, "property_creative_id": {"type": "INT64", "index": 166, "name": "property_creative_id", "comment": null}, "property_conversation_id": {"type": "STRING", "index": 167, "name": "property_conversation_id", "comment": null}, "property_network": {"type": "STRING", "index": 168, "name": "property_network", "comment": null}, "property_variation_id": {"type": "STRING", "index": 169, "name": "property_variation_id", "comment": null}, "property_list_id": {"type": "STRING", "index": 170, "name": "property_list_id", "comment": null}, "property_shopify_variant_id": {"type": "INT64", "index": 171, "name": "property_shopify_variant_id", "comment": null}, "property_query": {"type": "STRING", "index": 172, "name": "property_query", "comment": null}, "property_presentment_currency": {"type": "STRING", "index": 173, "name": "property_presentment_currency", "comment": null}, "property_target_id": {"type": "STRING", "index": 174, "name": "property_target_id", "comment": null}, "property_category": {"type": "STRING", "index": 175, "name": "property_category", "comment": null}, "property_order_id": {"type": "STRING", "index": 176, "name": "property_order_id", "comment": null}, "property_cart_id": {"type": "STRING", "index": 177, "name": "property_cart_id", "comment": null}, "property_position": {"type": "STRING", "index": 178, "name": "property_position", "comment": null}, "property_publisher_id": {"type": "INT64", "index": 179, "name": "property_publisher_id", "comment": null}, "property_creative_type": {"type": "INT64", "index": 180, "name": "property_creative_type", "comment": null}, "property_offer_id": {"type": "INT64", "index": 181, "name": "property_offer_id", "comment": null}, "property_shopify_product_id": {"type": "INT64", "index": 182, "name": "property_shopify_product_id", "comment": null}, "property_variant": {"type": "STRING", "index": 183, "name": "property_variant", "comment": null}, "property_site_source_name": {"type": "STRING", "index": 184, "name": "property_site_source_name", "comment": null}, "property_publisher_name": {"type": "STRING", "index": 185, "name": "property_publisher_name", "comment": null}, "property_products": {"type": "STRING", "index": 186, "name": "property_products", "comment": null}, "property_discount": {"type": "STRING", "index": 187, "name": "property_discount", "comment": null}, "property_event_is_realtime": {"type": "BOOL", "index": 188, "name": "property_event_is_realtime", "comment": null}, "property_total": {"type": "FLOAT64", "index": 189, "name": "property_total", "comment": null}, "property_shipping": {"type": "FLOAT64", "index": 190, "name": "property_shipping", "comment": null}, "property_match_type": {"type": "STRING", "index": 191, "name": "property_match_type", "comment": null}, "property_source": {"type": "STRING", "index": 192, "name": "property_source", "comment": null}, "property_visitor_id": {"type": "STRING", "index": 193, "name": "property_visitor_id", "comment": null}, "property_presentment_amount": {"type": "FLOAT64", "index": 194, "name": "property_presentment_amount", "comment": null}, "property_channel": {"type": "STRING", "index": 195, "name": "property_channel", "comment": null}, "property_presentment_total": {"type": "FLOAT64", "index": 196, "name": "property_presentment_total", "comment": null}, "property_experiment_name": {"type": "STRING", "index": 197, "name": "property_experiment_name", "comment": null}, "property_trigger": {"type": "STRING", "index": 198, "name": "property_trigger", "comment": null}, "property_tax": {"type": "FLOAT64", "index": 199, "name": "property_tax", "comment": null}, "property_currency": {"type": "STRING", "index": 200, "name": "property_currency", "comment": null}, "property_user_id": {"type": "INT64", "index": 201, "name": "property_user_id", "comment": null}, "property_associate_id": {"type": "STRING", "index": 202, "name": "property_associate_id", "comment": null}, "property_placement": {"type": "STRING", "index": 203, "name": "property_placement", "comment": null}, "property_rating_value": {"type": "INT64", "index": 204, "name": "property_rating_value", "comment": null}, "property_rating_feedback_value": {"type": "STRING", "index": 205, "name": "property_rating_feedback_value", "comment": null}, "property_conversation_status": {"type": "STRING", "index": 206, "name": "property_conversation_status", "comment": null}, "property_exenta_cancellation_customer_appeasement": {"type": "BOOL", "index": 207, "name": "property_exenta_cancellation_customer_appeasement", "comment": null}, "property_results": {"type": "INT64", "index": 208, "name": "property_results", "comment": null}, "property_adgroup_id": {"type": "INT64", "index": 209, "name": "property_adgroup_id", "comment": null}, "property_campaign_id": {"type": "INT64", "index": 210, "name": "property_campaign_id", "comment": null}, "property_machine_open": {"type": "BOOL", "index": 211, "name": "property_machine_open", "comment": null}, "property_report_name": {"type": "STRING", "index": 212, "name": "property_report_name", "comment": null}, "property_lookback_days": {"type": "INT64", "index": 213, "name": "property_lookback_days", "comment": null}, "property_true_sku": {"type": "STRING", "index": 214, "name": "property_true_sku", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 167039909011.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 149399892.0, "include": true, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.klaviyo_source.klaviyo.event"}, "source.shopify_source.shopify.refund": {"metadata": {"type": "table", "schema": "shopify", "name": "refund", "database": "fivetran-db", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 2, "name": "_fivetran_synced", "comment": null}, "created_at": {"type": "TIMESTAMP", "index": 3, "name": "created_at", "comment": null}, "note": {"type": "STRING", "index": 4, "name": "note", "comment": null}, "processed_at": {"type": "TIMESTAMP", "index": 5, "name": "processed_at", "comment": null}, "restock": {"type": "BOOL", "index": 6, "name": "restock", "comment": null}, "user_id": {"type": "INT64", "index": 7, "name": "user_id", "comment": null}, "order_id": {"type": "INT64", "index": 8, "name": "order_id", "comment": null}, "total_duties_set": {"type": "STRING", "index": 9, "name": "total_duties_set", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 12576872.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 71098.0, "include": true, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.shopify_source.shopify.refund"}, "source.shopify_source.shopify.product_variant": {"metadata": {"type": "table", "schema": "shopify", "name": "product_variant", "database": "fivetran-db", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 2, "name": "_fivetran_synced", "comment": null}, "barcode": {"type": "STRING", "index": 3, "name": "barcode", "comment": null}, "compare_at_price": {"type": "FLOAT64", "index": 4, "name": "compare_at_price", "comment": null}, "created_at": {"type": "TIMESTAMP", "index": 5, "name": "created_at", "comment": null}, "fulfillment_service": {"type": "STRING", "index": 6, "name": "fulfillment_service", "comment": null}, "grams": {"type": "FLOAT64", "index": 7, "name": "grams", "comment": null}, "image_id": {"type": "INT64", "index": 8, "name": "image_id", "comment": null}, "inventory_item_id": {"type": "INT64", "index": 9, "name": "inventory_item_id", "comment": null}, "inventory_management": {"type": "STRING", "index": 10, "name": "inventory_management", "comment": null}, "inventory_policy": {"type": "STRING", "index": 11, "name": "inventory_policy", "comment": null}, "inventory_quantity": {"type": "INT64", "index": 12, "name": "inventory_quantity", "comment": null}, "old_inventory_quantity": {"type": "INT64", "index": 13, "name": "old_inventory_quantity", "comment": null}, "position": {"type": "INT64", "index": 14, "name": "position", "comment": null}, "price": {"type": "FLOAT64", "index": 15, "name": "price", "comment": null}, "product_id": {"type": "INT64", "index": 16, "name": "product_id", "comment": null}, "requires_shipping": {"type": "BOOL", "index": 17, "name": "requires_shipping", "comment": null}, "sku": {"type": "STRING", "index": 18, "name": "sku", "comment": null}, "taxable": {"type": "BOOL", "index": 19, "name": "taxable", "comment": null}, "title": {"type": "STRING", "index": 20, "name": "title", "comment": null}, "updated_at": {"type": "TIMESTAMP", "index": 21, "name": "updated_at", "comment": null}, "weight": {"type": "FLOAT64", "index": 22, "name": "weight", "comment": null}, "weight_unit": {"type": "STRING", "index": 23, "name": "weight_unit", "comment": null}, "option_1": {"type": "STRING", "index": 24, "name": "option_1", "comment": null}, "option_2": {"type": "STRING", "index": 25, "name": "option_2", "comment": null}, "option_3": {"type": "STRING", "index": 26, "name": "option_3", "comment": null}, "tax_code": {"type": "STRING", "index": 27, "name": "tax_code", "comment": null}, "presentment_prices": {"type": "STRING", "index": 28, "name": "presentment_prices", "comment": null}, "inventory_quantity_adjustment": {"type": "INT64", "index": 29, "name": "inventory_quantity_adjustment", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 5345172.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 28909.0, "include": true, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.shopify_source.shopify.product_variant"}, "source.shopify_source.shopify.order": {"metadata": {"type": "table", "schema": "shopify", "name": "order", "database": "fivetran-db", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 2, "name": "_fivetran_synced", "comment": null}, "billing_address_address_1": {"type": "STRING", "index": 3, "name": "billing_address_address_1", "comment": null}, "billing_address_address_2": {"type": "STRING", "index": 4, "name": "billing_address_address_2", "comment": null}, "billing_address_city": {"type": "STRING", "index": 5, "name": "billing_address_city", "comment": null}, "billing_address_company": {"type": "STRING", "index": 6, "name": "billing_address_company", "comment": null}, "billing_address_country": {"type": "STRING", "index": 7, "name": "billing_address_country", "comment": null}, "billing_address_country_code": {"type": "STRING", "index": 8, "name": "billing_address_country_code", "comment": null}, "billing_address_first_name": {"type": "STRING", "index": 9, "name": "billing_address_first_name", "comment": null}, "billing_address_last_name": {"type": "STRING", "index": 10, "name": "billing_address_last_name", "comment": null}, "billing_address_latitude": {"type": "STRING", "index": 11, "name": "billing_address_latitude", "comment": null}, "billing_address_longitude": {"type": "STRING", "index": 12, "name": "billing_address_longitude", "comment": null}, "billing_address_name": {"type": "STRING", "index": 13, "name": "billing_address_name", "comment": null}, "billing_address_phone": {"type": "STRING", "index": 14, "name": "billing_address_phone", "comment": null}, "billing_address_province": {"type": "STRING", "index": 15, "name": "billing_address_province", "comment": null}, "billing_address_province_code": {"type": "STRING", "index": 16, "name": "billing_address_province_code", "comment": null}, "billing_address_zip": {"type": "STRING", "index": 17, "name": "billing_address_zip", "comment": null}, "browser_ip": {"type": "STRING", "index": 18, "name": "browser_ip", "comment": null}, "buyer_accepts_marketing": {"type": "BOOL", "index": 19, "name": "buyer_accepts_marketing", "comment": null}, "cancel_reason": {"type": "STRING", "index": 20, "name": "cancel_reason", "comment": null}, "cancelled_at": {"type": "TIMESTAMP", "index": 21, "name": "cancelled_at", "comment": null}, "cart_token": {"type": "STRING", "index": 22, "name": "cart_token", "comment": null}, "checkout_token": {"type": "STRING", "index": 23, "name": "checkout_token", "comment": null}, "closed_at": {"type": "TIMESTAMP", "index": 24, "name": "closed_at", "comment": null}, "created_at": {"type": "TIMESTAMP", "index": 25, "name": "created_at", "comment": null}, "currency": {"type": "STRING", "index": 26, "name": "currency", "comment": null}, "customer_id": {"type": "INT64", "index": 27, "name": "customer_id", "comment": null}, "email": {"type": "STRING", "index": 28, "name": "email", "comment": null}, "financial_status": {"type": "STRING", "index": 29, "name": "financial_status", "comment": null}, "fulfillment_status": {"type": "STRING", "index": 30, "name": "fulfillment_status", "comment": null}, "landing_site_base_url": {"type": "STRING", "index": 31, "name": "landing_site_base_url", "comment": null}, "location_id": {"type": "INT64", "index": 32, "name": "location_id", "comment": null}, "name": {"type": "STRING", "index": 33, "name": "name", "comment": null}, "note": {"type": "STRING", "index": 34, "name": "note", "comment": null}, "number": {"type": "INT64", "index": 35, "name": "number", "comment": null}, "order_number": {"type": "INT64", "index": 36, "name": "order_number", "comment": null}, "processed_at": {"type": "TIMESTAMP", "index": 37, "name": "processed_at", "comment": null}, "processing_method": {"type": "STRING", "index": 38, "name": "processing_method", "comment": null}, "referring_site": {"type": "STRING", "index": 39, "name": "referring_site", "comment": null}, "shipping_address_address_1": {"type": "STRING", "index": 40, "name": "shipping_address_address_1", "comment": null}, "shipping_address_address_2": {"type": "STRING", "index": 41, "name": "shipping_address_address_2", "comment": null}, "shipping_address_city": {"type": "STRING", "index": 42, "name": "shipping_address_city", "comment": null}, "shipping_address_company": {"type": "STRING", "index": 43, "name": "shipping_address_company", "comment": null}, "shipping_address_country": {"type": "STRING", "index": 44, "name": "shipping_address_country", "comment": null}, "shipping_address_country_code": {"type": "STRING", "index": 45, "name": "shipping_address_country_code", "comment": null}, "shipping_address_first_name": {"type": "STRING", "index": 46, "name": "shipping_address_first_name", "comment": null}, "shipping_address_last_name": {"type": "STRING", "index": 47, "name": "shipping_address_last_name", "comment": null}, "shipping_address_latitude": {"type": "STRING", "index": 48, "name": "shipping_address_latitude", "comment": null}, "shipping_address_longitude": {"type": "STRING", "index": 49, "name": "shipping_address_longitude", "comment": null}, "shipping_address_name": {"type": "STRING", "index": 50, "name": "shipping_address_name", "comment": null}, "shipping_address_phone": {"type": "STRING", "index": 51, "name": "shipping_address_phone", "comment": null}, "shipping_address_province": {"type": "STRING", "index": 52, "name": "shipping_address_province", "comment": null}, "shipping_address_province_code": {"type": "STRING", "index": 53, "name": "shipping_address_province_code", "comment": null}, "shipping_address_zip": {"type": "STRING", "index": 54, "name": "shipping_address_zip", "comment": null}, "source_name": {"type": "STRING", "index": 55, "name": "source_name", "comment": null}, "subtotal_price": {"type": "FLOAT64", "index": 56, "name": "subtotal_price", "comment": null}, "taxes_included": {"type": "BOOL", "index": 57, "name": "taxes_included", "comment": null}, "test": {"type": "BOOL", "index": 58, "name": "test", "comment": null}, "token": {"type": "STRING", "index": 59, "name": "token", "comment": null}, "total_discounts": {"type": "FLOAT64", "index": 60, "name": "total_discounts", "comment": null}, "total_line_items_price": {"type": "FLOAT64", "index": 61, "name": "total_line_items_price", "comment": null}, "total_price": {"type": "FLOAT64", "index": 62, "name": "total_price", "comment": null}, "total_tax": {"type": "FLOAT64", "index": 63, "name": "total_tax", "comment": null}, "total_weight": {"type": "INT64", "index": 64, "name": "total_weight", "comment": null}, "updated_at": {"type": "TIMESTAMP", "index": 65, "name": "updated_at", "comment": null}, "user_id": {"type": "INT64", "index": 66, "name": "user_id", "comment": null}, "app_id": {"type": "INT64", "index": 67, "name": "app_id", "comment": null}, "billing_address_id": {"type": "INT64", "index": 68, "name": "billing_address_id", "comment": null}, "billing_address_is_default": {"type": "BOOL", "index": 69, "name": "billing_address_is_default", "comment": null}, "confirmed": {"type": "BOOL", "index": 70, "name": "confirmed", "comment": null}, "current_total_duties_set": {"type": "STRING", "index": 71, "name": "current_total_duties_set", "comment": null}, "customer_locale": {"type": "STRING", "index": 72, "name": "customer_locale", "comment": null}, "device_id": {"type": "STRING", "index": 73, "name": "device_id", "comment": null}, "landing_site_ref": {"type": "STRING", "index": 74, "name": "landing_site_ref", "comment": null}, "original_total_duties_set": {"type": "STRING", "index": 75, "name": "original_total_duties_set", "comment": null}, "payment_gateway_names": {"type": "STRING", "index": 76, "name": "payment_gateway_names", "comment": null}, "presentment_currency": {"type": "STRING", "index": 77, "name": "presentment_currency", "comment": null}, "reference": {"type": "STRING", "index": 78, "name": "reference", "comment": null}, "shipping_address_id": {"type": "INT64", "index": 79, "name": "shipping_address_id", "comment": null}, "shipping_address_is_default": {"type": "BOOL", "index": 80, "name": "shipping_address_is_default", "comment": null}, "source_identifier": {"type": "STRING", "index": 81, "name": "source_identifier", "comment": null}, "source_url": {"type": "STRING", "index": 82, "name": "source_url", "comment": null}, "subtotal_price_set": {"type": "STRING", "index": 83, "name": "subtotal_price_set", "comment": null}, "total_discounts_set": {"type": "STRING", "index": 84, "name": "total_discounts_set", "comment": null}, "total_line_items_price_set": {"type": "STRING", "index": 85, "name": "total_line_items_price_set", "comment": null}, "total_price_set": {"type": "STRING", "index": 86, "name": "total_price_set", "comment": null}, "total_price_usd": {"type": "FLOAT64", "index": 87, "name": "total_price_usd", "comment": null}, "total_shipping_price_set": {"type": "STRING", "index": 88, "name": "total_shipping_price_set", "comment": null}, "total_tax_set": {"type": "STRING", "index": 89, "name": "total_tax_set", "comment": null}, "total_tip_received": {"type": "FLOAT64", "index": 90, "name": "total_tip_received", "comment": null}, "note_attributes": {"type": "STRING", "index": 91, "name": "note_attributes", "comment": null}, "client_details_user_agent": {"type": "STRING", "index": 92, "name": "client_details_user_agent", "comment": null}, "current_subtotal_price_set": {"type": "STRING", "index": 93, "name": "current_subtotal_price_set", "comment": null}, "current_total_tax": {"type": "FLOAT64", "index": 94, "name": "current_total_tax", "comment": null}, "current_total_tax_set": {"type": "STRING", "index": 95, "name": "current_total_tax_set", "comment": null}, "current_total_price_set": {"type": "STRING", "index": 96, "name": "current_total_price_set", "comment": null}, "current_subtotal_price": {"type": "FLOAT64", "index": 97, "name": "current_subtotal_price", "comment": null}, "current_total_price": {"type": "FLOAT64", "index": 98, "name": "current_total_price", "comment": null}, "current_total_discounts": {"type": "FLOAT64", "index": 99, "name": "current_total_discounts", "comment": null}, "current_total_discounts_set": {"type": "STRING", "index": 100, "name": "current_total_discounts_set", "comment": null}, "_fivetran_deleted": {"type": "BOOL", "index": 101, "name": "_fivetran_deleted", "comment": null}, "order_status_url": {"type": "STRING", "index": 102, "name": "order_status_url", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 418358566.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 344100.0, "include": true, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.shopify_source.shopify.order"}, "source.shopify_source.shopify.product": {"metadata": {"type": "table", "schema": "shopify", "name": "product", "database": "fivetran-db", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "_fivetran_deleted": {"type": "BOOL", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 3, "name": "_fivetran_synced", "comment": null}, "created_at": {"type": "TIMESTAMP", "index": 4, "name": "created_at", "comment": null}, "handle": {"type": "STRING", "index": 5, "name": "handle", "comment": null}, "product_type": {"type": "STRING", "index": 6, "name": "product_type", "comment": null}, "published_at": {"type": "TIMESTAMP", "index": 7, "name": "published_at", "comment": null}, "published_scope": {"type": "STRING", "index": 8, "name": "published_scope", "comment": null}, "title": {"type": "STRING", "index": 9, "name": "title", "comment": null}, "updated_at": {"type": "TIMESTAMP", "index": 10, "name": "updated_at", "comment": null}, "vendor": {"type": "STRING", "index": 11, "name": "vendor", "comment": null}, "status": {"type": "STRING", "index": 12, "name": "status", "comment": null}, "template_suffix": {"type": "STRING", "index": 13, "name": "template_suffix", "comment": null}, "body_html": {"type": "STRING", "index": 14, "name": "body_html", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 1141039.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 3497.0, "include": true, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.shopify_source.shopify.product"}, "source.shopify_source.shopify.customer": {"metadata": {"type": "table", "schema": "shopify", "name": "customer", "database": "fivetran-db", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 2, "name": "_fivetran_synced", "comment": null}, "accepts_marketing": {"type": "BOOL", "index": 3, "name": "accepts_marketing", "comment": null}, "created_at": {"type": "TIMESTAMP", "index": 4, "name": "created_at", "comment": null}, "default_address_id": {"type": "INT64", "index": 5, "name": "default_address_id", "comment": null}, "email": {"type": "STRING", "index": 6, "name": "email", "comment": null}, "first_name": {"type": "STRING", "index": 7, "name": "first_name", "comment": null}, "last_name": {"type": "STRING", "index": 8, "name": "last_name", "comment": null}, "orders_count": {"type": "INT64", "index": 9, "name": "orders_count", "comment": null}, "phone": {"type": "STRING", "index": 10, "name": "phone", "comment": null}, "state": {"type": "STRING", "index": 11, "name": "state", "comment": null}, "tax_exempt": {"type": "BOOL", "index": 12, "name": "tax_exempt", "comment": null}, "total_spent": {"type": "FLOAT64", "index": 13, "name": "total_spent", "comment": null}, "updated_at": {"type": "TIMESTAMP", "index": 14, "name": "updated_at", "comment": null}, "verified_email": {"type": "BOOL", "index": 15, "name": "verified_email", "comment": null}, "note": {"type": "STRING", "index": 16, "name": "note", "comment": null}, "accepts_marketing_updated_at": {"type": "TIMESTAMP", "index": 17, "name": "accepts_marketing_updated_at", "comment": null}, "marketing_opt_in_level": {"type": "STRING", "index": 18, "name": "marketing_opt_in_level", "comment": null}, "lifetime_duration": {"type": "STRING", "index": 19, "name": "lifetime_duration", "comment": null}, "can_delete": {"type": "BOOL", "index": 20, "name": "can_delete", "comment": null}, "multipass_identifier": {"type": "STRING", "index": 21, "name": "multipass_identifier", "comment": null}, "_fivetran_deleted": {"type": "BOOL", "index": 22, "name": "_fivetran_deleted", "comment": null}, "metafield": {"type": "STRING", "index": 23, "name": "metafield", "comment": null}, "currency": {"type": "STRING", "index": 24, "name": "currency", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 22968038.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 196281.0, "include": true, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.shopify_source.shopify.customer"}, "source.shopify_source.shopify.order_line_refund": {"metadata": {"type": "table", "schema": "shopify", "name": "order_line_refund", "database": "fivetran-db", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 2, "name": "_fivetran_synced", "comment": null}, "location_id": {"type": "INT64", "index": 3, "name": "location_id", "comment": null}, "order_line_id": {"type": "INT64", "index": 4, "name": "order_line_id", "comment": null}, "quantity": {"type": "FLOAT64", "index": 5, "name": "quantity", "comment": null}, "refund_id": {"type": "INT64", "index": 6, "name": "refund_id", "comment": null}, "restock_type": {"type": "STRING", "index": 7, "name": "restock_type", "comment": null}, "subtotal": {"type": "FLOAT64", "index": 8, "name": "subtotal", "comment": null}, "subtotal_set": {"type": "STRING", "index": 9, "name": "subtotal_set", "comment": null}, "total_tax": {"type": "FLOAT64", "index": 10, "name": "total_tax", "comment": null}, "total_tax_set": {"type": "STRING", "index": 11, "name": "total_tax_set", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 20718794.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 95364.0, "include": true, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.shopify_source.shopify.order_line_refund"}, "source.shopify_source.shopify.transaction": {"metadata": {"type": "table", "schema": "shopify", "name": "transaction", "database": "fivetran-db", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 2, "name": "_fivetran_synced", "comment": null}, "amount": {"type": "FLOAT64", "index": 3, "name": "amount", "comment": null}, "authorization": {"type": "STRING", "index": 4, "name": "authorization", "comment": null}, "created_at": {"type": "TIMESTAMP", "index": 5, "name": "created_at", "comment": null}, "currency": {"type": "STRING", "index": 6, "name": "currency", "comment": null}, "currency_exchange_adjustment": {"type": "FLOAT64", "index": 7, "name": "currency_exchange_adjustment", "comment": null}, "currency_exchange_currency": {"type": "STRING", "index": 8, "name": "currency_exchange_currency", "comment": null}, "currency_exchange_final_amount": {"type": "FLOAT64", "index": 9, "name": "currency_exchange_final_amount", "comment": null}, "currency_exchange_id": {"type": "INT64", "index": 10, "name": "currency_exchange_id", "comment": null}, "currency_exchange_original_amount": {"type": "FLOAT64", "index": 11, "name": "currency_exchange_original_amount", "comment": null}, "device_id": {"type": "STRING", "index": 12, "name": "device_id", "comment": null}, "error_code": {"type": "STRING", "index": 13, "name": "error_code", "comment": null}, "gateway": {"type": "STRING", "index": 14, "name": "gateway", "comment": null}, "kind": {"type": "STRING", "index": 15, "name": "kind", "comment": null}, "location_id": {"type": "INT64", "index": 16, "name": "location_id", "comment": null}, "message": {"type": "STRING", "index": 17, "name": "message", "comment": null}, "order_id": {"type": "INT64", "index": 18, "name": "order_id", "comment": null}, "parent_id": {"type": "INT64", "index": 19, "name": "parent_id", "comment": null}, "payment_avs_result_code": {"type": "STRING", "index": 20, "name": "payment_avs_result_code", "comment": null}, "payment_credit_card_bin": {"type": "STRING", "index": 21, "name": "payment_credit_card_bin", "comment": null}, "payment_credit_card_company": {"type": "STRING", "index": 22, "name": "payment_credit_card_company", "comment": null}, "payment_credit_card_number": {"type": "STRING", "index": 23, "name": "payment_credit_card_number", "comment": null}, "payment_cvv_result_code": {"type": "STRING", "index": 24, "name": "payment_cvv_result_code", "comment": null}, "processed_at": {"type": "TIMESTAMP", "index": 25, "name": "processed_at", "comment": null}, "receipt": {"type": "STRING", "index": 26, "name": "receipt", "comment": null}, "refund_id": {"type": "INT64", "index": 27, "name": "refund_id", "comment": null}, "source_name": {"type": "STRING", "index": 28, "name": "source_name", "comment": null}, "status": {"type": "STRING", "index": 29, "name": "status", "comment": null}, "test": {"type": "BOOL", "index": 30, "name": "test", "comment": null}, "user_id": {"type": "STRING", "index": 31, "name": "user_id", "comment": null}, "extended_authorization_standard_authorization_expires_at": {"type": "TIMESTAMP", "index": 32, "name": "extended_authorization_standard_authorization_expires_at", "comment": null}, "authorization_expires_at": {"type": "TIMESTAMP", "index": 33, "name": "authorization_expires_at", "comment": null}, "extended_authorization_extended_authorization_expires_at": {"type": "TIMESTAMP", "index": 34, "name": "extended_authorization_extended_authorization_expires_at", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 1089735134.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 573412.0, "include": true, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.shopify_source.shopify.transaction"}, "source.shopify_source.shopify.order_line": {"metadata": {"type": "table", "schema": "shopify", "name": "order_line", "database": "fivetran-db", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "order_id": {"type": "INT64", "index": 2, "name": "order_id", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 3, "name": "_fivetran_synced", "comment": null}, "fulfillable_quantity": {"type": "FLOAT64", "index": 4, "name": "fulfillable_quantity", "comment": null}, "fulfillment_service": {"type": "STRING", "index": 5, "name": "fulfillment_service", "comment": null}, "fulfillment_status": {"type": "STRING", "index": 6, "name": "fulfillment_status", "comment": null}, "gift_card": {"type": "BOOL", "index": 7, "name": "gift_card", "comment": null}, "grams": {"type": "INT64", "index": 8, "name": "grams", "comment": null}, "index": {"type": "INT64", "index": 9, "name": "index", "comment": null}, "name": {"type": "STRING", "index": 10, "name": "name", "comment": null}, "pre_tax_price": {"type": "FLOAT64", "index": 11, "name": "pre_tax_price", "comment": null}, "price": {"type": "FLOAT64", "index": 12, "name": "price", "comment": null}, "product_id": {"type": "INT64", "index": 13, "name": "product_id", "comment": null}, "property_acadaca_color": {"type": "STRING", "index": 14, "name": "property_acadaca_color", "comment": null}, "property_acadaca_size": {"type": "STRING", "index": 15, "name": "property_acadaca_size", "comment": null}, "property_acadaca_sku": {"type": "STRING", "index": 16, "name": "property_acadaca_sku", "comment": null}, "quantity": {"type": "FLOAT64", "index": 17, "name": "quantity", "comment": null}, "requires_shipping": {"type": "BOOL", "index": 18, "name": "requires_shipping", "comment": null}, "sku": {"type": "STRING", "index": 19, "name": "sku", "comment": null}, "taxable": {"type": "BOOL", "index": 20, "name": "taxable", "comment": null}, "title": {"type": "STRING", "index": 21, "name": "title", "comment": null}, "total_discount": {"type": "FLOAT64", "index": 22, "name": "total_discount", "comment": null}, "variant_id": {"type": "INT64", "index": 23, "name": "variant_id", "comment": null}, "vendor": {"type": "STRING", "index": 24, "name": "vendor", "comment": null}, "property_card_message": {"type": "STRING", "index": 25, "name": "property_card_message", "comment": null}, "property_mw_grouped_product_discounted_price": {"type": "FLOAT64", "index": 26, "name": "property_mw_grouped_product_discounted_price", "comment": null}, "property_mw_grouped_product_relation": {"type": "INT64", "index": 27, "name": "property_mw_grouped_product_relation", "comment": null}, "property_mw_grouped_product_relation_3586136703076": {"type": "INT64", "index": 28, "name": "property_mw_grouped_product_relation_3586136703076", "comment": null}, "property_mw_grouped_product_relation_4321154596975": {"type": "INT64", "index": 29, "name": "property_mw_grouped_product_relation_4321154596975", "comment": null}, "property_mw_grouped_product_relation_4321154695279": {"type": "INT64", "index": 30, "name": "property_mw_grouped_product_relation_4321154695279", "comment": null}, "property_mw_grouped_product_relation_4321154891887": {"type": "INT64", "index": 31, "name": "property_mw_grouped_product_relation_4321154891887", "comment": null}, "property_mw_grouped_product_relation_4339644432495": {"type": "INT64", "index": 32, "name": "property_mw_grouped_product_relation_4339644432495", "comment": null}, "property_pre_order_date": {"type": "STRING", "index": 33, "name": "property_pre_order_date", "comment": null}, "property_recipient_email": {"type": "STRING", "index": 34, "name": "property_recipient_email", "comment": null}, "property_recipient_name": {"type": "STRING", "index": 35, "name": "property_recipient_name", "comment": null}, "property_send_date": {"type": "STRING", "index": 36, "name": "property_send_date", "comment": null}, "property_senders_name": {"type": "STRING", "index": 37, "name": "property_senders_name", "comment": null}, "property_mw_grouped_product_relation_4170368909412": {"type": "INT64", "index": 38, "name": "property_mw_grouped_product_relation_4170368909412", "comment": null}, "property_mw_grouped_product_relation_4321154498671": {"type": "INT64", "index": 39, "name": "property_mw_grouped_product_relation_4321154498671", "comment": null}, "property_mw_grouped_product_relation_4321154793583": {"type": "INT64", "index": 40, "name": "property_mw_grouped_product_relation_4321154793583", "comment": null}, "property_mw_grouped_product_relation_4321154859119": {"type": "INT64", "index": 41, "name": "property_mw_grouped_product_relation_4321154859119", "comment": null}, "destination_location_address_1": {"type": "STRING", "index": 42, "name": "destination_location_address_1", "comment": null}, "destination_location_address_2": {"type": "STRING", "index": 43, "name": "destination_location_address_2", "comment": null}, "destination_location_city": {"type": "STRING", "index": 44, "name": "destination_location_city", "comment": null}, "destination_location_country_code": {"type": "STRING", "index": 45, "name": "destination_location_country_code", "comment": null}, "destination_location_id": {"type": "INT64", "index": 46, "name": "destination_location_id", "comment": null}, "destination_location_name": {"type": "STRING", "index": 47, "name": "destination_location_name", "comment": null}, "destination_location_province_code": {"type": "STRING", "index": 48, "name": "destination_location_province_code", "comment": null}, "destination_location_zip": {"type": "STRING", "index": 49, "name": "destination_location_zip", "comment": null}, "origin_location_address_1": {"type": "STRING", "index": 50, "name": "origin_location_address_1", "comment": null}, "origin_location_address_2": {"type": "STRING", "index": 51, "name": "origin_location_address_2", "comment": null}, "origin_location_city": {"type": "STRING", "index": 52, "name": "origin_location_city", "comment": null}, "origin_location_country_code": {"type": "STRING", "index": 53, "name": "origin_location_country_code", "comment": null}, "origin_location_id": {"type": "INT64", "index": 54, "name": "origin_location_id", "comment": null}, "origin_location_name": {"type": "STRING", "index": 55, "name": "origin_location_name", "comment": null}, "origin_location_province_code": {"type": "STRING", "index": 56, "name": "origin_location_province_code", "comment": null}, "origin_location_zip": {"type": "STRING", "index": 57, "name": "origin_location_zip", "comment": null}, "pre_tax_price_set": {"type": "STRING", "index": 58, "name": "pre_tax_price_set", "comment": null}, "price_set": {"type": "STRING", "index": 59, "name": "price_set", "comment": null}, "product_exists": {"type": "BOOL", "index": 60, "name": "product_exists", "comment": null}, "tax_code": {"type": "STRING", "index": 61, "name": "tax_code", "comment": null}, "total_discount_set": {"type": "STRING", "index": 62, "name": "total_discount_set", "comment": null}, "variant_inventory_management": {"type": "STRING", "index": 63, "name": "variant_inventory_management", "comment": null}, "variant_title": {"type": "STRING", "index": 64, "name": "variant_title", "comment": null}, "properties": {"type": "STRING", "index": 65, "name": "properties", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 251848155.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 598123.0, "include": true, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.shopify_source.shopify.order_line"}, "source.shopify_source.shopify.order_adjustment": {"metadata": {"type": "table", "schema": "shopify", "name": "order_adjustment", "database": "fivetran-db", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 2, "name": "_fivetran_synced", "comment": null}, "amount": {"type": "FLOAT64", "index": 3, "name": "amount", "comment": null}, "amount_set": {"type": "STRING", "index": 4, "name": "amount_set", "comment": null}, "kind": {"type": "STRING", "index": 5, "name": "kind", "comment": null}, "order_id": {"type": "INT64", "index": 6, "name": "order_id", "comment": null}, "reason": {"type": "STRING", "index": 7, "name": "reason", "comment": null}, "refund_id": {"type": "INT64", "index": 8, "name": "refund_id", "comment": null}, "tax_amount": {"type": "FLOAT64", "index": 9, "name": "tax_amount", "comment": null}, "tax_amount_set": {"type": "STRING", "index": 10, "name": "tax_amount_set", "comment": null}}, "stats": {"num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 10760430.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "num_rows": {"id": "num_rows", "label": "# Rows", "value": 33365.0, "include": true, "description": "Approximate count of rows in this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.shopify_source.shopify.order_adjustment"}}, "errors": null} \ No newline at end of file +{"metadata": {"dbt_schema_version": "https://schemas.getdbt.com/dbt/catalog/v1.json", "dbt_version": "1.2.0", "generated_at": "2022-10-13T23:10:16.707559Z", "invocation_id": "995a6e9b-ac7c-4344-a33a-82df97529d6b", "env": {}}, "nodes": {}, "sources": {"source.klaviyo_source.klaviyo.integration": {"metadata": {"type": "table", "schema": "klaviyo", "name": "integration", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "STRING", "index": 1, "name": "id", "comment": null}, "_fivetran_deleted": {"type": "BOOL", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 3, "name": "_fivetran_synced", "comment": null}, "category": {"type": "STRING", "index": 4, "name": "category", "comment": null}, "name": {"type": "STRING", "index": 5, "name": "name", "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": 63.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.klaviyo_source.klaviyo.integration"}, "source.klaviyo_source.klaviyo.campaign": {"metadata": {"type": "table", "schema": "klaviyo", "name": "campaign", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "STRING", "index": 1, "name": "id", "comment": null}, "_fivetran_deleted": {"type": "BOOL", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 3, "name": "_fivetran_synced", "comment": null}, "campaign_type": {"type": "STRING", "index": 4, "name": "campaign_type", "comment": null}, "created": {"type": "TIMESTAMP", "index": 5, "name": "created", "comment": null}, "email_template_id": {"type": "STRING", "index": 6, "name": "email_template_id", "comment": null}, "from_email": {"type": "STRING", "index": 7, "name": "from_email", "comment": null}, "from_name": {"type": "STRING", "index": 8, "name": "from_name", "comment": null}, "is_segmented": {"type": "BOOL", "index": 9, "name": "is_segmented", "comment": null}, "name": {"type": "STRING", "index": 10, "name": "name", "comment": null}, "send_time": {"type": "TIMESTAMP", "index": 11, "name": "send_time", "comment": null}, "sent_at": {"type": "TIMESTAMP", "index": 12, "name": "sent_at", "comment": null}, "status": {"type": "STRING", "index": 13, "name": "status", "comment": null}, "status_id": {"type": "STRING", "index": 14, "name": "status_id", "comment": null}, "status_label": {"type": "STRING", "index": 15, "name": "status_label", "comment": null}, "subject": {"type": "STRING", "index": 16, "name": "subject", "comment": null}, "updated": {"type": "TIMESTAMP", "index": 17, "name": "updated", "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": 630.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.klaviyo_source.klaviyo.campaign"}, "source.klaviyo_source.klaviyo.event": {"metadata": {"type": "table", "schema": "klaviyo", "name": "event", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "STRING", "index": 1, "name": "id", "comment": null}, "_fivetran_deleted": {"type": "BOOL", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 3, "name": "_fivetran_synced", "comment": null}, "_variation": {"type": "STRING", "index": 4, "name": "_variation", "comment": null}, "campaign_id": {"type": "STRING", "index": 5, "name": "campaign_id", "comment": null}, "datetime": {"type": "TIMESTAMP", "index": 6, "name": "datetime", "comment": null}, "flow_id": {"type": "STRING", "index": 7, "name": "flow_id", "comment": null}, "flow_message_id": {"type": "STRING", "index": 8, "name": "flow_message_id", "comment": null}, "metric_id": {"type": "STRING", "index": 9, "name": "metric_id", "comment": null}, "person_id": {"type": "STRING", "index": 10, "name": "person_id", "comment": null}, "property_attribution": {"type": "STRING", "index": 11, "name": "property_attribution", "comment": null}, "property_campaign_name": {"type": "STRING", "index": 12, "name": "property_campaign_name", "comment": null}, "property_client_name": {"type": "STRING", "index": 13, "name": "property_client_name", "comment": null}, "property_client_os": {"type": "STRING", "index": 14, "name": "property_client_os", "comment": null}, "property_client_os_family": {"type": "STRING", "index": 15, "name": "property_client_os_family", "comment": null}, "property_client_type": {"type": "STRING", "index": 16, "name": "property_client_type", "comment": null}, "property_cohort_message_send_cohort": {"type": "STRING", "index": 17, "name": "property_cohort_message_send_cohort", "comment": null}, "property_email_domain": {"type": "STRING", "index": 18, "name": "property_email_domain", "comment": null}, "property_event_id": {"type": "STRING", "index": 19, "name": "property_event_id", "comment": null}, "property_message_interaction": {"type": "STRING", "index": 20, "name": "property_message_interaction", "comment": null}, "property_subject": {"type": "STRING", "index": 21, "name": "property_subject", "comment": null}, "timestamp": {"type": "TIMESTAMP", "index": 22, "name": "timestamp", "comment": null}, "type": {"type": "STRING", "index": 23, "name": "type", "comment": null}, "uuid": {"type": "STRING", "index": 24, "name": "uuid", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 11.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 3485.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.klaviyo_source.klaviyo.event"}, "source.klaviyo_source.klaviyo.person": {"metadata": {"type": "table", "schema": "klaviyo", "name": "person", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "STRING", "index": 1, "name": "id", "comment": null}, "_fivetran_deleted": {"type": "BOOL", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 3, "name": "_fivetran_synced", "comment": null}, "address_1": {"type": "STRING", "index": 4, "name": "address_1", "comment": null}, "address_2": {"type": "STRING", "index": 5, "name": "address_2", "comment": null}, "city": {"type": "STRING", "index": 6, "name": "city", "comment": null}, "country": {"type": "STRING", "index": 7, "name": "country", "comment": null}, "created": {"type": "TIMESTAMP", "index": 8, "name": "created", "comment": null}, "custom_email": {"type": "STRING", "index": 9, "name": "custom_email", "comment": null}, "custom_object": {"type": "STRING", "index": 10, "name": "custom_object", "comment": null}, "email": {"type": "STRING", "index": 11, "name": "email", "comment": null}, "first_name": {"type": "STRING", "index": 12, "name": "first_name", "comment": null}, "last_name": {"type": "STRING", "index": 13, "name": "last_name", "comment": null}, "latitude": {"type": "FLOAT64", "index": 14, "name": "latitude", "comment": null}, "longitude": {"type": "FLOAT64", "index": 15, "name": "longitude", "comment": null}, "organization": {"type": "STRING", "index": 16, "name": "organization", "comment": null}, "phone_number": {"type": "STRING", "index": 17, "name": "phone_number", "comment": null}, "region": {"type": "STRING", "index": 18, "name": "region", "comment": null}, "timezone": {"type": "STRING", "index": 19, "name": "timezone", "comment": null}, "title": {"type": "STRING", "index": 20, "name": "title", "comment": null}, "updated": {"type": "TIMESTAMP", "index": 21, "name": "updated", "comment": null}, "zip": {"type": "STRING", "index": 22, "name": "zip", "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": 147.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.klaviyo_source.klaviyo.person"}, "source.klaviyo_source.klaviyo.flow": {"metadata": {"type": "table", "schema": "klaviyo", "name": "flow", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "STRING", "index": 1, "name": "id", "comment": null}, "_fivetran_deleted": {"type": "BOOL", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 3, "name": "_fivetran_synced", "comment": null}, "created": {"type": "TIMESTAMP", "index": 4, "name": "created", "comment": null}, "customer_filter": {"type": "STRING", "index": 5, "name": "customer_filter", "comment": null}, "name": {"type": "STRING", "index": 6, "name": "name", "comment": null}, "status": {"type": "STRING", "index": 7, "name": "status", "comment": null}, "trigger": {"type": "STRING", "index": 8, "name": "trigger", "comment": null}, "updated": {"type": "TIMESTAMP", "index": 9, "name": "updated", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 6.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 1022.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.klaviyo_source.klaviyo.flow"}, "source.klaviyo_source.klaviyo.metric": {"metadata": {"type": "table", "schema": "klaviyo", "name": "metric", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "STRING", "index": 1, "name": "id", "comment": null}, "_fivetran_deleted": {"type": "BOOL", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 3, "name": "_fivetran_synced", "comment": null}, "created": {"type": "TIMESTAMP", "index": 4, "name": "created", "comment": null}, "integration_id": {"type": "STRING", "index": 5, "name": "integration_id", "comment": null}, "name": {"type": "STRING", "index": 6, "name": "name", "comment": null}, "updated": {"type": "TIMESTAMP", "index": 7, "name": "updated", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 8.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 455.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.klaviyo_source.klaviyo.metric"}}, "errors": null} \ No newline at end of file diff --git a/docs/graph.gpickle b/docs/graph.gpickle index 2963f07ff809a495a6ae6e5a6cc2ad5d0efe9af9..1bff471c009a1b5ed5423cb3a8019786feeafa95 100644 GIT binary patch literal 383143 zcmeFa3y@^lStce>KWm;n@3-#sXu7Lss;cw-n9&H;%yf@hGwK$#&*Fk16F8$)-iy)!-hYUefn>nC?keQD?2o#pAn{HEcK$HRu-@y3mo>x~D) z?Vah7=A_dbclx89=>dAP^OHN%WBq|2M89hvnLfl%lU3l=W3J!rbw=aHU@{J3E!eL+ z{eH^phXQ{iNTCfS4@!^T-I*S2Q1jfGXGVj`&#2z!?Uq7Jv8##!KP~$ zK04`lJ~s&(9e<~N-}FvZq|tXbQA?uHqr<^q+}Lu*n4-z)OQT>oI^A_QJHgs;;14?+ zli;1xuLh$lX17hqR*lACB>T z>bW0`ykTdHXx*8903+HPxHMPo=ch{@Kj@D;tqy+bIho!y3{=VS_7+C;knY9d&rJqA zDevyISATFcJ=(&T?S3#C@w_ixbBFzg+rnDJ@97=Ea5xy6-;?Pb5kj6n<9cmp7_vN(Cs%y+kG$a>1q2!%JX)8 zTDsT{oN;F}aIUq3zT@g9uel=!J9z9&wy*>P-)U|;XH~Um@W5s;cBvZ&#_q-l%XufX3R!PE0g{h$Ahe}%-0~|G!a2; zKvUoixTyX)qtz#pUFV_=PjPzeq}kt~{Wqz79E7XAV2u6lP+4dB+=VxtV!l#Y&C_Do zbjPR6qF9{1$Kv$0Izyas%=2VmW_LsdlSsZ!Jcmq{FxhuScXkY zVwZ*=fRyhbQkcuwb9G&mJQ5$49!{U}L=I<6S@wI-@nNAu3M{ZjlD!)AH|*ACe1PVj z<>qve1=>sOa%;BJ-|4|^O?tf>pXLYSgS*up^jYk|$Y#6*1|O)e))4R=;M9*8Ops-sxu>TY`ViMfs(*T;K_Uq zqRxJ*4Q_^(BF%b(K8ab>-hd>b01}S_@w(Gfa?r?W4F{WCh$K{-7vAN$Sf)Kl!7dIv zH4CwaX!yiM^i#e;FSo;vIV5sP9YKW2-YE}zfe&>=)f;_=YS*Y*lGGp}f_fv+QTIe( z%&LCLbBE)`cyJ}qMB7hLHH(O${6?RHYIl4R(rC(wo|vVhUT=Uo4vDuOp!$`?DCaut z@m^B$V_2{K1Qnm9irvY0un|DPW3glY04bT&maapg^oTbZ4uig@MUe2f?#H+dku!4Y z8?g_|1?yYN+x@shFZxh;jyyuuAEKUwGr%K^(bom-+79w+RjWk(Kn+h)4f=Z&l{Kv- zW4rvlE$CT&NNK$WvC0Xn6xd72=cx62s8;!mcD0fdW-SZn6;fdOy=|w7k`T`IM%P*m zdL>g}=>qrR6ocZ|BOxS8RoWZS#Vb~ilA;eY3Q25pM1-pPu+5=j1WsohY>wUcPdbV-W<9xY~z7%C4+V1zHWPl&iH>b{;NDMK>AiWBa8D6igNv)SomltPXhp9sfj zB~l9s37yaLu#YA!`jhom7vn=qmsS*p3CES!cKgH*rNJJ(rDG_vrVjK6V=ctU-yr!# zTVtdTR11zZ>)`&7o5lnO;83C#nL2v`9Fi5KW?cV5{ohSf%%6igEKk-*HR03-aS>9D zXjkxeSik34R>Lmlega7X1VRceRv-2fm_MYryxshrTvCmuKAHRnyj(UdqjheZ0`;v#pNMHHSG(PyCYhl$FRQ-Zh_w@jy~sYvbht8Q-sE+X5P z3(Gp$+6vqu7*5~W1~#b1SI%cSK6#(3W#j@W*anJ5V9#JUj;x(yszuu4qJ*hYPI-Y& zJoWLxHC`xMaf=ddjmh041`mf+FYyjlYy2sye1XR0TF|7gtR1Skk>m9`-W4zfmpJMb zy-?%q;jvM>v$aL7WuZE=z5p4|6B+3MimqCVnfBCY*Q$Y?Szn;tH|%}7OJrvjVGrt; zW=J!lSYTU z2OT*Y16$XNK`65tep0`*1|R|Q%=ri;yhS8fs@!f-9!*8s*gURZ8WIyY&&*Fi-pfSZ zu7DohW*R}s9TGx03U|`Q4awmbAZMM(*$vpEt4pKiQT@_tD}wjT_yDvB0;3Qjy^3{} zY3-%-UgI~4Y0mlrEwb9z(`6QEGP(UN)F2wsD`Vx1fO$|1{u7 zSC}@$$r;0`XG1?TK0upq$N9mov7cGQJ*8iULy?01%=-#t@}{(S#(elkx12U+59pVM ztPlW7e+Lp+FDATaR|t@9DTR#ovM_*%r40>vz*v+nA;Oa~;{jh;V?|KufUFPt6B0v| zl*KwA0I?O8mLOR{Hg>KJA$+*a9+Y}AqQRWzN2H{?N0a7wfL=AWh8+VK#-D;NmzD~D zqxYeZrzA0!y|tz;Z9$hC@%b`>Ry2n03at-~VtVsSqojD*;6XDdn-ziR-(>;a9| z=CQkDPeD~4qcvtkiYjC2TNlz2yO627X-hZ<$jYiXk^GGspENZpjnst-43i#LW0yW? zqd)2gm0x$nlni+e=#bG96XoxbVK;-M2uVCfov+i_^XJx>!X()1kV+}~&4N>7_uwI+ zfYkX0R>|flvIer=f}S$bGn#DDN^pUd8$du72o!nI@*<1EZuySnl8Zb-8=G_5SP6#$ z0Cm=)N~gs6Bp_1)Q$)MF8rZZQ722@Y)QngUK-Z-hU1ORWS$xq6v9^b3rh0d*C7M5F zw|}R!e=X>2wDszYJ_8kEs!f{#DaTU)XM!k1v!v|Op)O}XLA8u?M>RP%z||_b(EO%R z4NJLW2?dS_Wc820u!o_o0p!*@*!)CWeD;Kx27L%TV`BqL8lDgXZK!wNdh-I5r$MMd zhU)x^)4>9yVfTo|S)({1{Ly$ZD7!lu$)|?^SGPJFnA_>$pijm89rzs_oAiM?K}`nc z8h!z{1u}`jA%n$;>B-9}{v?;zF4IDX{|f%%S--r~{_1P%fBMHKzI5r^|7tQlA@3X*1qG1eUimh)gpkQB^j zf@E9UrTtauVayo7>SB}~n9Z-(p;%x9ezt0y-scA`chVahA7atspEZI-=wLN# ze5OZ3O;Red9)N~NV>B2o(;{IiDCGz&5vsmA52Mde6C*1MpErwvflY5YCBO3KnKR_<;6@C?8ZJ1x|aR!VT zD|cBOut#7C0z@PDJgrDI#`Y6b{>!Pm9(|TVVk-e~$?KVg5#XoecF<7(>Y8&7eq_T5 z@O?bREB@x%pnsCZAWM`qm@WC5wFB=8{6M*M%k7O~#bI3{Axf9FOIUEJ66{7>fW%er zB9G8Lc0pjV$8k3`vc3s#39|H}TF`7(4)Z#$45K<6j2J-H{d6F+lQXO}xZU5v`KP#> zCH|n*by{HaxLc<$>x>)?2odI8qUy0)ncjUB+?AxChHXoXKSisR)Ttx}u4|y~qC*iT zWHrU2P4^GDS0vGN|A_zWehvTp;Hdl0<<}qMpXqaR#TC6DEs5p8PfVuEvn3W5avCJ{ zFC?=pS>G=zwY>W6`$cN8d!He)9!M3?{@zUsb>L7B690?l+QeEM9iMdMiftV0blzOj2K=i*hc=r=-JN z#pz8BH0%nZs$;f|ksu}9+Uf0oD|{=%U|%DPRm;VU6GUpwyXfC+w>L`zV<-LqQT^=b zMyEAyz&k~2Xx0M|-?o_*QAY+l*P%j~nIRCV*tw!QL7x%&MCXhTJ&}b|>NtMU8rAwb zju>~i0sFr-#uO;9sXZvv50C;60WzkMQmhYHA*k=f_1u`?^azy<6-_fFR-*~CIJagS zN-%TY(TT?oINIpqbKcqXwcba}I|ZE`<2x-wDq@t>%HeP@X@ z$c7hQzvL`KYVoc(SAu{Hy`;m8Bbd-(Y$Rfhsv7eXRatnYFc20~)b}g{4eAHV zvl_s!^tMvdWS6~LFe$y>6dCcSs4Z2JqeY;L5?)B|F4zNL^YkWMM{}2~+I-fMwVt5$ zr)ciOovzng%AP%R6$in9V~gOYrGKG{#Ku>%G@9_fviIyR1hJL5f>ys^X6p6=O|e6fA$*0E zSa<@|_tZTp6k9Bz{Y{Zg;+|@sxJY|2yJF?)X1T)%hrXtiNibnzg@OO_tCmb~m$hEa zIU9S3&AS@i|N5{^a2T%5>P+{`Sk%&=$XW6t)u#^|%^t1OE38-!7)YoB3&n&i8NHBg z9St9VYIZXXxt69nG33)b)!;NZhEC{>K0|Fq@ngbCDiv7#)rD)Nhj6$~AKZ`BWTzKg zMeLw864N8vP^Nf%_#1UEUr@$EEwiiT!s96oNu%M^b$^BRQSvO0+EMrj6rCT3l@VLi zp^)hOE|_g`7tB_1Ka1xceq=Izb~evd=gLBy_OSkVQU3bq2ltEOYr3AnRm1mLymTd# zm+GTEq2o@Eg@K$(lvFD@-InE4>P z%fPPm*l_GZ5|}>(zgyo3g8CPR!ZiSMd$Q^FS6jmlgd}*K!*`IRQc~RLa8UKHIqL`$ z00c{($oMLB95&G&>PrZ@EMQuECUzSAK3oMSeFEVj7gkEE%?^1ABOE$ZmD%kR6XT{F zE(ywb-E?3`9O6fZ9*7l@{`0_UJjWGIU%YKHoS;330p&7za(dN3Pvq-K_TE-$`FJW-pk~ zqyNo5pPUzP1_9W`dh7>1YjI5P2}y+q3F5`&tV=vbCq8QLUri&X-PEAfjJF0@P;`c0 zaLJC7XtetkBLjrW5km(lFn~pDHonXvR&;!?G58+tp%79|F`jpS+fZaFC{L42l0p(T zndmeYZM!%$Pt83v)!FPp9Wkac83muvFsFqBjMUT#{eRFgsh9KhzO@5bk zlosb6rD}>StwgNf)5A@$nlO&r{KW3d(_&PwSDZ_4y}}{$=PtZ_UPCZ()*MQP(|g$= zdPw;~B92GN=d{nMB@0Oc@TvuJQXp_%qa|R;0Koh%TqHR5n$U1C@Q7zf#({c{>W^;L z1(=~8v-G33>zfUng${p&nzcY>@O1{2Q>>@v;7!3GyA#t=h?uh9e-ts*3{uk#!DbG4 zS|I|JItNq@2at!;kfK{C!AIh>QWaY~XnLfxi4dt!`3ZkxS|{_Xcl8Me4#!nd011v{ zsuhNLapba;GNnQAxvl#PxnYblDbyV^$`HH2g=D6@0KH?2-jrc5l`)iW#i-dqE9Z>* zMImq?7tun{#b~Eka zVhBvHJ!1ETbZJdqjaS+m(Dp^hqVC29JfR_&QI)0wZE$9nM+Ib1=pr0QnCIAE5_%0Q zwTErunJ_($e&m&SPOpJCNCSteu8vWQJw7z(`S5^Ms=BdkDdMxLuZi*f1|Z8)8dk8)NOX)iOWk%JRMXZ zCbj?`4*>8ZS~kJVFpi%YOemCFf51_}Dm4sQ{)m_B{j4_f3+ibRxw_xp?fqMCb6f03eW-w)%jgD5rq<~Qj7Ra!p+ASpB{Hpy6#ykIF`7H!AaYmOb( zAv?O_NEvJf#6VIr<~6EOO9*EQ0b08ROA5Gbo}Vg6(yGBs_S< zf`=|W&25o8y%teoG+T?a`{Sm9nEj2D6D)l4+ExBTQ)RmSs=W|{xU7v@#wd1KZ*au0 z$($G_a*kv$&Bao9NcU$AP1*+5H*iDBK^hw{J)fjxuQ_jvwT}FR)l7k{!2PigbdxxY z>zoZ^-!F(jWslD<8d_{a+6($jg2O)mNh}L7PKROK@uf%KjKHO>x~E4_*3NAb{>H-i zQ5kp_25#6m!O+;IM8U4WPe3>=Jse;dNBjwkr2!$<5iN^S4*tC;U@4C=4kD~Z=YpIw zTq>Y%_*?1(2iIksofg%py6;zL6{i^n_12L+C0|IkE{umu6G3~aFK~w1)54x@K24F) z^0X+qzN`~~$3vW~6a}2cUaFA zvyD7L^M6P~z%^rPHj#D(>3mpOk`r64NVOPa+Yn-wG{Alzh|hL>b|Dl&2P_gxgQB`= z#aWbSr$aPM8yK}{H{UcmXc37I!W1E~UmH`#lDQRV6V-=nAmeiGdTar8iLAY&1QHWf|x&5%mMLiFKb|rK)j>YVLw` z)*!xN`+&qAqFQ#479vrAnN-9xBwp{WbX(sAvXoyGS<-lqg)klc)yeeKY=ntYHja=2 z6%Lv_)ALN^#L ziBrKYs<)q2&f56hA26qR#PRB-SZNXIMB_!hR%LXITlfL-SG)fIVCs*WZ8`7*jF5<#8v#U8>*TQh2@)sk+UytF^^|g? z6Qp2D#FRRu)p9`5H|z2SAZ6iW*aTf=<$> z^314!1PJpK{E)DEhpl73B5f~w5jT)7O06c-di*t7-==Zpg$>M8p~#I*-8woWEEdBGVK7}?jRrWCUPR^G4BC5q&^~jeTOwAAA(tA zTTdTPBTNmGqHN|TAdQoC*xXZ(G9T`SU1pJQ57U7wm>Jcq{Ehk_rmkB%4l9TpuIzG$ zG2#KzpR1zgCrYoc+hwsx_(PS9Ot5X5WvhP55>AiQAz-)jfM#Hb4kMGbZAVFe2MXAu zH}oe9?O}G!Pb6y&KUCeC{S8|BUK%Ow0s&>IiF*vl2c3E&0t_ee;-9I^3;;i!Y{Zf| z=btqyHnC49iPfgSMnsBQ;6sqjdAULXE4_V^Tsygprt@HPag^{XE z(Kldqnq4SXK(HDM687jGqEJecNK^kp8!X+(OI=U;s_Fiu@jNuiJ=QeFM>A^`V--O1 zd{|E{db+=3DzkGKT%qx@R20}aC=KsGz#}V}0kx;}AWmo?;vyXevdTm|iO3Dv$qn|1 zV!t|9vA4$3QtIz;CeshkR_c`(DT#pd^!Y>T+eKCR4;q zG88P@Vvr(PN(E7=jx)k8l0FR(VGVJMcLu8}y-iswk%t+KPb>}0tN^cyjVo01h*u@Z zzLh*@daq!&{$vc(v4z+5GF_X^G?`wc+tBV$yujwM&wCT47G6n-i;kCdmV=Eo#a~x6`-XS<*jtN)eB$`Fu0+tkKqrGl^3p)#@kSyYmrh%3 zb;){y3Qwxx6CZBQ5XhQOyiyA~p-g;A&#~%_KSkXu)}YR--y-@}o;JJS(}lTwn#aiE zxfaL1>+LY}*Oi`owX;3Y_uHwTYaUQ@7eNmer;dJ!9A)YOuJb#Aazv3-NGk>YKd|h2E^H<~*W&YA5MVwi^+-Y;>ujvtea~p1uv%gfVd3q1uO-GRs z2o1ueVmoP*)25PY)qQb7z3>53~{agY;p@A-3H8WsK_Um%G1$f4cuI z{@;YsimhGb%oU!yg{)8{kVy6xO*Xk0Ij_qiSaX~u@vQEyeNc0=^x&iywLGYhEvT%N zGhJddb={m0hr^XdgVuOe#VlEyX^Q()WS!ZeD6xm=!?BA%xrk-y&+R%6D{)&(t@2{;F{ah}fERr1h8U1p?;`-)D1C z5lQDC0#hjcCij;|LnyF{uQ+fIg5xdSn8Xn$$aEpXH+*|y6>`uKrOa?C%7^)HCRJEI z=E}b%3PXzI9I~Hac0NUi5sw58SiTid66?z&9d=6>_(*&XA#(aDGz50CqCrB2{oeK} z4#YM<-e~R$+}Q{k2$5B*!+HP;K28(}UW*KmF0w_~rVR#>seuHICoyWEixFjN!CEvi zCG@dNqJV~TZ)VUMsyjQRTWpZCOQ1pD=ra&|VWBODNfv)3j1T70)q5NCa{bOSPbETP zN0CGhi992pU6+v&8@IJ~*u#b@QBK4GBG4cms^~QBKcnOm#O(6QR%WWS&L5?bWZS8p zqwoQ`{pWM`FdC*iQ~e37bhLyy2{D$80!d|!Gh*d@&+!qm4uWtr$ag9o|Lk&mJl-0; zaQbvR=xwcO-VWIQblW=}^j9aN(eYIwSk13qpqf@Mpr%zKaJAE4 zRb2F$_TU;;<0@3f9qXC@gt3(mlMS;IyGMsr);3+A{)zf>3ru}R;47%i`+`&m{+YHwc`!&#b@t$uq2X`nb%v(;J;yQ_}2oNgVi$C*Fz3 z6Ku0q;+O_nI_w}hJZNqq^oP2u_kgs_t_K_Ne1Y3HT=>D${Q-n1Iv6)yT=7MTqFwxw z6!7F>6=C;x=-NWg7__M2h6Mu^OFP>K>Fa9oFt)bJ|S?-9$<0FA3U2kR?_{Dq9B&M@v zpxXox>_Ub)nSqF@vjj2>52hu++5u=8T#L$td5l_IsWrQxa1NfQ3%S#9MXchFi=i~_B zRAkRRXH8o7PHbScW-MiGC0$^lX2k8rg+rqH-l}bSkM?E+3QPp6?k65&7~ayuz?JI$ zsY|t0=;L$G$zdru)Si28X7@w!aPP776LVQQje^C|k6j9baxyr&rK>E&*zd3lEXv=1 zf8X%;NcZQl`RK>DhTDHcxIM+9DpY&uufj(Y4#@=4x8Ri>Dx|EeKo5Ie**8?$7}#t$ zv6T*h2!9jfzcdO~J>=nqU@Bi}W~^5NYSm3yyEw-9pG+`*T^ug!cCq-i$Bxbab(!=g z_uh`pa=Z(LFx?}Jg0*q)`%LI~m$7k$r!BN+$vQSd(A}cj^>6phcGW$fw^Pk`w`P<6 zv-l67Yy|_{T63B~Y6g&y>xIA;k{AG}+)NNjR>KXWNU;t6rNjoO zzK{u&qL1;nx+NO1Arr9y>Ch0EsGK(;4h^q$=-v{=oE!#NHemzu$vhy;&Dfqq*+ft+ z%nk@S3AUqX(ouZ@vrdF!JpfO8=4@vO(Zj~0Wl(@dtCAK=nwr8oEs6C2wSD*kkRafL zi&l5Qx&&GNMkV*XLNO#51*Cd~K#C<`Q*f9q-9ycw%}*43@D;j-1%r@P_JiS_nfxcp zJn@!wJtky%$afU1tMsHm@X38P(o{XYaYtth*TRUUic&TL5@Hd9{_#5h_ zJ}J%6a6{N&sGg48h5gscS_ z+X_br6MY9a4(X9MzfsFmq;b$o=?f__xYB)s`Us}A2uaPOv3!y8?vt4qy8-w5G{aGf z43u3@y5>_!*L-9hXx=|d2ikk0OqM5XD9T9hEGg#x|6;BbBibuZ zSJYa&c6zr(Y6z;wpMs%$au%|F?)=3wuf4r~@f?sCV|G$a15T0Fw{X7-hAQqB6IXLi z*=mleV_Adgm(P6Hne!Ld2%f)u%0ej8na|qX5zVlWzaN>743))n9{2~7>8mh+`sNbX zHj*5U;Io3r;jICjSNa=B)(2H~$l=m(XB&-2=3{Xa1#IRLQ$h%cd#y40TyF=rmY$v- zpn7+vOA;S9YREx0J+#R=t9Ni`?ZG}ww<5mrI)6biLm`u`xj?YiaekY8~Z`~*CW5aF+GU& zTPf|d|HSAkpCm)u-7-G;=r;&NVi^#LHo9~j5}nCP3{^|=Y0@U%sG z=Z9dnf}FY99t^I~*c?GF9Q|W5<4WAeAV`C|bo$9@+L0i$6$0M{qMJEva_Mpwpzt<$)9nAh5f|I&>o zX+51-hC6iQt}YN#yXK9q?!fQ%30f_q(^(&!NbTwLAQqcDN*@Mz;nLNSxFMX+U|g^> zYP*GUWvBaB7@Xa?oIBU5mi?letF(fu zSFF{`6~CU#*Q=F$sRCDAy2|+gd_QSd;4Wa!%rAe--lf0Wb?h%#A9#x#P@4do1FmCq zQ}ga!xio8=OP-q_g_$ zyAE$ahdyPZ=n+1^s*q>!0c+8Bv_)@nh2Ol%6$-<+xkSQUTiwn5^jrUca!}K4;K*Ik z>ot%BlKiM9)3SQ z{sG=9uHOAaE=auGtg`qz(L6ZhycCwBIdAu`tsj%_zoNP|xCBM|Hw{j)7 zSoA%`kGuc3ESG;T|NOuFkIjR-|A7hU{(txfH`V?}{B!F#Z+uVOTrSeS>8y@-=*=Zk zHu}x2(_){$^t;_Vu?2}?zImezGmQOv5BViWMj9?@v&=opC7+D)n)o0RlU(1EO!DcO zglisoGL1*ZI;mOYoS_g7Iq#!P23e|kLA_EgNq zCC|+l-8`6Ltp;hfUax_t7Ap{D3xNo%dy7HdY;jU{&&}mF98P?bg-VNq{nNV*2RncL z91NBTzUN6L4t_5g7$p-o4D6pEx={bvqYUf`%?DD)koec<_9Xw}tWX3Mq|vR}*NG_m z%Kr2ORB#17qx8~OK#kyN97u{;1>bY(;$md+I;Ci`&R|*Q1 zTG1_51HWD@mMazTEx*vJ6mq%08@!7*&Q0cBy#H=)ofhx<+6N8qI&=NJ>pj;|qcRs| z+1leQ>wdje?V%%1^)q{tQ$3tQu4YhAMj4dVAuUyed7ALkd-Iyy_B9Plep$SB6%txt^1n@>IH}mzvli1j4*o=GJ8bt^u%ZqclsB5 zk~^di*rO~}U%lTaH z)Je;jLcUn@Ej%ZM2b?4$k0p%#%}*OPSlK-rB>#Fcl-({1LHC#7io4g@nU3{(virfK zdlBb9LbImX)ZN0S!bc~jLcg#d^>-$#sk!BPkSFm7`dO~t%$F;KPWpq@#e%d(ka=`(MOrvxawERL9Nz;PgBeF+(N5RD%9$w5`0Z(iuskfP4eZk?+2AuA@7&GRt~~%KHsd>Yp}8A zTg80NE3{h8pj7f|^(x#`JRhGI^KK;vLAg|_y6>ZHa`uZivP~p7;+Afc<>(IYemA^! z_PXw<121XU{KnqgH8OLtU1LAQu2HkAc8&g(xoaw|dcIt!7hvjZy7hA2g(0tr-Qm@O zN*TuuB*dIss0Hfvs52 zL!2vm6GqaN@W)YuDrMRHs5lWm)%X; zeX?qAQe~E|*8Ul@m0#QaR@R7wNe#2dK%Tb2bh_W%`=;>+(}$Bz;ro~NB8K~DD#7|t z{*W+*8Q+|kW^`GYM%K$rCQ_|8y&SOMYQZZO@*cudkO{d6`4&=b(F-6A7vNFYEH(@H z-$K2XFXwZm3asNzzXfN*Jt+6ii-3s=mssvM*I!0<&CRXTVm{k>!+g$NKl71@EcX4s z-RvjgePc13h#%o^T4wP*DsC7rm-tu`?>W0CdC%jTuf#~!+~?^i_euTg#5A+x!hy11 zXYwEq%7a_tK#xMb-Yk|N%;d|ZTD|C2pk>2d2ktpO+;s5&$oNz*dZd>(%XKn(2e~~c z$V8dUt?*O6`HbsUI3)5$zGckthknB_!xwhX40WRBTdG$@7s4Ke%)`5Gh^vvA!C|$7d*?Dt^Qjd!#+zF(#J~IQ($cAw zr6pVw32zu&Z4#@EE9U=4Eqvh%=1=;mZ((ZCl^mlrWK!xikaP!u#|W>Lbn?rQ0#r!I z*6&|(eO#b~%v}h%*3S^Gk4Rcdj5O#k&+h}sr+V%GVnn<|m4{=g+gUypDH#5uL6PcK z`La_=WrSR}-VpbHQ<62LUFG~yls_K{JCLh>qpkDuuc?w>c$Pek;Ci%t(rP&^<348L z*>_bb-4#sUfEJsM_=rwZ^7QO@r)T`5eJwj}JN?8(an@IU6*94@L)*nzjy(zDI!71*ALM+myrRe%rD|QFzG!F7k z+KB~NFHfK6d>Zi`mcAHvrl;iV*a)R9>YeF_Q@@Rk=1!nuyqBlB-RyPRnmgA~B#6h7 zKR&&~+Wk8^cZkH6AH>x3f}Lb=dAeD7;lS_{P-`->Zh$!$UZgT`+^tuWjNJ~z+whx) zwP}%b^2zSc$r|xPpwlH7`iq6tXZ;mhoG8ZDjZR zpazS;@<40SBThhDrt!H664fBfBC?H4f9@jgCy>iE9rr43N8w8Wks4POSV6Yio;Sf^ zCWmVaw*lbzc)`(?IIFnU#RL%EaQO&iF;}mVVLmZ(~XK1MXsdfPJuV~7jF&cRO+>0ao9wV-dhLU&KlJu|rK6thJ) z(+v6}>OSS&qJ)C&&ej(7o!p6Wv!B)V?!*l2K_oKT98rgHp+(?a!@Y%VTplJ@I0`j= zhrhAQ|FtQ9mnARYehbv|2-OqbbZ5rMDxXMq&uz1ZvuauStH~uh{jpV+)nl2tBht1s z`$V)^77}<|qL%@7f5eb}5Q$V}6`iND{43IPq@18^_;9LMlPtU|omRO7~|C z!5i6uetqHm_D4)xh`I@ng-s)i%*fljVHM zRL++l(u{}eXWkMe)J1ig#bz*AS)xx7-Qh;o>q~uP6aU+$ibJ?f#vcrc=)|5@6Ed1? zZS^{l8#?8Jmq_-N>C%=v_S(qTJZ|qyjTkS27j9}y$|-zJZ!~F3J0?>`WJ#mue(c|c zHoD!5z8E@=i}>`HVE|JqXG|&=-Gj7;P{Cw*76Xm*tb<#Bhc8)*m#v;?og+ml(XZ^! zRld5U{v$8!Pt_fr9MDE;&r8Y|URSHNI|odouXyV zOX-*W8mgMnw8CLrP)p;Ir3gQQmfHKg&F&Ncl|s$vwjv*RkAXnGUPC+@Bkp95Dr z!L>c7_k56*zL_F6X+R&ngRQE2N&|WZq-Uu&q#I~W=sCq<7W(|eY;{AlqM5^$jW;6e zRk2)e7QB45T+cP@Wq8|`tBAsB`F^3+Ea&_p46M+P5C&MSdeu@PS1jc#tz0b#O66Kq zGlJfeX>)PixXu%%C!CcUE1k>A!Zl2G0oLbVm@*=z(*VG9<1o z0eh0fd&@u?QPzJ6oDJxt%7PJT06g^~r1Mh(PtE~5nI$n)l!|ytw|9ef67;nvfKHqA z1wl?#M1!v(q)D9$e`$nGy83)F!wtAtqvVavaz3b33P{M|7QHH>*OA?^71Zh#uj%`Ua4!^ngrVfB@L7z8 zoDlGr)-wb8Wxq@Uey1}5KN&84phPh~PRt99Q~l>ZsB zA;nEiMW{u$zpAt|bH~nMSOb2ZGDkZbK|etDap5lM_m zg{O|c@bX~L3jl<4fGtAjC5Ve6dCl1I?Z+6$5p)*PxLx|2O50RYCLbAq!?>kqs8rt4 z+mv#d?ugXa|ItfK6UMdUwXH6M%~`eHQhc{=M&n+E5WtWbjDUvndI0HkGc)>%gySPp zD+%@-jDZaK{2_};1PrER){F~rT2^cc_Rpf?7#>{kZlsxFoFH~oaBeCTV25oX7h|b8-4DB2`U`r`1Q9S5{EnJ+YQM%$y9Q_V}FRNsqB?5_rt4zV%XhC0ojA*GAZ z(Z{%}Qcw!g%UNY5Te^KYo73EO&Z^>;CfW6oi9)0J9yfC42(-VNo>=Gnz!_f~=+PSi@`C3HyTQ=cd{bY? zUvVffS%EOyNW><7aB%2lFlEf{F%kcxb7r^+e&X!(bj=@4;_K`B%5`;}t3k%}6moBA z>|wN_Tjkh0%LlwcnG@-k`p|B1djHm>i3{<7H#NdFBQu`*3Y4&mPINgfpS$p;Q>*0i zL=S%$Pwv5LPo2UlB{V;qmGfn#H6CQM3)GU)X`|Q4P0oU8(0(vaSe$cbm z$|W;=_n4+&orgmmjo?S^eXQ%oY@1Itw)GZ#u^Az|;KKTq(oUK;3%hrvxN2GSO^;2s zXxx%Ro$>+%moF~1Z<$Bn5Fm#M+s~+*>VNVy)tW*mHlH}DSQOt@kjlVQ>%Z{78k^`Y zWfQDi0j7Q&lG=@6K5Bi~D2_&UQd~3iEBo_31Nx}0>ctp6*)*cjQ zodoWqSEvR2oK!;X{BJ3XwCz@JRi>by8SgWNT;!;#wQ$F!+YIu^`G$yE%J7OXwq~)M zuX#1xq}IZ9m(>7?c`9Dj^-8TAa=TWL7_Jo5^U;ug$hhf=BX0%xW7z1*_kY8%(fr~n zq4Hx4ai0(4RJ~!`N7efN$A2On*(DC7%f3f=kZ%5ZaiKZo|IXt>S+G!UE-a)+_O`%7 zrU+EHikdLiNq}c8axOPr}ce**?)0VPjAm(qfZ~kN12tzhU36`lLLobSAPE3zwi~p-6oF%lz!V(L zl;IGn73Ek&U>t#X3SK>@D|Xi3I!AB~U!TrMm{qZTf!2(D#7(wgLDOLrBq+ zvkH0#d>@}A1^Ki$kXbOFnIFhRYCL#!Vq2zwrf}a zx8Y((El9;9QtXe)sJjTAM>I7gNRDX50n~@t4^-3I!zlz7FYMA7%+{~EJ(P0r??q6B zay-B|U9cRT3vzgHser!WZ;5#+61t|(>i{h*rW1KihOSUPqcwO2O_`eUjrV_Q1 z79~t_gSr;A&}Gi9F)|wilJiTz; z00V#-l&$4jMnIE{HcI&hePK6vuW9fO>kDf252;nI5d3d5a7U9NOLnr>^jcKQFt*4c zB}r|ZRRW=Kjz8$11ZlkVz#XwDdI(S;VasaPNb_ng|6Gi`f%eYM+_jgoU)oKfr)0ge73`JiJe%!ES0fpnSwGlv-#nRA9_%}D=9nN*V ze{F*n`3qVErNnKv14^U2wf@a4^(~uUY6g|%>4{96Uu5cUtt0sJ^DTWs4H-j_XcO90 zZ~mTVYv8`H>fM*Z(CD=M(LH!tK9r908W#A*_+>;$(FLb2vQ;))tzr$&Yt>2+l-)wUo(xJ)=@l<8 z7nZrqcS(EP^I7&d4U$8NjfSJ&O0BAWMwIhI(Dsz^;}q$pVa_lDI2bTiF4v;&Q*umO z@q1mWd9(@VV)*YiT;B(DGBW=%9Q_>C49DvL$zIe48kA7w^kci~@0?RLQ?@t>10mtDI0=kLH>g{LynKuZ z5Qy6D>5MVma<>V&1WYq-4{T_$J&_g@i=LdEO@rS-4YJ$w4Y&6NY44GE4|~A(#uLFc zId7tVpjXU{iThGkACR!pRQfFUK|fib*1spUCiab<1s)VwFMCn%?qE0qlx>-H&BD%} zgddfr9*hslR(sIr8DA#i`Iq)jfc0yPXER3SCo@JGn$Fb@Vqs_{aYjdbPGNh5CB<3R zA0ew1QqdykD@=Pxe*%mWfB&2B|AkWv4B$@-0Z%4+r3f$^YMpv#Z78?d90pfm6em&? z!%&2&Uo*P>kEGT6P5y=>t zv{z_^ty>ugJddE0(OCPp)bt_6@whP_TnU(H4iO9G2YQKKbC6To&Q46yywTmL3`XWLT~JGCS)xuRq;)MGU3{(gv~}gDT}TgNZT;cI_~;tSmY|kutdK z86v5=$;k%^l)(#;rWV&dn_=4Z+p$}0y)1-pP)K15@gLwIBu8#u26anvA_ zi=HKWR{ovL%7Z<8K=L=N`ay$ptWJhKn%~!m{7Y}Y5t<-LM#X5uVTYPzt_V4Wa>AQQ z*v6e67&knjPvUIrn`#wmry8{iS!4}Y;Z}QlMA4MSoyKZZ=9t(E20}7e*_}Ee4II!? z15bgJp+_rLcqYyRNXgAkpMnR8*wkSbYn^$`2XhBDTny@H(rV#PagD*4&|0KbgQ}3{ zivsJ&JxRDhkKWRe5m`4WNwZ$GwGz&lm2|x!uNujtrOnPvx-|~nC6nmtkgOY;(C@ye zdkMOXJB1>driym{0Ma+Dd9D)c^89482_cI;C`Pc`V|uZJWdM*n7;4!V9vb0R>)vac zzSAC2B7nX4_@T2f1;iYNoYsmO%H`k<@+RN2ApM#{7=3Ti)-~qU`_1yPP7RRw!!$-I zd>cb9gh!X2Y+JFOV)N46b77gZtt~{Sl7oPxALR-_FxHMb-FVBY34pI&ZyQm>IK8(9 z!*OJxJYmN4n4+6@tf&_>uusvo1=P3}dZScYBXHc*bT^5ZL&?#OtxwgwK%Ku9G>H{h zdror?$AcRm?oENc7<}-GUVO1l-d#3LJf;)38>L<=`K;Wt_i4I~Pr2fq6R8;F{CksnS*{#;E8%XQw8-@;CcNv?%sOtYR z&El?9e_df(yKkFzlN%!f0IXB9y8!@Zwfbq(DlQg|^;T>BwE0D2SGa)Ipmd3}?tGuA zIHfyU^QW3wC!y;s7#&!oYTs0y++q4?zj=T_w`-bvNO#yQOalrq$e9KT=pt!jv}I~e z4n8=!K?dHY8Mn99u91ORR9rPwJf%Mi`xl1?c+FcoZ$3Pr>r5MfFPf$iBN|(M3L{{} zY1bHmt}Ug}_OcQ)#n;;4Y97>ZCA-R5uEIvhD^y>yLP8uX7yg8EOvs0$j>4-qbZCe_7H7Yx2uTe1D{QlN#j+8sAfXWKWsKd$DQpX2D6a8~u6H=tI&dsf`>hG71Bi%GCB~vPt}q z0}b@GQnD=M!YTSBL#6Nj6Vu8avBkAHr|Ok(Edg;<+cL3&^h`$ya6YL*X+(jz8VRBL z6+_ZdAqk6)#`#i=pfL@*EG>4TWeAKOTALu&@kG0)>=FNU)9{_ru(&Z&+hRgW8)x~3 z2RaerG|vf@fz7C%Fe4aDxL-X1dQ&?7QxdM(H*)k%g~PUjEIVo|J%xTS`k z5?k*HQ~NbNhcUU6N7pVv#pf?qAv-CREB`(Cpe0A0)F-Ne;F_mKe5X>F^UZe{7+QdiBt|L2Bf zE|4LM@(qq$k7Lpd(|iswJZv}+9RR1zF0LTAYFyN9b8n^dO>|&E$4$H3;_jQc@8f4goWq~A5HcjmGc^zf;h3jWDCzv%XoXq7r_uz>d&8uQjtldDLNpk~Dd>2obW_^&F zE-mst(=oJJD^`PM&V#>M9=Gr1tDe`axOuObFBF5SpD$JXX49{`m15w+Zxm4yw`SI*I18oJ4Vpv^gJ1rN1DjITRzhoV@#SqhZ}`eW(nx zkCWaG^;7G3))$sym1X~aDOQ?gBq*lJnaZk+4Bs(}zg<7&<`+mWdbyJJ8;KQ#eM&A! z&X3O3UFh2K#TJUZv`M>aN*<2 z%1)T&#c`XI;zT=hStI~GgiBgL?iZ978IEHS&#qMeA@-C@`VTR7RVw7GwADGqvEK69 z`AD4T^i$OVYY^HQz8$Zsxy4o*V?1a1cGz9ZTth!@#`-Abf-?73GqNN|8M#MEd#_K+O0`@}|YJE%Mcq{c7BDlr0;1g@=^A?aylcoO9W2w_*amKdMIe`v zX>uYCLqri=Ww7YrAsE5%p24bO-FQC zl;bbFtUBX14gpDD0^%LqLP!2mfY4#jq)Y-nbkE4f>wd)$@OT;lYG7#E*@$U#Fg<8| zN*b1xMWx;AUo(v!xPl?4+8?I=S?eENq=f5ssoylE4zmmD)|d*euiM4YM>wZ$k*iPi z@;<9-oqR=cV7rOmHcdRBnMot~Jo!hN^j?n=p&`s2W@@wR`8`w56UlnQB1Hf9QhnN! z4(X(t!T4IB4njHF*(-;pGo4c?CmnLAAs%CohE38R8Iqn(lBAQ;HA2~f9c)6`g4$0u zpk<7x-NgdM|D|d5sbs6B`^@Yz8)P8k%kg{np7G_w36qLFMV1Lh%&nu-i+vx@{~N1R!AG-) zEZZnkcS~L?hgAB7QoZcu@-07~Yvue}tx_(#F0RZ0cGRjhi=J06)oMl9V#>K{GgmAX za5r|nT8n4WfLo{-Wo$BUgK6gEzc=i*z=+%e5%rdAX87$f*k@ogK>on z1#3$%6(I1c)!A4^k~5U`UqU{X<&$%o0#Cm$n;JuXl6Zx4?^kEsimb+ z(8B_Co|6zi=opAjfzFnZZzG>+hRGVrTbp{Lviq&i$oBMl3+@Z6%#$Wm$8MnXIv=6#fHt|`?^IBsh-uT?0PTg_ZEpZ9WwoS(~;aOrWb zp2HB1+|v(O>i;9brIqPB-1lcB5*nl_e!fFHMV~H z1I9RWMA}EAsQHDrDZD5^c(Qh+Riw8&UYk$%u)3)E$F4lf^7CS%c4gx+Ie+c3i&&TJ z>QfCskFIa(AUG02LNe`=ql4NcwM0&dA;k0iMN081HK=@;(E&)WF9p4;6GT8z9w8p_ z8E}?^jWrT3CVkw*2sCy)@UGxW#<8~+ag6;>44sE0DxBtqv2yvj&=mh?rjjM;nf44l zsfLOLwgG#<^VG(vwZN+%Hg(+{4xFxU#TvYMby~BrZ(xns)#fi>`VA#*%Zt(Ex(`qz zcz-Xp>-$#lz7d2*m{Yj>Y++AJaPPNdsPR7S3#{hN>&I#m;~^UHr29vL=*l)~KR&&~ zl4&^GLK|5Zx_@x^10R?kxY`M>?R5VTeJ zvpe0t;D09VN2m8g|6JX|T^g_guM&C;ThR_$JV7C|F#Gipf`e;(hpeh_oXn^ZA?AV4 z;wZmc>!YGE>`Xt%{!9x<7=+sV<{p$HPbE;8#AI2}O-@OZyC`&G5iw09%LRrp8_5ZZ zxTvYxbjxm~mMayj6WxtT~%7s?5RdT(088A=KtkkN-Qq8Yd z;z$l+VQu%?kU^5!Q$5N>3K50xQqsMY$X1&bBV1g2^ zIV=KFsWe@jmgQRBYc=bDTUzD1S1S}M#by&Ovc(cE8Ll_|QYnWNs->Xj6@1UF=92dv zruWcbFSA}JF_+aW%*A*EkrPG~Ub&S@=JX+o(9TRSm-QB^{Oh(~f}TMj_1t7<>?8}}8t@2Zv*~Pdz8LXHFjSCJ0vxX>!dI}JtY+N~Ossmb0Y=tRLtRt!DCa$8PBv63Z zMk5ILVtfK3AI)h-A8f)qu(Jh=lCDADB|~|A#AU^ztb4$KV@uJ@B99S;x(@hdg-J%N z;#pbSo;A_$+U?K6>U5=6J>7c@8AmAq*^y&QwM!+x1LN z@51h+ZbMnag4S6Lq7N}5yfOHb_)^30s;`x|FPk^5;gG}$0271H(~8thP&S3|A)5H* z)Gd#ZkaA*Cg5M!8X%4bS0;+L4=nMr#P z+JSckj>ufPMYhyvailQj3pQ10yM%@Qt(qBEISX(Fkt`+7jVjUH3O&Vw66bppF`(BF z^EWPuAsr4zoOnxj&%tV=+c~X~?aqtlU#CSkkDb{*+3cl-ouo2#+Wc*L3^OLasz^yG z*%AeWPkDjqtfWpSad2IUn!E@jvwHX5I9`41D_=F90K1hC4H!v|b~l3Q=>@SLusq$D zeSzV zcdoM9+Ld?JJjW`l-uEw-n3!GZ%7UO`vh;067n20+7G_+yhHv4G89rl$OuR8Uwzma% ztX>CG69n?QOYRFO@~H^6mzX@pB>(Xqlpc=HrdxxPr+8V!z{x}}HA*>eFhq!$`&FhS zk@MkoU1;X2t$MjqFZn*MJFEp>9Tz{9>#cmH>3d$Qnya z{@P#~cUhekD07t>35o#w`hiB6ta!e# zVg^kJrqEYi+qGx8)$x@MNpced-2HZlm;!3tsRpG%k)@0YN-lEXQBut6EX6r^h?(v5 zuLAV}MuTA5s{uT?t?yM+5JtR zCLn7z;6=+T(b?OIuf$CAAN&0iant;DABF~Xxs0`SeJ)^@Z2jKp2R8y3SsPU5c|RaW ziB9bc2nKbIp2Cu9vGdB<%KzUOlL`sx`Qd zc?G1Die4ECX%YF^ZD%lx-`+lNuy6co{Kyf6Z|zFYz1rCxDDJXG;=O*v^%&`xNM&i3EPCm$8UM||;$sZ3o_627K82*bDHp+M~^XN8744qvm? zE&Lf;@trSz(K(6#!9T{PPLOy|)=#-$kOx`)8R>K^qSDlB{z$GrgxU5Q zX(-?FNxe`MlSusvp_3F@OACTmi)?lNE!r3*vGfLRFBo~ja>GP`;!f`X{w2tZL?-D| zNw+*+ZJB|UCj}(a6iUC>HUfkY%i6nz$k=pE8aI8BXx7Yu+zGnB%Wme&(-nczVq~W< zWWmpN_jwj*rdo@+%OB*ddbi(S-cTd{^3kE#nckl=7>tyalt>gS&~~Pi)0dE5e{{O* zZgzsT;lLkuHYUM4r(X?5SH^>_(-c@vcXN&SFMUwA2R-;3bUc2=7nPk(IQVk`6%#Nz z9dG&g^x+g@H9Yo|1&`^HYH?~zEVZv9-K4+DM!&q0U(C0VhM-Wc`mI*QFL`AoxrA_2 zE(Affp7Wcve6w1qxLyhFeL)d+Houvx`1yLXRBk2Eue6>S$SeD066gA77dcA+d3La0 z3lwz(`BQ8^-_S@GXlw-oIA)!uOgaQHz`czVbFsJ0n&Z5Jdn<68s@l-Veby&`72;T7 zRzULb@{v}JE+um}mD?nH$PqGdIX3>OjO=o#7(2^QVVt+mtiSrnGaP5<2V*4Z8=YEP zQpq>J?~sO3j+(QM(2g%%l90?0isAe~xX1x14k#0!x=;=Y;1XyS?#BbM!)qP#(0N@% zHV3E%GK=9-YJY^{dIXh6iQHR6%4UF;-n2umQN0l>PBTqy=bG9>t z2Mj|_3XPFYkf)Pe=57N!Pb911TiQN+0i?l+aM5~>n|coD%hv9Dg|fw=*8r6065USU zZg|-gIIJWAqW-~G$eRoO%__ELihWRBRP@AK)VC-udjb|vRcB}dIAVZ6TH&_dEe)m${y zz)dj}rKqN7U#2yW%$#t53*X4hHv?)E8{a1ByTiI{0gUQ;WIaqRX}c8K#V?!U2)d;k zzNz4oZ_8!hNYyF+fmsW$WlA5>avYU^iq;PabwW4t(mA-NaYEj;u?7DXgB>4av5!hG zUnBvLF6%_IaFuI@BN7=DyBoh{9CepMA(1Mp%v#ENl}RSE3?I3BViKlWe2K^H`loZC z;v%@Olu#+n*`<_J4sK-&A~!~X1V?sHBqmAYv*{vydV~3;Vo;YOs!qtO$(Ip`wFdez zM!G%89I{xoMh9A?V*PQXYLaq^M0G1I?ve&6!_ezk1_9T6MaU)3V|a{it9-L`ylC#7 z4PNWROsah0^y#FaLHToby8jXD@rSzqTo!}GNGhRE2U4o4aQZ7>mU9n(-T1QXPWUt+ z^$*^lYoKB|D`7?!J>XW5uO0*a%0`0|DP#1<^1}X9yRqwPUc!~Nn7K9mJ56Iow?%9g8zO1_B1E^eWY{QbpN zwOp+ibH!Z2$5%n2p3gx%@R8uUrgggpL`{r>4XCID=NUpdH#R}DY8%9mRYbV?e1SWW zOoysJfh5=%!$?7IY#^6{;UW(Vnn>dK1Ts}`a4i@v%dbYyg=T?FOcgs4qay-{8G^vDc7U1=0Q$}} zMnwwj3pkVGZ}k|N8Dc>5|Jj3*13U32$kmXh9gdvw(TQnBk409*o~UJO)n}aEJmy)e*7goF5=CnRNIwo4{M0i|W9lG;wpRv ze&f?lD6opJI8glocVQ|pC45T(0MdaF5UY^sA)Vdr0dD3dGpVwa^6np*;aUn0PC`~b zMMwvafQC>7>6J&i`*f6PuTJzuc_#uECM1ZdfSsbZy$Y(^xUC`>+Eeu}P1{GgZ8~A8 z>5o&>eB1(|;?oaj-)P`<7-3>tJ`HJtxRV4#QEm?)EmWc1R@va&cj(z6_fNF;*rhna ztv|5K|7%0*owj&D6GQ@0ja62z644+63 z8s^m0TO%=jAWgVYs9E|uQ1|EQIGwJaM#of3OC0tPURr7q$sXX_1f1_VK7w@s-N8(A zy#MjfF1N?ytr38ucF^0>=kXfM45!=P>7c(l8J$Lnjt3LX>0$+OR`n|G9IfV8FHlXZ z7f{nG5xCmvuPW~LOnYz*t9F$vp|}HLmD^mUHdn{^vUrL}rga{*Q2doyCWncBNO`nE zUYyf=a*ma-dn)A6B}*6sGPFb-Qd94excJHh7tf%S$byNPbIx?I4u{Thf9STx$5))= zW}x{8isD~vwBxWtc>%$f$F1q^{;lcJQ6p_qpH99)7v9iyM7-a?Hq{c6`!_T_c2$SW z9z3kp8C7(OcDr78w&_JL4nY3A)$OV>0pZ*NL(RDblvr$6`aeK^k?r*@^ml)tzi0pZ zzcC2MZl!gD|4wfZ|26A)A0WVCUyKfFgS?qgF7cdAcduZ;FYF!z)*atRDDVu;fNXlQJoO88&&G^l%Ep6RNchfB z8+fh@M6_CNRw_6aTL3|kq_J5Fki&7Ff2Xu>K+v>q%gZDLS`!GA+;rf!iA33sR7OeD zIK!94ZX$T7cv5Ddny1qBQmNX;G;M|S(?(%FsyZZ))rkaTrRr%03?d5Mc1{14@#MPO zB3~h3pPY$@p1*kJwYS$Vo_q7W09=G>spbHINQ<`HQ|R$Cy+cuL0auYnr2U@-?l#k_w{i$~6 z($(Bt$1mNJ_p{P}9gbhp?R}*3XP$$k@c+j>D6f17QswE030~%e4sR{DWIBGuKaD$n zh3}QBpE*3)iazqaL24-#yjs5Mxk0VgEEK$YrC12+Mc*yDLAm8taOIcp`d*i?(kMSDI>XzmMwo0#_myj>16({o5bVxsn;sX%l^0Je$;Y zIFlT#$!qk0{PufTOaSE4FZYB4ui& zRU$;Z=(UnJU}pAK^m!bibG}Gw{2z%&basY5F3uVvjD_4w;ZcFiTY4q1XA4Z-uPZMo z6+iiPqpAa{7hXoj?bS=8VAZ3<6Z)yvb*=hzBMU3+PbTz#T^l%^Rm=2V>$#-b7yEYd zIcRlkRa_TDchkuGmZ_ZMUn#VUTx-Y%`aTbo`uI0~-^hg5!TXKU{1Z25E!PVVD>Uf6QJ2Ze+WClqOGc5H3>`K&Oi)bCHsIc-I7 zm_1}Ol>-l4~1POfi{doR?m5PLBG6YptGpB{=!)yM~tI7vDbj z+G}UtJ|5cl>E=bGMslpL;6Jjl5e!W!`*KFgz(oI%b1biD`8I?I=0rA`8xxS5g?!>s zk3>}>XA?aLD|*kdf@d?a0(*(yT1)=|5uh>+6#BHAkM{*Ea4Z4~&_IZde-9q@|37>0 z9%Jc|-G>QUlDnMcWBFXZ_p-U1zBAk1b07WW?yNlIlDlI*mouAPiRSj)$JgEWPIuql zzTGn%?o#jy4kX1l0UWg;=#M}^6a^3rM-pNq0faaf5?it?K?a<}u_alN4aY`;BoGn^ zQY^>${m!XVRp0C0+cV^FcEypF-Ti&_Rh>F@s_MK?IwXmpnj+wdB1J%GaB@^IOTEF1 zUX;rGt(C=Aw^mP9H`*Oo@DcBvK=+NDzV z5d7`p00Q~ef(PJ>w0qdvhCnvUv_|-efPqP+VcmbXa@a|AU%N*8RLVXc*i^!WfW-dB|$-$1A%p(yJZVae_^ul0vDhvH` zqi7_J;tCD|OfU*GM1||NJ{?m*sVBo+u_psZ5_f|VKZeoWsVmMQ zA@dMec*C$D9oqDu>FHoAXpugEt$i8XV`m>IwEvNA==)AL^uP4HG;^Gr-z$aw$_*-o zNTuHo+8~{W=XSpb)j-R~R|9d<*RTKi={p#)i+{-dQ-ANM|2yKz*8ivYF}edmytsCb z`oE_S{{TPUKI;FW{5aftbo2l+WkQqRx!l@J<`0nb4!6q@@}ZnWoEbd(db_b11d+nS z1EhWk$)u0A#%0kdVLhk;`s72mo|)*$oCb&s6RUncTc-L+H_S%F+gs;EQG%9oEf3r} zS6VA;EA{0@qrKYc)}hO(HJ3O9mK0s%i(Nj8h*@j}aAjS_YOr2wW z^jNmXuxv-8C$le8D-b1US9{Ln>q#^!qhq!HzEJGlAMtzZN{gb|`}{4)!abaa)l_>= z7OD1x>b1qmQPD(IxmWn6RJ+&QSZ=R2J1eL(*k~+w8>imtJ}O>#7i=hHoP5{a3xZ_udSvL^rYgva$d5S6{qv;oO&BoH)*u z>lWpG8ht{k67gi}5f=UiIG@f@k+hCcRu-Dp7>6|F`CQDH<`_c)ok(?9R)yg6<9dDL z#W$(ay}E_WSYDm)S0(Pg>lfiRGM2>rOBZRyggRK4(ATQ;JuT>-09~?6i%jG1uf7Nq z=L?c`DITOB1|h%7K|Tk3UO_S+)P}fLG2C{c5@tH4ee(#+;&^m-il220m3fHXFTSR1 zFSfJt!3C+ZME_jvX)dzvV0*iT$`sk8T1d-}@U|^@E2h-yVUHnwyi!Z*5kRQDfO0sy z-InUjD^=uVJ4H3})vaDmzmX2d6F`-FukkvEBOR9%BvPya<}s=9Q?_ z?FKFkQaiF~wNWlh1W(&85cH(dLx#h*$|lh&e>gFKU-<_==hZaF;%vR*`bKmA2-$x> zXs%@<>vI3+61kU#DT12fYHk_5H^dpK(^e4Qs2^H`_cj0f%JCK0GWYA(VBd0z>oTUA zn(JS?1;w7Ha++&LjUfi`*)r92rsc^}X+uS!GSrl7uWK!cH)}}Uy4r0mx9iC5zR^a_ z&1QFLV`aHf->5a<4AF*s)L5+7>Wi(~$`YtPffk$9t(q$-aR}1T?T*?$Q1$gEt+3`{ zM&kE+0!y%OvcfvKR^A@{{}$GjZ!DP#TcCBh+Nn6Rs+zLbC5<%nM98rk)!x%jR3ip8 z@QJlGO4Y-I!C_}Bc&`P@o=YdxFP=a0( zcScUhDuoPfRWJv#UqH7!!6;HTEFyrmiVr>1iDULosX&*sz;o+jSx4-pQ?R_!-SsRi zI?F9=eJtvAC?Z|H^$5PzkuGPLZYITMY%~$I$$I-*b@%Lwlnp&~;)Fi|<;(2hR#L#G zY6{(qde}C>(ddz^!q>+3x?Xe<=c5ltxk6vWzRPMaUhLG{ zjSZxq@3xleHE<@2h`sEz*P2U=!R*xFn~98stz|GXbr{@}rFH{_#5*fUcaY^=?)7sr zg3IwR-}q$|gi}4OoQbW?O_ZgB*$63qMMdH67|SKBcRd0qwek#=m*NEoePs)0Xcc-* zDk`bgVCwA+q}68DWC_;f;XAD0&O6wuG@|3yU*lS?Q?#OI{0PIrPJ-0WOp%S`@N!|w zvE9G{-$9{wl+3JD&TS(vdl*+s`E@FOSn80W&_!1)k|z-CqA;9Syh3h1;}{XJ1#lSb z?RK_Nq|hZzr>@Bw-^`zHMZxL)F<3K-XF^Bc&g_KLXZK zwF9*14S?*915y<0HlVG~4FT9ckHj{rxBT$Z=J)>vA_WwPJH2c{-SAk4?Ooh#`cc~Y zgYWVtg9vFH;r+JsjP6NGFK&&qPXXG`ri?H`=Te^+=S(=7NlWeI;40Z+DMw&*E+?a$ z7SKma%~w<~*sZ7m>MD<5Ihe7!cDw%!ve=*F_qyQ@Qbjknm{Df!AxCiAdxE+SCj zGN4Dd?dcny41qBdgxWBUF_(`#uC*HV&5g!?!m&G{Ua5O9MXgfLs`@&mFaPP^@T%$w ze7sk}{Mvm#@B`oewn!y<53Ac4g1RNZFgs$tIT*k$6$9R3?OZ&#FcVDY)22484tjF zQY1wSlu~OT!G!JJCY*xyug$77xeE>|^cYP9e!BbUZSxvc4RHI~OlGs)(S%JdF$z$G zFuw$P%~;Ao#iA-geKiPpKhq9nl{#{j^=3vB4s1R9vZ#WQCr${P;`mfRP*sJ97qv-g zDPx?2?z|B1(y3gr&H00R+RLKMuqcZq;iq--VI%qL14zMpqw*GRKgI( zD*)06yB&g=XOs`m@&OkTU!kl!Q7tsDX+yK#h?Os%g1tLFInG>DS}`D>oVp$@qT09yZ?ikMu2Zv(E9?2m8U3RJJG7 zo7rifnuU8Qd`$D;*+L2#Vx8i#Phr!tKH7Y(j{nCxf*4YG;5iZoH#b%gwW9_h;EloI zu9LRd8TP>d%XR=x*Ox;Aa}EWrxIj8qVpjl(1C*(}))P|>LZ`TvW*9JehccaL1R)55 zU6G=uU`w2vFLwD3*&Ifjp**;3`yIHjg18{a?j{K!v>}HHxC7}Ar;v7Zw({1js=SBr zx+PHqH4!JyLmUcEeTTymG=VJ;KU2_&Fg~@P_J#H>Pv16$FJ=XNgXqcA?X?b|XGDHA z(7Sk0fEcA*61T$AuYECWs}k+=1f1RIBu zLKiqgx^fwTKzR`2rJ#lLPaO%KXi~&MEXWogR+tP~&rpiYZKSb=P69q=6`YSlAPjn9G=z{9b}s>&t90STjPEt2a*H*QaD@G*7=aB{efd#fr32<+Lqd$vxtH_$7WX@URI zp#s@C4MeAhC~$P6f3EY-@UgW4R{?uX+)SV3T0-ZI3oB}<4|45Xg-buI{GDsXn4Wj3 zXb$k%qtG^5rG@DC3}&M@K(3}SWVg|C*ktv&ZmzJe+;Yn*Y$qEBN|}atdIK6Kn_Bni zNU*lJ5^%@ZUtyJd$`2tU%&z^G>MCQ3kNe2H5+K!V96*&lJq4ITCIVuhn&X2e-)6va z%y1SkrLR&9I+_%S94Y!oZcj{&F!y~1u0nLVBc=>t`dXJ#e_!yAjtiChej2DEN{tcb zdWhaCWYL4vwkTN7Vjw_daUaDXMpj`JQ={Xt)F2!Tz6)vb^l0>8))q`w!P|kWqjbFk zPHc=Ye01FAQ)B?Jy?Zp8Hu>3TigII0oJZ3%)x|m*9W%RmK}3^R)os1-ws@-de-jQ+ zBczh^T8g9oZ{bnO&2MxfXxEPNUbuzf>!Z73T^lvhqub?jJc=S8;DSB6lS&^gu|2wt z0{7A3=)njcuNs3lndnx~L8QRKQ_)`?^{0-PzaGPV&Kyir{l$kRFg_slLowAqkX8*1 z%{c#<^CB#KeR7nWks9Fhk4s~xmR7oJ-P-DEtzBDN>NLA+i_5FE#!_t+b&Zx9t?qKO zwcK1mdH6=Vv9!8UL#S12ajlNHs%C9BlR2^ESTJzF) z%v=(ot(zR6Ec*~zCB};3Bv%zLnKSw&?2G!w3x2eOhC1YQG?){SW6tv`+K(knJ`>*z zl@qVQjQ*VR?Luczbf7~zgZYyr(%Xwh(FdXlp96*I_Tdh6y1tTk-sr9j(S%?#ace-5 zq67gOqH6{q^d0cF?pw+3*uQxZX8mj4-WnoYT2jLMqrfui>q-IwqrkHMPkI!76jCPI zqFX7XtpD?Vb#8tf*@>Xmapv~;32g0u?;`a$R4>z&+x%j1V#2E84`BxDCfl&P;OyMq zhs^^5cL;HXLImm%cV8^{^mP=rsN}Yb4ZlO{PR-szg~xIj!#TaEpO9FwsFJnsg65P* zJH2^uRfyhyMqo~cGdx4jffod~c-a3%kM3}ufP=$aZy;iB^a(|z_Xi4pqvNwL3=oSq z>^QwK@#fGmAK}R+L@9_@pOb0x4iY*P&OmiTQ3nbC5aazu%GrY|V>)lK=n9;jfjR;p z2}Iy7A(s=)0$4od7(^qCB}=VRUbV*9fDz#~`b>zs_AxE2}>cgp?Ggv_hvBHSM!TWpKRNXWao{ zn?Bm2PeUS6+8*Opckv~p8AGzM3Y;ZC-D=xbEo@TpZgts%YCMe5UhB_#AWB^3-WUhK zG_mN$DZ2A59{iSYkNZ^w6uBeD_M}RB-sR>fN0J*e{R~51;7RKgNq1o69s`ndya7c4KQ*ec#KYdfAuvUk?`YiqmUj~^ ztkH8RPVZ}Srd#5C?gO0aJs@P?H~_WCpL^rHus@d6Ba%{6e!WmBdDj-N^>=tEeg|YM zf32+GQ5xDI-6y$NLh2C)w$AD?@TsiB2)U-WkXWD+7!JWVu81CO5-vdl9UUrMHS<$= z3A>0MQ?N(06;ql848QxGwh!x1bSL~x&$iv0af~AnA84TbN4}ij8@`+={Vy_#dW~lP zGVbyMjqgCO`2M%}IwcMChkWD|x&1@_;ncSMtMZ3xYlExk@BeG(Dq1blMSo!9A0o$D zae$egl|!Bl8XkNb!hA$G=MG%3YZHy^+BBGu-2to$M3J$^b&+@INq?W~SM26lxSV0C zVvgsLQF>}eqU^Zdi|DNx_o~-r5NpO%G$U#8BBQD{7Knn4GTnJ>;qoy1L13CnH(&6t z{5*MO>eGb`Jo&FP4WtiPwj$%!39$ydQHbCY<5r0QtJVLzlDW4!jfF=?VM&Y>P2$c9 zwk`*WBcWrpo!%03yToc0*nkR+JRhvhhgHj>f&Ix z#C7>esokaEd8y%LvC&vfRy)YjP^&GX{^ZKq8j4bMS5T3nTSwK2SLIC(wNFl{E0LHjTtFgA#8fDpBG^k@oKRL5afOnn$tSW7Nw?qP;1i z5(P=?E;ezla!LPAg(p_37Jd4;2z}0=b;-ShXdKcwT&h&_xXx?bpaX*H=JUML%OW4Y z`!z`}RXP79JFwBw3yFX1?e}(CkZPfbN$KqR4~q%Dx^;4NC;Z?k53bkAtv~aU#GcXJ z%b?WVLu;Nkj9LFD^4&Dp&1WwFG+dU`_A}%AxsA?Z?BaeW{X>OB$vz|aRs9Damj&OK zZypL#eDP-s{F;W%x2x!m{+_#dOfelne|oA#-S$WKn|A2V4Jhrk z{0(}4;0=R|k8`Q`zT%Pd2`Z!y5Ms?a&b;FO$PonMXz(gkL%08$@8r(y!S1H-<(XIP zuc^AZ=)1W~cjdb>65)CFc@jG{81WljwRXZmp{0${@gt$Hy)AhDts}r2nLyarBjmh33cv zYqBk0S1rOno%s66iw{=b?mBk?OT|cmBE% zQju?PzLdNK4$jGLHF8kI^Domv@(6>@!QI|8|5L>h1%*e`8{HSfAa|kDy%fB_*s%Km z3VV}< zpzJLG`1}|E1Xa_G|A3-^B$XY!@D)a09W!#-)Y*SLZMBIMjau{ugRYDjv}C%OF(;_u z&Nxe-ip2hw#onfCo*XUo(+9azB1ZgrP--E%goYz>M>rXHw_XBMAJQa-EEvvEYAi3C zy74sO;&j~-pf)13hSPLxjZ~ZE;I^3A~r3MR8fe83zTs<}>n6=a%g`A703rrIE9grm`izg)- zy%opddbDXkuHR>LM~aBSLCmL_eHUdRU{L09|9LkE5t`V)3`MAC=VpB}EbM%FM`77j zWYK8h6vk$KC@{f*lLZtD%tlC;8rkb-B29zom@4yM1k=rQOR54=HO3{E?BHsGEDS!X zjbW;$&_GwB_NQm6-=dmxk}=$^%BM>K;L^_IH52PcIsPeU&NH`gM_iydfZ+wL7FVblWI3^wIHh*%oN{Vbt^1gG@@q+phGItM9*(e_SEL6fl{r zh<6FYjsze*h^`ZK%8a{s`jK0~1TYsvP4D=K&&4)`6Bnn+Y

?5FW|d5R|AQ`M>|KV82w2)Xh=7 z_5Tk);77VPD7c_exw*Qw{=fALa1+#O{g2^tRQmeBRcQS?{a7EM#;kv@ALSzr8ElYZ zjVM*TnbPZfKtnd~ZtjqCu#7V*O+u)QEIigy%&vDXd#(1c*P1<%cCGPT1Nr>O+3Uo| zoT5xbr3s2L$*01GLI1_SN)=R<(;`s_?*gGO@8*>f0j!%$=fT&Da*lKeL8m0CRwQQm zzEwDm-U!St#g?SE^NKkYk!1|c($RWya^4C&eegFq|*s(c|U;Co}h(e4d#s9L?g%PL4*$|D-^A_AapLObNG=f80HpGmN6~kKYoa@%?GY zOaOi~>l;VfbomNSjQN$n z*E!AID#)hY<-Cv!U%QX8@!xPZet5ho!h;JO{gp38I_7nspMP|J{@8X76Gd+z)6|^k z$(TM|$jm2!ybsiCuqU~f{Urb&w_zlbmN-w%7u%hsJBBQ(5i0LC)h{kU`>+Er_}8(g z2#o6rRO|oC+f3ZKgTY#dLkf6*`vqJ(jLFeQW}B7)eHislYZo~W#c}}$HvEKMd=|ovg<4vZ;hHf3kOmUE9HdY7($vnK!pou`Z9z1Meho$QdypzNj z?|Q@&82lAOs*0i06VhsI_tejYq;&eUsJ)P07L_bcpNV((NNs3%~vOj&=DfAq$W2YSK`Ta53LVhGi!jX@!fD*RYb=ROCJsK;y z+>x=D4EEq#rgHt52EfgWSUojg8QJ@rKzmU{$SooA7N`#^ESE{3fe0aEU8ugCT3yme zWSh3`aciZkBM7c|`uU;=(Rky$q`s0HZmI$XW5@fbWbX%8viD|r$Gr4}m-CO${bN_D zlgt?uyZ*j#l7Uce)()3rf;-d1C9O#^9~ehH&li|DycMyQ=gvIunNGbc9BWCA@cQ6)3XUQf-UOrtBIdg})ty%jt^n!?yRf0eZ7 zhwTEXFzuDe!*6XLZGCq1+(ZYEF`u8DN};4mvuV&-?iEs7g7*hhVvX)F z+Tv2XS*xwKlBAKWbygNP>Z^z=Z7(Iw_VUtdd$qmRXs@&zc-hS<(k8ilT$fi!=jM2Y z*osg)AY#P1*S-{SPR?88oM*07kSb@LwC?6d`Z&3Ot}76gtZcCl3G#eR5r-;Q_WGq` z>ErrSCD!^7>Qzoowso`XQ;yM}-1I7s{r}aw4vbftd=->)LrRnEF%hfA#wt+W$Z0gD zQJ~mx1?45D)TDehH||uLl<5ZkNTu>2s8nu(JH>-FuVzudO0Nm`20tT^$fe?SbE&X* zIekIKF9LT%)qDB}?+5$b*s4k09NWFZ4{#h8i&Wr)@8Ny%v9R7EKMQ*V#l|h*Yhloc zbQkXiCp z_%>byUr+mF_y!+_U&gV@VH{u8`scE&4EI#nHpI%Im2k-dS(U-okXd=J#H9l@}!e(?tgh_2iww9(^1nqFLr6 zHZ!_I*ynR7Q#`0_93C9PC!&MoWSdOT%CI3QzcU?*Q-$QDqNjy`RSH#cr*4xNAG z$G($Y_>4qf;m{1OrS@yPh4ek(xrc)eBsTi9_sK?QX zk~wztMy2xB%n%96U;;w#l81QaSe{VLWjI2ut*k9JSL*W@*wg$4^dz2T^S#~qm$ekq zGh2hJAWW&Z+|RiH;d@Ba^(Swnp*?2EwU4!4D4iBnu(8_5epSkKdB&KFkB?E1FEJ z9z0L9iQf1+eX0!V7_DQ~f-k2~%k%3vYC&NWj_X_XN^ZzwX#`8h{74!2At(di=j=l# zf6FWWj#rM;`&RukxO0B{+oE#;JG9Z;G=)$lDifD<&(1~#6#4SQJ zE#A2xE;)Ht2U912N@YfhPtH77nXz0s>x12y;QqsQGYp=SLLF>J$JrU*^?SlcwD#e> zu^=UJ&Z2O9ySEAV{QYaQ6)g^r?17=jXd=FbCDc;0Qp6JZG{BZb-8q+&>g*m8UT)&B zr(^Pd(j9K~;E;Su2be|jbX36k931uG%^RU7Du~G;B**%!Q*gca-iZ?;ZVJNSuaQmm z=2L)J6Ree%7{o8mD~n0z;w()i zwcev1$i5L*QXUEC;%-zLCltEoY6|1yyvho`;+xs?jx8%mVPWKmr{pT2gh)fTa2X6Z0c-Ak<0u-q@G}mk zA%5VFT`nx&&abIOE{>UxgIewm2TxVy65y6DO-Kxi`G#s7NQ4YF9DF-mjRxR~I1A*& z-9jXy9~Wpit^@uObV`lds_#Olo~^@C`66}C!-J}))<6=RNjRnW7ymgVrGgoGR3QCs zl|Oj~aSsxH>|sB?em(xbLQ+={7I?NYUk@kA_>c6h$ZZ^deXzeyt{DvE&K?1wr($;6 zr)H5w2dReg;Mod`D>#mhcx*&q&NgcG#(b@g{|60Yo22l--4X@|6-zcFES}TvNG`#R z!QpOK#Zq<#hp+)w{{Wn)S@p^8z#UUU7aXU%D}ZP%@z~4j)ZB>^=pPvY85;%R!S(>N z1WGJ`omzB4PqurTy>@S#g^TbNwn$H%*AP{)6$*3-*-8L~vXf|}TP&P*&Ku;1T*6_9 zUjl$TU5T_zylnbxwV8UomkbFB21>E^Aq^P!Tee1`7Nf$^0x(d^x=Ld@loWEc%g7&8_#=D@iOdG=t=HFLk@S_ z?r1=QHKhNis7rj9kc-9<+u+u!5?!>4TIA@`Lt)06;3(Wbn9)*qPH*Qn5AoZoXt_%} zL}tADsGuaL5O>7&m{%C)=9C#cj#@&w0#4{G)b-4CqD~ybWmzzmcHrQb6B3JpEhCM@ z0~tyiaGO>&G`AVJ8tNx(NFZGCK4Ey*P7m}>EQiy@>LfzpfY2&jD2NDv22WII(S#hJ zIAVENdq7p!rU|owTE5GcXw-VvHezzA^1{UzPn`&X01)4&I#PUrrJ_D)qu(A6o)7pZF{JF@FrXwdx*#vY`F{SAt&XnTM zu)#Yj;BwdP8=O|%q=RY$;kL#Yc*?Z9f_|RuSZ+D=J-)$5946418C;@3fJp*R-Qglg z@bB5~`Y`f7?{CAcpi9KDXpig7;O|@6>xMpThbd(n<41r&YJ)eV1}2!$bU9JPLwdB@ z9jaT%BMl2-cX#ehIv}mhdJ!1B z=xrX)!Hpg;RH}_dh2Ta2K*y-ro&#bfP`>A(?WUCUAf!?p=UZAU^d92;4Gj zD9M%xgDH-a952_eI%`y8JCgTawB`Ayu;jv&e&KAvZI&O8aL6H}SF#Ne2=f%I1ecS_ z?6W}5v$Ncca$l$KX}n8u0Jb_R1nOMFe?<^Akuk6m+}q{7P-ykUz`j6g;BVFPp(I<` zXh8tu)l+;hgH5y>D%F$BDRp+pVMr1F#<+savHCt9A}RP&g1wyG;jV%1fp~K3TKN{@ z!F$jXA<;SZy`h7LGWP9Ncl&mTMv;zYM7J%pJ`_c*rP`pSoTzCA-5-Nvz3tj@J98+hT0;jrdJv~_n zc|_p0evZ&fmyrpCcy{XLES)fGz36j*Ze?3iSdNy}KgXJ$IN`JarB@s?1*sTv)k6CwQr0oYw}SYB)xOBf8{VQLR$}*b1}1$N?kN z9=ej*SP|{_J3POM zlNZjt`o_8QUw#dLK%>YfLMJ(HIrh7_=Ifz{!qqLw3w%1|0U?54=#tJXUh5V2SDfzZ z+&Hjbdgb-69|z=Dy))0fJQWZmftzB}IZ}@DtHu7;Uw!eyg>zqiapE}cSe)cI6Z_5l zq(|W=1mBRO=w0;boa2tXjgj>YKa)H4CUc)Q#-U4F;qodRzNSxL zk%k@+H)(-4re2KdgK~&?wf6ovmkHN+W z1?PzK0D={*;hv?kdrY|-oVbqX@V<6Z0fyQgV|eg8?hN_|c&}e~HW+6kT6DRTdDGc< z{?b(zNt3d1;?6#h3}<+DdgrlU^k@#}$Y7Uqt-a9NhC&7hFU7e^6^_wRmh6Jmz6cl&Ae-gx281%N)E69E+Vw zF}dLbhoe-f+&}V%!@WVvsL01SZ-1RkklCCBtmv>I{}K-YVM+N)8y~92_zbmk)y~pD z=38fVrk~1smGJC)3x{1LP_}yFM8Fyu9b^5!=?~v~ook>HqMnv-665;35~_5I3_=KS0JV{Qo6^3&!tKb+nywu? z9*_NzL+gj&(E2_^x2IH|S?y@QMB#bEy3J6G;0K>}PPEnjZ&Hn#g6D%9|Ik#(!z~0l zZCqP$KiAhgB6lYHkRG=N`v+0T{u6h)Oo*^{C?|u{Bb})Jw3r*rT})!_L&xr`VBvx= z1$~2f+U4wbNNRhy+o?j)y?d~QxM?y?>rj))*W|zW;1pch>;*kMa5YkBre5WEpxI{% z8+#J(lw)?I--JF48f0NBL0GWPxE7-8=R9qS>w608qNZ-X@sI zlc^|K(1nFjcdk+sBdI>nTuG?ZnATYeoX|JIEo{2( zsAXP^G@w4jC~nX~`6ab4#*4R86b6)V5?5FtwfaY~gG74vGb=UAHApd{tb%WEUAS^!c z-3UTi!VlmXS4EoC8p!8+-WokCwhRt0^M%3p8Z@$d;m>tM@2PnTz8pju^&dw8xM(=inTvSkGkIqm{;Zp{VyKV z{Gir;t1{X>^EC#_oawiAddb56pbKCB!{psFUrL6T4+eW@SgQ!3@q?lKX5DWMSVRGu zQ@+CCx4S8Zc*Np}b3QYm>IY7G9-i?-&WxV4UUD3^S?E72YvVu4&qf=b95-Jz#g9Qq zd4|u$`pViyceT;!)LX5MZlhC6mg}u7@F##fTj91?);%bcHNCr@)ASNaY)aG*?QT4pkAdT*#hx!k7Vz4 z<2T%hbmiL=%CWFRpmMJu1{+E|LRq5XRd{gnwrBZv4QY*)x3 z0-hNL@$Ey^N>dXZ!xQ7;LBURj?{dHtzXKo(0T4Z3rk;PQOFuWI&f<3%?n`5ayRJFM z+-PR)A1r(aAXYC9Aa7M#I|!jU5Z45?9dxdpntt|i=h@j8zT@o241684FRvKl?u<|^ z)IBID4hrSo$KBf_)wMYu#w+7quUzmE?Gw2ztiKcp8NHX{MdipD?qQc{WEB4_N_Oun44Yc^}}rbO1fjpgUPtq+p}JjTc0C0MFV*M&p=f8@&Dn+PYnD24nKaf{}0vqc=F!+ z{9pRI-+SN%3WXHAB_o~mfBG@gNgFRYMu1FhRBl3vK|iZ%YWPkEiZW&r(y1#i`__!! z8hYz6agUyT@W?{`9uXshtc!sp+QT|Dz=LYoT|qf*<5&f{P0@*K>sHPOc_AvNn9%{? zQkOcF8gqyQvR<54a25(#np`VJ@k0daVB#t_2DMUX>s5=c>lS=g=$#~gs_Thq6^mYZ z$g=&|4TSVoxZ2hQ{nk<8yJ>p@6-WqrNoW4G?=NHra8oQCo|@Bnu+=!DhMmOJqM4?? zbF>ysO6I*@;N{5m%~dt4@Z=^Ezm!>sAYinqdiPR==%K`fR;@LS4%vuaXh(7i5+%p7 zOX|U#?gN|BUr*JMOFV1aNR>Ad=3tM!Fnx5q#*IlwOn#4jk19us#BE-bKXOZ4ln>_? z(v|-GtW#ALs6%{l;G(Iyq_g>MkIFB|m0HqR?RJvdQoGYw-dNe_tSqk};$SsdY;P>K z+KWp|U0jx(<&9>2absz*+w3eNK%t$iEq9ykm2~_8iv&N!0E8R}N7QnRdG*=c7sCQ7 zEYOO~Pt=M~(7xa-y{i5g>#wnBLMmgubN> zm$Q0^A0FpMhFT;}O5!@n1F8bt4J#>0+}Cm6f9kjyL-VZpc2 z=VjWPXV2N>id=B=2HB?|PMqUZ+HG zCdn!FWd$HV?m@nNZwvVth_n&AbjvCat^ewa3-#qi(g>W+Y!D%?(~nT^X6o7xpVZphG^ zbS}gHQ@%#n^Dy&y58*J;*YOuY7uNsgUA8OkJKW?BKTL*e1a6*<(Nv=c-iF2}?P8pg`_$FciMR*peyL zeWtYNT;{QT<>W0m4n`09b0!j5Oj}v_4kNuKvy8QOIR2rhN4Sgk5w*eO&J;n28^um5 zL>CXmx6-yv1uE5p!Tz;q*+-wwjBkR71F!ToAnY6$!gc~y!Ui}tq~R!6EUHN4;4FCw zC|l)FR^jG*C~NirlsHTbe2r}*`3QX*lmvK7?l03ag zl$0X}t1#SpR`M5j7Tl)ezTs`F@55^3@FTBcmmlIDx@M#Yp;L`6#D??1c5VyFE~BNp ztY9!?+OgqTqyo3)jh9IlSGT&PxK6imFQ7BSNLV}ld*X_XqbAoyST}v}0W22sWXl00 z%jHI~XX$0ta|(+QH}wz0(m2>BEJ(R(Pd+3S>IRF|dS2~hZep1Q?IUmkA*1`lq-yHS zt==At7n|$ql?OksnK@l#diy1?V9Y3KsmhaEAf;7hFbB(=whkoGd&UM9=f!BAb^@CRu$)4gF*P1>Fe*251X2i6@=wuKP0cR+IbO)a49Q z&#j7|P9Xwv&5wzO{P$U8aPgys7jP6eDgJ3azWl>U8}n%FDNHn`9bwm^Ej@nD6Jr7` zN6rLU1U&eMDA6R>QWV3b<6?K#DG(zOJ4Vx_^ZbhcB=;J!*mLyo2B#`PNx>$NOz^-> zeNbX&s*avkL(`bc_z3>Bl94OZCa_3Hd7p~F?L>aME;pAk#!5(Oqm@wJ(P**62qmw* z?mr_b9gWhqt2p_WjhT~{jz+FRgKLp>{57dePlWGPKj54PDeYYU=9aK?J&;}+Z{&K+ zIf4|vKAHE4Rr6MEqUE+NSghJ8qS$V%)Rt=X)p`ph6qj1duxxd@D~(2{xv{)fUu|tP z7gslykYcO5w%FKM?4Yt@!aQ7^oL8?T*GhvchOLw7XQkvzBiNHE`&jlImhPS^>CPy$ zzzp`eGBcRv%)O~bu&ozWpLz$b~A!&9AV=hIYkAq*!$n#hd3$bDyzF`-`xE)8Nbm4R>WZ~SJk<}b z4(6eTXN^HVuT;-pc)ilBFE7v6GbSb=m)4%CKo}?pk7Yqf+Xepu=cs!Bc&1};3L6iZ zzY0?MYz^XsBwL3%VvgujCcq!!fZpzBsJyQ6zOCaulAR$FZyX#dfr>W3|V}) zYz_z=@STdmn85_{WQtyYTzk#!8?%cFQZ`t!=7tyHKh&Wf$|A)ZHLJu($^Z#|@&M1q zVCAPuFfGZR5wXFo`BnBCgAZY!X&I{42(CvoQqD1j^ahGHBK6Z;<)8oM{~Y0L8vif` zfS*+Wp3KdP*`@)2-%#fWMYN$>?e>0xw277>f)jOsO&;~!iEtb0;34G}(@Ddg_VakaS7QwBjqG!QeU?~w$M(JT-?%mD zz#Sa!i-efYk@@2#u^e4H| zyhJp#4i5&K2}1a32%iEeSPC{w@nM!aYwLFuJ)f`;1tMFcWwyZAq^>nHw~|MM4H{)I zcRR6Nv&{SCGeZAgGP;-L0-lZ5qxt6@bDre4))F6;nbNoZQ0MU}=6^;~LOQA9usR%a zK4R9@KM91p0LQI#>}42oD&#!ErRy}U{PYDtB9gCn6|h6m4a|T?g3N`+U6x2 z0U;D;b9caCNtpNuT0N+&^(!nCMNbVDicr)4_q~71C!`n0-Tub~$eq(Oh3j?hjq{8- z!I1{7t#PU0ez?EQrTH?!|Js|cc$RjLtR}FH6eS!|jx?|vQl`ol0oB!*iP@cs z1S1~vPj$>sZV!;?2p5<`lyIJ5$M0=j8zK`DG7P(B(V)7<^br9fm;iEaE0=CV`xNgaCBwjT}K2A-<-UZF-&co?yFT7uS?+8+dha3D=tmI4+OIjq= zpe+)vu>LiVEFEy0Z|Rtps-AnB_nx~A*=psc|9mW5@S*Epj`)hMC{yqvM-}tM!N1AF z79qNS!uNcK(hV2%M=shl02jzk1Q!FDOU0cpfl;7&nJ(y3qqeXiWrnEZh}bknP(eF| zor0qo98NtR`cr=ByQB{b`n5KMqbLm6RU#`km&ImLbEsgSMDZl2@h zuO@9C1<{_fGrl5~(y+B#JO?iu@ntr7zv_p0%o{mPHn*Q5qkoRW70b!?p)qFhA}&nP zzXR(NtgY za6E3!JaW?#{PTq3SQ5N-STydNe%$=VNXhZ%IP7uc_;I6t!;gw22pO!$(!2`ZPP{i_ zvM-9J^G)Az!E{W3=dmI}M^2<4*LBx-o!?=0wZDIIeZTLAL-a)kMP9ZSU1gDMZ=V$5 zXwUbYM?Ow+k*|rOH@V{RwmPLd?L2Kss zniKU!a5}cAZ@m=^x>a>-rZZU@#dIKNJKk0A@&S^ZFvBHyNRcX>Kq10K_fS$eX+sex zz^|hE6NB=#w(`||T$55Q!xzy^UD`kHr+$z59H?^SONk1E3OGEpthBNW2au+0)yj)9(XC1Qww!4LYd4k~6zI&}=g zGB0s#xF~XwSzf}+kGl3u2Q7SCYQ5u8{<97TUowGARb2@+!PW zDPOCUa3v08>Hmrc=}rX+^hAKZmI3I1XqQNY46-9iSFy$jeIYk)Dr@?GPQU$y8 zu?Tq|<)t<446_W$%x%~p-i+=}dq3zska>t9&xT{k1ba$MnnN9`8RrS2glf7q8!krf z-L|oS+u?zmZssAz6E&MPg^bM;Q1$XTWPVzn;EpuMZRfe{`YwHqQRXjdc!dAd@|+ay zzjzjp=f=doO^-Xa3C6DL*!V6EH{uZxX5ylja)cgx5u}Aiz0nVdsHNWyJHMhdo1%%if$Dcf4|bFG=eGf7jeiEyfot2T;~06e0$Ll=?LD?2DKY*OPmQ{ z&TPADKPdBoIE&DWn+0Pz++E5X=|ihaaUcwuZDCn6R4-uBbFU_6LJKJCHc_JEL^w+N zPk3F??I`Dv$QAdMmwL%|m&b$VS)*Etv>**qTiP9<|dq5wNr9eEllO+UR z6dMj#v0E$Gz=2K$X$cl?R;18B_~$-S==yxkfKg3y^lwA-koe8!-3HT{OH%Hkf?N44 z1Za2{?r|xX^~0$GX+&12o)&k=3=0t42m>JUEEWEe&s`BfEb%LJX_PX)bz>az2v|`` z&XTlCcP4vV36$%_#W)MAZvFwX?!0}}|3mq4xb^7h0i?2=cljviDU4tfA0Zvj3}Cs8 zqIfV$uv%H1!qPGq9BpOtY~Cf6MO@j*qtUb;U-ZKJttW4Vv`j1U1VVNuA&WAHHA~s_ zMdzt^-CdlV8e!_>H!XV0eg9UQEAaShGgU>SowQezB_y?2Y%Z;I8>pJuY<8CySJqmK zD@lF1vs_#3wwp_xc6+&#EHAFEZM0TXzJGAr`*eZZo|1H~xMpcusMSxR$bq?^hO})d ztj2##mB=mHC_b6nSO5DT^M~K@oL}wG`^HZoxfG(C;F_?}+pN0KowFGS;Z#J=TOr&r zc8MpF;FiDyL(D;36b^?>#2NxA2d%LWU}nY@SV*0+u7B;theSq03vV=acj2rw$faj` zaEG8hN#~ru3*>ZVOE(V-M2b&xdu1N&ttc$a-sR7Kd*kHE5N~2HGJgA^L2f=4I}~9E z66&-cOlS#)>0r>gEM<7cb_t#jCPo;zJft8aZXah>p}31oqk`;F4hF_9lw851DLnfv-C=c9O*z~bUer3| z(Wp7OX>Os8ks&HNvHHJ-%Ni;4>d2k_^XRc$>Q?T z#@bS{k}S0slUkA_tBoey`qz?Lr_0A1aM|BjSy^kOu56~FdLVUYJL;wn{!^(Jd0Ngp z*nenux|XgFH~X*ul)KsW#qh8+H$IF`-NQ~?#OOCrQB$s1dzHVv#z->mqaelvyiL4a zf%|MW1PwvV^maWR4QDO?V+2r$shccg@irJPxasj43}LTPkJ(Vla36(g7}}FvYa)-? zA2@KgqYF0sO-dgiAKJa=KJ-`3O%2Z^ACm>u&uBMcDoiqV$RGl4&A;GO*Q2-PsPdDH zTIXk9+*cf%>9K>nCKjJ<%$3jDBOR;NU)R;Y2>|Z2-WmV>m?S;|M2PKG0+)vw{v+@l z!YEgCM4`M4U!Y;g8CktF(W%FR?eD^T2oX(3yJR7?dMyi0=M zaz}jV9{d+oz6&Etqh*qA6KkTia-M7wfB?PNTk* zEG@0Hms%^WZVgeV8>@}Qm0Abs#aG))i|r=L$28Vjjn%c~&Qfiq-KsU4Ij;4=6mx3y zN46DyHEyoaUX_T^Tu^MDgB{J4g^1G1Oiqzj-wQedEDfv^(_erVNG%KZh1#~rPtI(2 zG{&#R)>W4%m8th6-EaCPF$JmvaEB2$EsuoN?_duSDW)_q8T zYY8uEs7g}y{{CO{!3ZZ@EAS9pmfwIo?BOnRqQdI8yg1*6MV*SpP5S+4e2rKTF|n3q z<}Aob>VXu>fi?stMwiDkB!x4Qv4yR?29y0&aa|DcL+yL%BID$-S)Q1#3^1x)Lq-J6 zd>KL_Na`sMj`JSfciCi_f`HR~`5cU+m>rzF-c|c(2F<}xWv0Q<);{i}AL#zOlHzsTuFyfc8lo7%spT zTQtruc@n%`$dk+Q2(c1-IJyyH_$K+|h&NRlvxWPz)c@w!JYaW#(7Jg_F8X)3g+|34vZhTeLU60%A-nHM8-BSbk^ak%G4x=FV1H$L-UdvnkHNj7-{P-)=h zsf_Rxy+Ec-J1J7CnsgH{8r#lg8I6=WMuw70$ejrCAf=y(CDSoQSv=5zM5HQVIHv<0{ULu$a|xL!P3Rg>U*@z4F_W2D#^`IL7t!DK_y8t~)}ih+;^0YSMw)m<-|w>%j0!SM27+&}&t z)7S@s#sj$E&@rC{r0k&xZ0A}$VD{aZZX|dOZf~svb()X6$-W!YO)9QC*}sAU>Typ6 zug7#2z=yDg<&=~x5q65+kLyk%E;LXi(5@B%;L|amwjqfyYfUt`do<=FadVG9kq2Ww z2=lS?A^tl5c1&05Z6ANGPbPk{4iQpP@7dng@8t2Ak2Md|dOaS|o=yI&QSez~@@LJ0 z&zfUCg9n1dHO8OWvoW86LiXVS+tUzTbES+(p|F7*rG@r}n|gN!b#MOS^rt;skMnO` z&PvC}q#Pwu4l1r5Ij@k&(IUQ|Gn`MRtIS&gDtkADS!568cn;Zj3r52kSCL`#!hcWL za~))0n*jL-str$jiWPc@1is;DRG(UTZmj;Fk4%ikT3Tw%|IRI;F-MqrUW;r>b1nTE z6&?#K?n{pqPf)!-O5T(h(bE#Qx!jp5gyRpGfa_I@XAch!^P{~8%`j6h?B~+BV>-jf9^VIM9DLvrY zX_6mh200_G-sG4=9JyDZ-1eGp_l*ze$XFxB=MP$C`i+ei!gCnq9xbZIcS;%|zwAJj zr4x!2f&G7d!qiK5;a=bDZ5*JC@4hJRw_?StP!6MdDr|#A*hld4`E>awteiDN3KEIX4jE5Vu(3YW?_H3IIBP;lj!hQ{m3T*`^r(DN^ct@BG)JezRa419R~Ys z7>ox-LSyAS79#1Sn0SzT4U0}-cm3xcqw6{`Y;t|&Yj3Xo3iI}lm#^XF< z<7BlZZou;Q7+DgpMdt(6CI#mkxRem&$%_Q#4Pp9=!MNXp;S_c)i-sReU?h5QCY zfv|{rA!T-X0VYR&H~TrQtNJy&+jH*$;ksRPGb8~;F831?NcO;` z2mxqCSeL;Ogp0=mFk8rp8VvakX_(Cq4-UcF?^=TcCVX{C=P7FO1h#GGK6=i*uH*8M zM3QeHsn1GuS?<#efM6&?(%`DqW}$tA~(CTfUj z(cgwDW@WBOFMB;L!{gHOyh&ynai356gQrM)?vOd55iq-Tk@>1HjwXQ>xd;wlY#x8rBveF$xjDB}EE2 z=1&1-6D&PG<8zccdVSi|v?|dFEy?24jO-xbjsU3~z_~|#*+ZxHbx^d7Jo^QpJ5-OK<(+==vivG~P6Jdg%L-aAMNUjdxoB8p@rEa?uC-=iFY7;*I`7Qs{Q z-vXS0sZl^gtA@P2m9ErLS2hAi8AxjT5F!FD;Rs^n-y>7R4!Pmb3-0#T;r2lx9M}y` zKeSN!_gdSq6G^8?(6c#Lxs3k}-qlQg+wB+?K@2vJ3x|k;7eK@61?P-sdR#}~Dy

zrYg`=feM3o$OmntB3Zfc9R_atfo)4kh9gl%q@wxR0T^T49?_WnU-+0Qg+AfM8}#}^ z=jmGk$;CEmmf9ovL`LCa6wc~qdDwmT*S&|`Gby`R2o#Bv6>%{oxy(1d3T2E=A@3gGI;#^k@&Urg7Duu@L9 za%!$F%~D+iqx$#A1Wwxy#e^*x;<}%b<@kb0BwNKg!sDd4Fz~G+sxyL}GvtTNKR&1p;Bp{o~Kv3c*jv zH0(^dF@R>vtz-kB@{LZ8O6I86+_IOY=G@iQWU;l@YAtsgtxjjP+eW~Cz1!Sqtk!C) zjEm~Fms=~%T63+wvbwaqTI<%@8})jlU0Z83*J{hDU?>=DA4wT(BlwS6xwJc@TB#v6 z`jA}l1;rXJA_;Q(iqCd-Pt?#UtRBCJs|B_hQ;UI4;%{5Vm=La2Pu9Iyrpx4 zMzF^ne$#h&H!9?8`H&p;yFzTFo`NkGpSQfewWRw=@m!LOzl3Fux-8KuPf<0ZYyikU z;R4qXpMt6-{XLJKJG&^Th5Jz>wjRz9ioT2yd&PhGaaRAn+PX%RexBdO#!~lA*wZXT zz2Wc>EI3q5gTu|OsPnQk+F}q=qk(Z^QJ+x<{qF|oc2KGX+#8`gJZEulA+XKq4y=3y zI6Jk@3lkKTZs-LCZl%?x_R*?XMIazKL8p@>$Zbtq#RhyAQv79MT_rK_ikdA|S4m6~ zi;emUw>l#7PWdfw*K~*?I{?z%1R^ACmDIfXl3QEHA&;wh6Hkp29k7$DeAEAH9@ls7 zL92`UMoL3s{8TeC%{ZZeR@7?*ZvSU|Kc9A!S#L>g(@F;-Fll#?2 zp}CR{2%g%f-c@DmT!3f)KgkaSe{NLM6u*b{HZvTpjjj<*LZZ;)cUgSKcj@%#)$`|H zLj(rbC)tP0eR&sEa>zNhTc}Y|^3C)3#)#Ln;gH!B0ClPeGJ5~#3qZYc1>Tt{ocuIF zEx}3DF|eieI-KT=CTIxopdLD-nEn`lV6x(>ArIl^0ZSB!4w924m#b|LBNtXIP*a9yRG8u0}oyECy;cXx)hHg%< z`y~&+<3#{C#1H~0?hv0~hBT4j{gG7$WjyP@Q3Nzh+p$VJZOhW;Q4j)iqAms0SQLfxSwD5 z{XCKHCwxNq{}Lx|;k3}Fwv&UaiBntX)h^YFNO8p{g}B=CwVp9CHe!%|+k^CU9wf6j zTY_o8C549qZ&5rztkCpQQatKE@}oYLAC<-Dwxc1%^qn5EWXg_NB3E5F>_73tK9(QW zo)G)@6Z@sz{DJT01j;fE_WfD=L%c7cg2Z0$y$d3fx9$u8L8ELu{-Xi8ia4zyYjhfBsWGef@1roXU?EOwG%oqtAqM)mjhH)3~$ZT=aB<}Rs>4(5(m$SF06;ac~TXbuHddWsnek=M1fR1h% zER;sz7=dbcT=5!=p0RJk!IM)qI2GemO)&+zJBpl?A`tZQAdEJCX40k{4R`R(QrZ3e zuX~kUBc;sxhbJ5hah^he!K^UN!{IE{NYFiRZlVGaB#L~ZG_NPrnJpMP zz;6bu%R!B*yjv8HQ85cYsvvETpRKwDwqB8LI>G zg}y(CcZgMVbyvr1CNOpA5X1mK(S686u40CAZ632suJ$3p1qE-yg98cVk+pvvR*&5% z4efCNQ{}=9BPs)s_6qMik1Wk|4i`uy@`f$bQJ(w&NeZ%kAJSHFuIbi7pp^a{0)FC^ z^@{RvUt8{WmYS`4Yb9B0tkj!} z?apdzsnP6oJN4RfZDqOLO=*G|*mHkM6|AJrh@BE0bv{t%LrdWrlDGbyf9zR~*V5a0 z3z5}0);iEMup}&`YtMz`Uj}2i$02M;^b^u_LxGJY`MdOoXEVajjbs1iz!! z_XpeChkJohxxC%F(z`ZT*9xT5@hZ}D`omnmko}tB|CCXu8 zPXnrt)r`0UZQ$jcIt; zb{Y21b+lI=3Hk+;Q{+I=Xk72~Z}GG_P3Q7KQQz4aD-`y$plf^O&|eO9y5Vp^K(L3C zJ1&Jdi#XSFa3w0lu5=gL1mqe-ZUZZrp&>g^7XJGY{zC$9`D%9E4|}H{>d$>P!s8w{{7IuF}ZGL=MMvY zz;iO!gI=jnE2x?w3#M!m1pTs%TNgom2xRRJlHu;`0qUk*hKd>kZdMxl^{_&P#R9zT z^ly=j-H2`+fCuAN%mS;MLxD?7Au~}TW{n=q`n~Y@ISS=7&Q9dl#&J$Zqt8$GeHwj^ zKROzHsG}E%ik~tvFy{1V>xH*Ph1dU0l<^pSP+mNrgJa=@%3bRLBq`yAisj0*+4I0+ zAC2bAUluXhlp=rdX^|qwb-Ps=efJDJ$M=V4`mLQ_vVi=$h|E1q-aYfBWO(^tuy=<3 zRb=&t@>@9+QsM(KVf0#-g3J1WD{2<%kCTFfXIrBO`K6zY>s<3&? zWhhU^+-)x|Ho6<|2td`Z_Tq9aX{;`y_*b*rSXpee+MVXcS}R$rb>W({yi)6;y6;+R zqqDRO-=t=%ww9ARpBTHVDStjzF4stE<{RuG>Ho3Rv+Mtf{6HPiAB4X7qNHeGkU!)` z*eH00`it7k1wF>YsWSt8-s#%TTA5d9SKfi$qSrxy5%{Y(%nD&)2mAzX@8=jBnYtIC z+rsT5=J#}T0UWR~0BoY0YTTwN2hP>7G5 zESEokXcTy6CI+TFX1+^i9zH}kptCVK=St^oUhOSl3j1t(m{6)r`$oAws%m$+f=>1~ zTf4o^8EPF{2N(<`<1rQu)El^x*#KS+@Iyd0Xb5vsZI$J|dshZ*N5>jaFe5|+KQIUo z^{n~^<+l&@v3m)oN|ERs`EV-!73PF9P2gU4^d%1c#3|W1Vjkp|z*V7Axqv7)nuQ!5 zD?AWk$LymC%ih8780IaInlv&8d!t&=7gAwd+)BhFMc36&On7`iu3pum+g70AxUZV- z2u{}C5d5*8t;ZhCA`Ar4S148-CRV9bGnkf;8pANLO|+xH>1&)LD^ULeg*Jw&vQb(W znG+n@)0bOa*>Dg5qdY8ptOVmpcUmx;AguzH!O`+1ISPPb!?4OU32XOM8fUQs~tEz_4Yt;{$NT$3x+e<*~6)+N!;Vw!J|(b z`Ijs}+3T?j;5Wrb3$P8(6>P@x1@QI8kO*QO@)x9as2z4%`9v9e^UJGzStr+_QJZ(GFxq!P?c*Jp-Hy+hB>qk6+&XQwqkOyFv!jtIdg!Qz?iPCEZ3 z<i4 z*7vGm!SH-dY{h!mKsjFQex+A~+#*O>M> zuJWW~Iu>|*{BFTn@@T2<+(9y?0bp4!TmoKfrllupfpEPO+#wOK{lm7Y^y(5c!&c)) zFMErj#d(~U6zFqjkHdI!=B5YBCAX@Ku9uZAdb9|h?gY!3p-Wz3WQn|)a^$E?gCn|V z{KswX1%5mZ0b`p07CDIB=Z;3j4amzkMO*v{8`mFXk)Mtmczhd-{1(YjMaAF%tMNP{ zmZTPh6d_(f+=7B=9t!&qs~vsFvkLflW=N0e<1;0&LZCr)NVQJmES%U35O4-7FcEOk({_KCA-)3@nu9z244vNp0`+Ua+BNhGIiZ*G4!+lSK|RX8^^$vx zjvf+y5|CKd*C(y7cYAvdn$#oo@x&Vl+kj*uVLM=CA+!75V#GaaT{)7qeGV@<*EO|oFFTc5L?53rKxoW8IP4lvlYfq3XI^oQjGOTTN^V5x zB;z@H8ej^|xbK1&==_;itl3n(KWKof(n#x&xm78ChcTXgp8E$<0ghX0p6=FMEa{Jz{xRz6-6C>oflxy*|ZtW+Uy6 zDxe`SDLi|c&hIurHF1mcf=@q0ht-R$Y3JP7!GW{`K2j)&agZg&NOsd<#x%f?%j0O3 z0e7BK$#4{jc2C+gRIR8NhA99|+?mh_fSi;4ZNwF14c`-x3_e+DTJ#Xm)54XQIW$DM zS%{PvCei=8_4G)|HvlYWOJGqA@-g6e*l?qqqG+olPO;=IAm|n^i(FO883sK%)j?FH zt15Q8w}b3@Y9(-bZqbbpcB-}oW!NmkIP>f1Ap=F&$_$((F9Bv}446VM?=O^}F(?(C zMjCM0h5;ntbz(C>{)I7+D}oJIj=T^ zn2oyeeo|4An|;uR9<)d)Gl2A4g~kat6s?ztOIH?Fr5yZeOwfU6Zo0{^BaWUn?mDCL z-iaJ+;K2q?KMKsTmP6+}OAjq&#B?;A@D?vXCz)MFStE5jVzY4dnNyYb-s1<+_mLy)_*4ANgk1p0X2yr?ALM}gipXy|Yc2(alzQUF7e5W#t|HBVC5G24kfgZ{&ql*pl zD%NNBC#)Mt_M=~U%R z8o%i-p%>sTE>M@Hm+znj_djZOsfqvtwvRFw;Oayv)*cLyWPlqg+3to_&7T3Fx^*_L z&J>&f{Gn3(I-qV`*ONDXO6^@q?Q;)7s?8h^d&qu>%opw&3DkB`mqYMyt#S=@sr`D4 zgA9F|4p%*`gxV9}zd&=r&w z;+eXzu;9^!3SvWyfUbtvMy)QwMWHampzx6qmlQAu-d&uyH4Brm2AZ#H>^ZMXxw`pF=BnnSa6fhVr(A0MMNf6!Mf}TOO!7(g!U*j%w*X&^ zIq0Ww!k)Dg-5>S>PQj^M@Z8SZf>(N$re4HH6JHdZN_<>=I!rT_)UIY%xh=_u`TZck zxcC^Mad>{G34yj=PylI92qAjwNCoF6-YnpM@ND~zaCE{<;)|GqG9S(fc~3smaPEZO z$(rRiVYZ3i8xBBR1%NRcU#sqMW_T#A#R1Xi6|Uy;aN3~R!048^byr7^XZ^Y(2K1;T zA7bEWk48`G_kIH^7i-s!Pl#9@sT;aQ?b*-ZW;;BZqRDl*THki1mt1}S^CiCDp4NAX z2)%=>Pc&4I#(Txm&-&cV_l}?Sd^|b2Y?p>mnveCOle&-j;mHYzQ+Mj|$SwDtUQCk3 z1}@Mx$M$eQh<;bj@hGyY>YTFxo)7(2S4(i_)*EU(@}jr@QIuk{E#k zoD&;k7aSkE92+~wOTZ?<4lzy~+xXaki4)_P2sro-z_U7A%a$7LcF24BGLbc`i;6zek?kQ*=iVpS%^5?2(8|=^6z?4)B8t<3N%71= z^%}5~Yhe2)PXe%2lJ5Y>UND{R8u+xjbGes7)^G5X1(O$+hHFCo1_u%C>Q)mxbG7p> zdR&4ZFtFaJ^5(9wR0Dbr1l)3s2ce)c^n5`_LCP@sQR7r|ae!KbN5~V)v5uJN!uWy% zCc3%-^rIax)lHX*!_t+}R2-ddrsUgq12a@|%7rJ@61mpAC%go++Yz6>>jw${da8rp z*`b-LZ?ldO90o26^G&#$yU{i70vj=CaQoX}VH0(QQ@?nf+>9$C^#%ya@%-F+7y9&N zdRc)+JT`ZtgCB@X104Lc?*XgsSV;>i-Sj?j>Oq4DE|iN%j5RKE497Qh#Ov3`>|?*X z*}LuHfO1XmUZ@$CdHCoAz1c3Zb&JM{EZ7R8PQZEWLRzC}9OZoa8)2kLIg6<;nk%<2 zLej(&Gm0;m`V-Ub<>n?^3OVd|XFR>s|28wZDlij~%W*P0>%^u0(oD)jbUrsOn397> zm>MMkKX|IJC)~t6v{ciej7vl60EExj9+|PGz9Yhm3^MhFgpT-+Vr_pcb`CcE9sN)9 z#`HH<{IfCqeHx6AWcXvRhynJkK~}%HRAxVL3O4pW9!^{PP`TmhE3h!vof1*1DiDkz#LEXIgJ2{Z%@d~wV7LiML(-xD~rLPk6DWE_*7 zHqMS@HS}>Jer+>@luRKq&4AqwOsj0R3+uQn6CG|Q{%6!&nA=cHb(k?6%pOeKO)bV+8=st*4m9BPyAb~DN2*|I%vIV67q=N_O)0qo4!LXAl4wEXI2L? zTId~b*w7>Eb2Glr*TNdx*KU0%lsJ`b3u$k7Ux<9aYuPI=~ znFb`VOU`Gk-u|XYy}PZMAE?=PP2S8KIq{0V7)!wm((fg`@ExO*AC$=gHS%BHMH>0r zLOgC=c3xi>PBbO@c+LRbp>!)yU4pC>tjHhm+5UmaKUfz(2&e-z@uimAZ02g^TH9?G z;s4xhyHRnQ`9`r+$bpK!RB>|UY%5pJL5h>MQ)*YUd8nyWXq2+WT+s<>;*C4Exp=6D zk7x~R;Xf79!r#w+`{J6cnVjKt@LJ;zRXoya<4OMx-eIhO$AE0|f`*#qI(T33AcUn5 zvO#8Arh531dtcDTQ|^SRrb7q^Ayd5vHl65z9dgdby$MAdk?RkYyG9>;+q-tJx3^k} zW4C}r{i;+!#Bv(!AY$&>8ch8(;5i+z;1eoPa(~UJnoN$|HvatfcyS@u`yPQTIuPg@ z6Kt*R3WA>kqJ{=j!b`BC+EL@)ni#u7ypZ_CT1)7$;b8Do2EPL{iE+c`4FV{HVly;z zX-!0Z#Oz&^9&_y25B2gZnV=-~RWsnF_JAbP;b4=BI#O4fbPMN=5k9J}4|kKtc@7yTs^(2U zXHldmbTKe0RAtNu=MtbGE)>2=3IJ70=Cd;~1Qb3=8SklHW4_#D0xjY5p#mz^L#C7S zypT%hWw^*mb<}iofgJ^j%NaI4Qaxq*I!8xHLN94!AywOay$3xLDH;;KPaXBB{@sfO zFP+VCkMQ*fA&$F4yZ_i3w;JvK!z^SEup`7js_QBp5YEQg>vUi%hx$B!@fl~l^{u3F z<*amE7aP^El6MJ9W!=62zSLa$-C48LMa*N?ArAfa1^sWf211MVnh67{H%{Kpqu~hn z-#q!C&%bnTUUXT;YjxgJ@X?#-u2V<pR&tAg^g-Zryzba__cjyHu@QKMUK~F{=_|H9eKn65!t5_e2n5u{sn_WFf|B}A^wjlo4S~^eG zd@DIFS?|tKoral#DoY$Z#O=fqV3`{$WK3oZAflr1!hzS_HK@%9i5KllRX4M_8Jx;} z+DgnN#ug(yzElSZ;4+_Cz~HUSFkQcmQb=d!QAav|fFisW4$Oo5uuRnhF5Ve93YZje zj*bEfg&N!_E+GTOSwu0=91b=<$Kzs-0`e(*x}^7nv*N8&3zQ_8a@{9=R!k(B&w@tV z%R@yU6HJ^fi0l~+X|xArSe>ssHyh7gEm>AdUN|S>4<7{cVfZzDE0~2}HDX~UO5B58uo@h-GaR?+%MnnUkzG^zR*7OM!1!=G5sL*GVBjz5Z=8R{@4_j3d=f{#O^*)KqG zUiTQd!Um=s^-8FpfX^y+A&4gMh!4AUS=d(U)!L%fQjRZkqWPZb3!(3$WRvIDmwcDi ze2AABuoPyFWv_h9w}mB7GYk4VYby{R=`lid9G`(_@D}0ext9aoFk>K&@6Is)#uaXbAVUN{3>{NcZqW%a?mXPluv!HO64N%;F@KhwL~1nn*P zCBMG)C_wc4F(q6ig3n_UIyOwK2)-M9N(?W8kJb#~d-}QF0MCEuCJb_f2!kP0O(y3+^)X*19;p!2NM2oY`J~)MSgjMtp)1M_|c^y zCaAAE_~1MvK=-?-rpM*sO;J>^jERPLMw%K zBj0v&rMy!tHXR5rEHz8nR?98qDz#j`)XHV^PSef0m0~ID){41oCEs+5)m+0ZSKW5l z-Qi+^gJw~v5{pT)sQF!P480lhfOz6lXG+Bt&^H{>#Ss`Q0Ozv~g;Z9&oLPwJ7D>!D z1tl=O5bcj4j2O6WFw?D zpe#UAodpQ6r%IiBBWO-Y5GMtm?&QhL%J%kV2hu;SxNDn&%OI5e#PUjW*}zyB@sT zJ9&_VbEVs$GbiEoR1HgS;7jbSmw7KTKtXp4kU0V54YmX#cOkLV-Uorp!7>bJ4)9cj zkj?{KjLgo76VS@t?BQ_^>@u)JXl$a$94|>OJb>eXnZY?Th9`(x{st@eb2ryCAfq^3 zYLn&PXNEj@6t)G__bw(R@u%R|-$}FG^=lKlCe!5ohapw-CTjU0VHosHxy<07WV9e4 z;gJ}6?8kZR%Y(}jb7me_gg@YhK;qy-D6~BdAb?b4VmltNvM0Ist3tg)MsUb0WS=;jDwMa4e&d5N0JZd%Jk0xy{~fb*N2xvy+aBY zNMQ>@Jd8tZKeMq2wii@hP(t3!y+yGkp2D@kDX_N!E(<5{ zDx3iO@7OCH08>cH4>_K% z8H9)(POH=G4!SHq6a#5+y?PpC5jsh)#eVHG#Flo@qUo2QPBx|-=5o7W27o$Zhvxp| z9X|`&HojhZ%27z~eLR61LaWk!n+tUqXJK6^r_q4gV~|_~nJqnzo>=mzKgpx+3y!M2 zD()soTA8#n@Bo$vEqIR)&D{-YBj_I~SNStM-rfdiQ^CkpXXlNFaF}}^5wOTA^h;lFyNj94nW163s^xNv47H6dKEjK=5IDA`y9ODt9B^vH1G*pA%RgZql;_;i z^z!Ra=grFwu5LE#*vF5dDp}nVSfS4)>@%kB1~J@R@`$G5>wD$b^`10=?S;^g<1Wpy zNPBXZ>;*mq5Ia#yE(912VbA!GneipfwGG%o|8x(fn=XB6ciVy*kUZZAK^}Jz`*pfl z;A|c8ALGU)14Z*Wz}IOR#~N|vc^+;L*}m4BM5Jlh}v%!HnjP2BX*g$~M?4x&zSN@!* za2e16@VQt+B5O^8PMoY=PX=w@E)?a&S?RA}M@gsyxe1DOdcCXfHalv;5HG|}eHFyEpXviw>*0IuGy}PxBTk~q1{$r0mU|8BsWHnj& zh(i)e19k&qpddNA-UP_#i#le+TJTB`FMV5|La7y?0Y#jrcM3OGPI5M0dCeM>_ZZDm z00^k|iB&1Romkn=1DqwqpSFO%!KOoypinL+2q++WH&)kCF@Tfht21;6h4f9NkNHq+ zZbDK~vb=M-7wiBg44~8WjIONS00+d$lc4-5Vdb$Wsvb(i~9pTl-ZYXf%8MlGItve?;p7l&{wH?HR$K~(^F1gB> zA)wse>gFbnAhNmq&EasjA*`e2Wcg4SGkX)4QuI%P`UCb|8d6XnG=ZX-0Mxge+XoGC zj~N20I|bo}cxUURku@H{vth{^!wT;*K-5wnF!O*aVu5-1CHOmV7DGw!(qYuNkD77A z7sDsVAI4#ak>dxA`h*$v8hOneC0m+j!8=ghN4|(!&YMif5zDbfdJ;N9BK@GQTc+#q z4HME%XMZAcy;5d4sH+z^5Jt8qU1gMPFP}ugXw&o@20mbNBj7)ZJ8oaAp#}Uwvv}If z0&4OG*B6xX>C9U64xjPLXU3W&ujsibim=4 zoui&{wjlkaMQYz=mVOa9q;Sp!DAL9n9S1j@ehJ=Y_QK-Ej2x$(ufR)|kZp%D)ihj? zA&|pnpn_5ut90@Np|G}ZCSNcT@nxuspf}OEdkyqo1|F&dWO{~eI3KtD;n*`2)40PAd{2)N;}#H&)1kwZcs z|D^f&Vg|DT70%&)1U0pTa3vtLikQN})9!>ldQ0Un5En@c!0WFo;$ z#w_PXe&i9!#)#vSycQw1tDiHYoF6zrClb0ofQ@X)w+{V4UzX5b5W;AdP+C68mXxhD$F z{0;#c{CfRz`v@C7odIBVXb@7CNh^>l#ADV%>~4P0baNH$4{%%fR7J9s(Ney3GiDYgEtznC-Av@e^j4i$Pd~ zw9V*QNmmb#&H?V4pQN4n2TYfj=q{;0q)FJPhDgM8^)PW${gCPRavLJ3{6!c;-%or$ zT)u}%hNmVC0Jvm$9=LlJ&bd&B2OrYTfvVG4Yj%-ihB=Vn&gTe-8e4vmy1~C8b2eBQ zUaBb$lX$GC4g;CV6WakE95frS>f>!gZo_xDcru1$9e|K6Yfgb*2r+Qnrt>6gSv0G{ zr$+_z>a!@I0Sy-rCb*(-{p9v>KOF}=QJ`1pPp<+!Ml_oO;c@F7sE!CAftyRbkX$ak zHuf7A%7#A6RCNU$7p$9oy-~}YO~t+NB)sMxtV4qr7lP_g>7=!E^n&l+X~eY-@9N!& z(~8ZTaV~^j@yvOYnv9vyiXBKKD!*83eX815m-T5xjl`AG^aV z&E&2o@Ym%q@EifL5)vXxr}sw_bv<3wg~zS@W^g2AO2^Urp=c)r`F%KRam5jTD8LM$ zcr)mMieggzXK@vQa}A?{HWlB|jwklI7R=BbX3s-wS8yDb_!;H}VjCaY=w~qOEeY$!j_fr@0ukNK2LYL$!(g?e80QA7l5-$X3m#ac z1lk*rZihXCebzF`#SEE1US;GX825GhOvaD!msJTZJ>cv6<5zMkFScVL2NuWXJW~4b(B`02Vh&u!T_udB4=1~Cf@zcd(*)gF zld~nd-c2zJkgyHCh{V@mA&)%PaTh5>M?RJ<^skDNm*MTv9R+K&R)k#P95vY+cme^)zh6I*{NA9UJ%#%>Vc#=8prygn=782AohBL9WQtZF`48vo+%_5YI~Yvmo8ZpOrQ18=3rMSnBZ3A-;IzOk9&DKU zM5BQo^!*(?c$``1&-UnC`a(wN15_LMLxK-doS!eh36Riwo%@%M%{U}WO0{c<3>L&W zQt$FHDJb;{bT$>}nq6kxI`A&rU_Jq^C^UJRJ4V@?Oe->Bn$Hp{RAD9H!6ZZZ+bQPS zyp+@%@k+t2sFC{N#~e+GbAsr0qp)qbcu9diV<0UtE>HykZ695*2{Ez)_D8EXlICG? zGJ-ULvky)z`Ynz!*DMx(HN;?uXa*0Y-=IO{?I8v*t3i1zxE|j_|1#+HA;zJpMU7z| zcqaK+1kbBiIeY?1X`Z7J?}iODw?bm;8XUpNup+G*!>sAn<3FtX zW^ZfYkvU<3cC({+-U83`O$xM{FF4%W8s0pyw>R!<+!Brr_YQy$dP@QM1F^8Y5O`#z z_DH#j6wKpnrEOV}OU|`ri9mOywjj07bd+Y8=El`$=85Sgjn>Sp%=Cvig!0mL1JIkZ? zu)jA7fH}>;NMFXL8mLurt!As)Y*(w0XCPN-wpDDmO6^9j zS#;c7v)XJo3e9XQTY;?71)eHjc7eU3W%v3fktGof|(aHfF2=esNORA+71*( z18wbG-ik6Y6qO=fIBU?d8LhK%!d<}(L7;m%$(G_3sImw>KtvjdogK_gaCoh=VU4@K zvA$@@PZ=)N-LlZsZYsyWmg?hC4_PabWea63=QSILR$*<#X$OirMV+6n72WRhIx6w zi3syWVzEK+UjQdYG2BbO1v!myg1|iz-3LHA)|2*DMJ&8nbe>|>nw}&8&&=(qrM(ZC zV3zD6%G6I|N(s!rz@4F)6x?1QV1mq|Si`%wM>r0xy7PX6nyz%01JUB31*9-2T$WrG z$;rXC3zX@3IM7yD%EEBnj2rJJyNixdkdq?4TA!-YIbskv-#VRW%wB=B2VQBwu)%!+ z;9w|MQ+yZhJpAAzhwpv$Lq>}!fP>k?GzH=rzcC#`W#l@c)|1GBZADS9HnTZbOC>my z)}Wc(^T5N8n_ed~i+lG8Od#x(krkV-aV`%sQG47a05qXa~D!4{{J7WISQV0ClCQuW_Xy z1&&f6gaZ~woYvz$<12!R!xk*$3YN|7XIzSv1Y9YgXNw+^A*cca;Yo19;Qz@s3769b z%JpU*SI9g_zO|?Ey3jQ66+?jV{Ej(`^G$(+D`W|Nrv(7UZG4gCppavuM)R5|nC06G z{I#=X*S!;r0w2Qn(xdPXJaRIq{oxDt!L24m%}u}BkxFMDjJL(g0RYnSf-QEiEw%?C z8*J@nhcxEdG%b#P1~=s`N687%^YqoMo}WT<<^&7VAm`QDfaq{!lC*z_g{F}2B`iI6 zFZ(7V2E*hA@HP)%UC7=(|HRoHUpv`EJ%VYk@wC~)5;|qaP5-1F^tthnW6CLmZ}xh? z&)xHV>_L1V!f5_IrNNM1s^oy^QzBU>|+@FH3$M7VPU=tI$H`42doqymce^+sUI-l5vnH= z@c^bk@ojnv@GjWIHu0orE>6a_ArEnfHsp<`CwZDP*ayA>gR(O^M?A>)a1=V*Ji0v^ zL|fXUu{*El%FW{?yaXd|=^Ju_&Kvgv7bUpNIgimNq4z0a;-4~7gR#KziA7I+owDH& zxl2ml_9DzZ;Ul6K;cZR)bC~)eo;ter23+f9ci?1jm$rz|GiRSKrT*HkO6|Q zoO$+?eh3V3=cxk`vxX!V;MMKV#1I6X^g--2NaE3;3%wNrotc%HvGkaBVuo;`deW>l<}o?DMy+4j{DAN6?>%D zjB#jr^lKSYtZ5?V1OPg_k$mJl?MA|Th`Opo{}I{SC`B}PWBaap4j+6>kvE8N^@#9O zk#Tf57=0Mko2aY8lQ*U*9@=(?2w2cO<0#?hOb|J+rcfs}L5&w7$rNABz3pvt3yTZ* zN28a>uIhq&ye%NuJUSw#hsK-IBp+jt!dq#^4k zFp3diNP0D5nGv7(78+P!Cs>mt{Jntl&~le*mklUa>CH6Nl5Lw_lUFmPU? zI|{r+6&u+6#6yT$E_ln#z~FVfoe7sksc&y}*P9t|On|aya|@co@zTxEt-w7+28qs! za7x~BB4e%hGs>U9z8}_e(tE``6CDQW=OTNjuhEPi`IL@5h8w`Ghnj0zln+# z?~S+(1ZV}e%W`iBAOSfb1X_#ccC2CGw(@Ht_i?zO^$E#=)*yJnjikiNd3u{Kmw6Hx zgopQ@vV>&~6MW>&(equyp}8YKbTl63F2;~qh;Xc%Ht$pK10b{3tMJSJk_ZqK>T12{ zYqx;F72+g=u&xT=uA^&j3$aB9>z8$If8)IDW4+q}CAdWsz%qaVrSpg8g74@DP#M80 zIEO3IEI%A6TCg?Ez!U%4^g{-c9}e=!1_vz7UoH*(EO2pM_sCMkAlxNBAl|o(s{C{1cZ5*U3jIw3UN=}e{F!;={~T6j7-0IyZt#vBZ#Hab z#&~e~w$tO-0L=l;16*e99ONDV;MteV3WB!wFy;+|WMle)4b?p9puW7fOn>%1;}+w8 zmPd|7cIgwJ>l6`bC|j9Xzde^d0Cn~b?A@!Y%^loJUb_+WBgQ2r)4SGG-muDRF!AX3 zZsvyru3AKW4w;`-Xk+5lLVNQ*CmZ7yZQb!se+2K9vz}gcpP7BMS@vEPKz4Ej(3d`Kd6ACkCGHw1s>N9M^dB zBEyi8-9}U6P8-YrnVD8>m~~pa`I_l!P>lV~o6z54=9Ma#eMI~5KR2U9?r$nn@<%U| zGjef2(1D}zLWn8II#9_QGbo(su0fhJ@LOUqfv*$!EQq_+plC;(J&GA{t@-u0!7ZEt zGvNHx)=GGZZ_*(4$@vVm!&FDL3SJp4 z%Il%xp2C2WwgO({R}Sb21Y2R?9kcrB#fR*8%=W}R4S^=8$nS_6KFVksX@0!G)@5kG z_}gI6Nm%u6;FA@jzR)8lyaZF3oE7ipmUzck4(T2J4!PF5&Rat7`kZE2q&#xWM#E+yN^sZ{^&ECy*f_1+F~F^txq=(;H1F_3-)pr=KdMa4{`^h&s%0; z4()GsSl`ifY%FvZ+E~9SBM5pP3V}}F8UW8a&`D3v*q5RCR*H-1ZewLj(V(-2A5H?Q z_+gvydUCLp2%3!d77-blAgx7%hZe#38!!z7k@aYHfg2+20&=y|*aVVlYdc-_X-zDj zhriz&NhVkBe3E=wZF(9}G<&uJPXoI9#3(^j+`9|AM{%Ex)4U7zw?mypYhQ`ut8~(t z_;2?o$62zzJ`vFI%KBQi0)e4U83GJSt!BBLb85|e0|G~z?N+PZF0^XJcBPW9HA+yj zy4}jxpu}g(Etd<`YN1tWRDH^N2>J}yrFPUefiHvl>ffS2E43F??%-86WF*?msoY-( zN`v&)K$^fY%0w=)EKS)$iOf-OCxluIldV?0+$80^$j|%kP%zpZX8a3%{4@^#of(8S zs^#E*9ew^nKvZI$#8^M$+0s}%`Cg;3IEmF(jA5EhB}*9oO>AzxOUbUm>kI23QfB-5 zMjL)oWI7bcgwk+2&cI8>VXXeEt$Hvu=Tfeb&s9sUM!tkfCQ^0u-tY6Bq53cb$ITo( zSjQ<+sm9eNSClyp<#mpMyW4ZmL2n!`pW(Dp^MjXDZ)LMB2dw+8Y_pjyyHGbLTP-w; z1>hSTx7ct=*zET%q=|vVwD9d7C^w^^*nbk9`O2>LLY6&OeQ+-% zJS@Y~z`9k3@EFKW56TKCo3V8g{ocUyDrzql4j@4K-QIbq8R`Y7D)^}1+tUF75Xv~6?Dx*T`_V@qeiXphh8&J{tn~no zNw&=#Jkal*3+E5qUEBTMSvTK4mxX6gJ8=UlxR{pi$~C=xFzTYtfxn1DfZhOSa}W$> zkV<(Kdhm1tG`$WTb>BoU#}jjrTs*$B{oWe}17)0B+eZQC^9v;41jk*O>vfkOgCruI zW#yb$b(g@29;#+_-Dj8Yay!SjH#V1XVj%Tzbm(6)@38I`U5G>M_PS@t~7`=S6Hj7 z8+6@wVg#F&!_W2A-xFR?{|JA+x8u{0PiXF)l~29;@PGf@{&(K-!;6|IO{(YKg_yRa z4tX{>%>>{ls0RWlCf5t%N>V*?8k zX~fdNSEi+bA&3hxR9}LTPdODVBvZlA3PvP{Nn4nj9ICG&3q@ zf8+go%4BbCFbRkudm+$T?v*<7076$n>?;w%eVN@y2$POL3PQNEfKEpQl9t7kknz$W z(s-kfB!mvfbZKPbA`FeZ^Gp%kCIp_2x)cs`@75^77=}W(_uMonq%}~)m0N1&E47MS z0e$Yw(8N};f_mg~G3%fnxd0S9S1FZCg+eW#FSyOIY2t-Gn8Xvq>hQ#Hwy5BtVW{AU z-o3k!;3aK(3W7In(5A!TNef9!;;xDzanq%3iL>`;+v2x} zlm8NMa9`858wb-i(2YUm&54SAe50aBSvA+nWee3@GdDA&tk5pyv$;a9*lOfJ^sF{2 z*;*r)D}e^Im2FqF@^cLFZjXQ?o{ANQqGGc}z!p*xun}oj()R3X+I4gc+9jtdnqs|u z7gDUGtxiF)rUTG)bSi23Y3bBuVLCNk5|ub{k3>Cj`A{S(xn~x?u8Ad4K%JhM7OeA;((@jXP9<&9uBKB@j6|p8RLS3n>qhFtU)qJVDrvh@(5mSH zH66W5T0&ZSb-9mTnOihXqgvwBJ&N_+?;46?CHKq}>$)h4C2Q~Y-ac`fMgG!|U_$;z zT&AT;DO)brN^UbdGqkH(Y~^Z=YRN6--A2=CI@v;_2|53ZxmvDK&WPrGg( zl6DD{XN!jAQqwS*|A@3KY14K!EqiJ#S|+DW{zhCwqG?~*g)}W`+f&fA=>s<%ZA)58 zTH1Df6m9cv*EDHd;u1U>_u)N5(YWNEnZ~_j0F5&+m?W*+-g4GETuc^{dwKtkxMWMM zQpqV4%B4IxBF==IR;++`VI$k9RV!`{1hq=7Q7mLZ*O|?gEA3i-Y&q>BKTzW7T`euW zvpSqDTDO=?>#VttNavC^>^qRoSwKy?f<)(TKCt^-L6Ww8YIJTG;HINe?u3rEy2M_wI=iDz+_qS*x{gu+8HDjTuru zHjCv-EnBKM;GGC@Z6%13Z?+1R8l<#^FoVk2#A{y&RD)diUy+uK1$&(>f|gGvXu$=H zNZP6i`?sq}n;MC<1tFX2Zj!9_o?S@pk`6!$a<`LUPDcWh7L}F+-rysF!Gkef(JgTe z9x+_})1ioAa?eZ*Z;2v?As}>n_Yzr@DTLwgq-PWa_goy0Eb9eqdr*0~s#CPB*5vxXa|+F}1yevOUR1gRtr+HC7Gu zvx8B=!I9^COX=4Tg+O(O5&%35L>K`M^@Ue{U{HV(#qP>Vt&=wz!!I$n_b&gD;HFQ( zKEg#53;=8#qZvD9Havc}$N3}ViM}SoPG+PMecDyrv>#4GW`B^6y{l$j{Agv-H)aseCuM&~+VB*}f2iyaLxOcer*@d^51|=O zmrG9CfWG09@4fT4g%W)g7_eSahL_}?(~++`({sm^36%3ELumL?#mUy3X4$o4c_zyj zE27DJcw8jNlmjR!SjKEIeJ416bVgVQxJb8Ac$r2zt+?P@qB%(a5g`8e;6b(k`{C0+ zrTlLu&FoVkzjRPwG?wz+blfh*fCxnS%8iPs46D2OB0(_0YegaOb__;fWQh=z=5d%@ z{|O3_+NDCJQf-z?xmIOn*xPEgnkyD+*&n+?WxWCWUyKSmXOp%%1xlX|Kqquk zQ*yEsqz)6BxW~r6{WC&kQn9f~J1Rl!1F6&D^gJw8#GwBH4%W$LohqbODO$09)8Jsw z)dOkNil05n=r?k z&6V=GQma^Zk}a9W71Tn_bPWK05jPMa=5QXAn;(F{?=%odStZ1Dq2&r72m}$x(y}&D-Ntf3+!; zB^9Tdw4K7K4kAepN0Fpxa&KpX_WirH)OJgie6!TfH9Qr`G}zXQ{NrlwH7T~pkYVfV z@tIg14{QzMYPDG^ zI)yxBrgO?Q(Cj){Q0nFj*-~wMzlGoy#d6EzAl2Dmn#V-Y>8N|shV5$Jd8pWVxxM~t zXH}1gQ~U0}ZT8G{Nt|@jwx=Ky(+BQ^PH;-Tdg4@OLeuxy>;L;VLakD<*GYRU>~#wI zc6WL%TbE?ke?TSNXjLlhcC+eOX$7XiTc2l!)NFN9grm9e{NeZQ9_qAW zrel<=dN;gHLFMpw%^<3b@vIHbKLtii3kgOHsoze=BvbI79KE`nv+-2L_g()Bf^mpH zwyzkm#&+~vaO`gHl~GtjS90;GwKc4%dizqV2^C?gjcl&y$>R4(Z~%Xu5E=k4>tbzE zY3ufRtfUpv(VoNInWzEwjyjv>F&!jwMIcB(Pr!r->=X()>+!>nKGZ)&ic?#fDTpg#Osn?(6Snw`8N?QYDLzxb&YRcz zE4TFQ;(;0j5<8Rz0*oqVMF_)j@)kdGilc*C?Q*GHEtK6X6s%~JYfiOXt5qt6lG|=T?VwzU(HXXWp2g_J zD%eI8uVzEHHahZ5C)FqI(5_ai4VCRA{Y~q;KfL+7XV8BjD*ojRBJd=wTGFnk;0C7! z+X)@pl)AJ@3ZoO6xyPM8QWfqrl^QK+Q$>w7SQZ{ag9hcmx1a*K{sS7cVx?4Tl_9rE z)su*)!Oxy&h8$M-N8GA z{q`t4E{{2`h55dd|0KwUHE7;$hVxGuQmMz5M2XTqj$Jtj!m!gNCfF@Bvqg7y5+xQ( z&4yEP3&mm{TyvU*d>L%X#U>=aZ#N()zB)di>utyQd@lDTNO0Hix%#j(+{Bwk`iY}6h{u!I+oa7-f#64DZ<9efq0>4Ndn*@cG+WDrX6~`K z@BX(!aZ<6jNt-&5z12(a_G-4N$IF!?l#9dXI$or^>$IFop_pw<*(mJAfpVmKc0iy| zV6uY9M-Owq!51d96zG39v#{stwe)*88wbR|^2}Zny8Avxcjh~YWnW)@tmAHVmX&j2 z)m_@!Xl<$=Y_-{p3WZ*Ocaqu=|MySdS!e|1(iHdosx>nj^;tDS8SkMPmf_Uihv zW!q&Ak0F1s=`@c!$K1}cOm$_xcWdHg1%+M4Q84nc=w4H-mhW?#7t?X27YE=vE=T&n zyIwB%fjCm@hLGY_Yo0@=wcA_u-SMn5?4Nn4tLlcxZ?2_40h+~lM%{Dfw0ILQZol&MP{mt71BSrfoN&@4- zv*`AI(T8Y;CcaUZ%R6uN`kDiIjJG$s%@r>jBDxk>?S#6pjmjQwuWqbIhWHe+Zmyay zW-GOs;fbMkO`%z7R9kKy3hOw{Y@^+5)pCV)zSb(%+T+*Gw$N+uN(*EL?PEQF%d7_) zmi^uZHZbE$-;9l}XM?{U3-zaC7LxXQcXHc5HoF&|Xw}>z+4zijaB7q#No;%4*+?K= zv%Cotx*RF_|LM@o39Z4C20r_bLVHt514+k2q=B>~`#vAZ4$B5Y9XcM#^{Byd_vBKu zSc1q@&@eSUQaTMUiYsL%7HNm^wM)gItb>MYksdnZ%Lj8Y@_`xR^biX2!ygDjwXdHE zR9hZ?_6gW^6nHSk80pJ&!og+X13s=q@ZgJ91uKz65PSJZw=F5}BIeQUJ?ld-L$e6x zLdD>pu)fUWiaC);MWzg*6^XuI})Wt1ttBN|6pFZuIk^OORW!nQhg|*(v9`x{TB^ zJ|0~2z{qtUbGPfythiflz0+;Hx$AD7%s|!6%z`1!H2?AWU#>MI)@=D(C%|-058l^v zzx4wzV)F?BerzTXV1$!U?2*+$aWPIA!>pgL{!m|}<83eU!+vbO_GLE+N+G^B@-h)m zdj)%{1W$Iix8*|+Llf7y%?R_cwLGM1%|UKdORzr0d@O{+HQh?B;uM`WR2InAvSlbO zP%FC?x0I`v-Ld)DsQrlLVTZ?ev%$X(hda|z)uf%-oxE%6l1_ds5rLsY*Nag0*Jc7` zC-JOFdz-+sP7{a|I-Dta)d>-U2~FDLQy(;W8B+17N&6{$YAgwQnU4g8c~rKec0AMR zQaN9AiaEDZnzCQ8Wn*L)j$9g^RL^&OuJpzjt*jp4^x#Whl48RNyWP4p3-+#s6w^(> zV5wHjw>sUc>3Gje3{^4bXS7%Z$;|NJ)1UTnpZ0Abrt_*G(}Nuq$HJWta_0H-p$ld)R&BvTgkhHYAairS{-;ijhibl(dziG#Wr`V#0tR&bMx439iKIY(uJ~ zMwi^@r8etQwFN4Ev~pT;q|(F+SoId{Q_FJV0lg}@6a@Q2(JiCZ5YIE+R{_%0n| zd!seUy517&GLLIMeW+}Z7O}b3RVDq^ty+JTFpF;QEhF*0gS#~+Fw6v(OT|VFEBefi zDb;~Q?BEO7XhOku_|GXpVa{BxS!tKcrIwQ$zwo8EH?chM_?UGzIO6fJbUMnOv|qcE zKMo-K)U{_uy@^B|Zd{%PyF?Q2oV4M?(u(QBc0va^C1*V)QZu1N7(V-9`0HKM*CaM&7!9w|9?^kQ>vS4~lG%(K*I#2P}vUXhRBMr#$7_IhN^z zNz%*Hk|h7sg%*vTrIBGP{?khXz!V}JE7$cdMudp~uh*S!YjwN7a_5u%mBY{V)$g2p z#u>e{@KK-b?K5Jm4Tw^nAO3)qdxks0#qXU7Tjo@w zROBZ%;fH?WeS)+|S!Q2N(w5CfVITiB1hn(C5ABS^NBH~n4qaGLR;<=4tx~03wSt&V zv9-8ZbV?;RTh3-7@*r2Pl&i&jBkQ(Yw~%+*rRI)Ui^s&Gv%%4ifsxY@^rWpiEm-+C zP4@~CA^6x#5P~EPS<-e7OBtpO*$ExulV(wwX1BAwal+lIH#b%wBQ@lo@i#zTx20yuEmlk5Ib?-3ECRzzj3alL zP}8=rzOX>m8CLf9qRZA^79Ll}+rD%FYb|-TgR@RdJ(J|&yufN1fm-Z1yPB!itLpa( zBb*Atpx@LORC?OMTwi9$`Ces&=?m5rPf6XKn4Cv~2;+^>K266+U!$j44;}b%+2}_; zbEe=Z4%v;mkHk-NUXadG{8YNV2Yool2=TF>1eb$Yr&eqG#p`e81p1M zU4Licp3+FCgRsy3EL%ABvFe{1>{APa9Db@<@Y{i8@=zOD8 zZB&X-W2juNmB&^VpD(Zh${SB=24ze+&!G{eR9uCc&^rtGvS4Id!6y<4y%#YR@Yt8u;ITWsZSnin6^r8yJndIPBHb# zHd+;@;FclK&8@VW;3^L}I$O1Ntp(($Q5-+0>_QJd0|lT`8Up0?WvrsJp>SjKwTM3Q zx2}~$bT~#NLrEL7JIT-+hbBYT)>}}Gx@JU-zO^feQPSon5TmI=F&#-tT0vTpbh*LI z)<#d4DkVgYi9^XfGgZ1SNR{lhcYEFO2-EhKv)*xwo|OsoI<-XwqSITA1Lv{Q8^85vO1eF z;>5WLgeb}1x_u@(BT}cNJ=&er>B*s~lfC&iT%+z9(Wj-{EZF;#>_bW0n?RqY499d7 zDrpUADby8)LfM-=T@sZzcaKE9@7$p@cF8?6iQ>%jmWPyY@!j4#$D>hV8|etE>>N9` z0dSu!W%Fq;YAgB}E1b=*25XhvB zADTe!9FWt|$D{?OrH}g!eH?fwrb{6c7voXLZ&ik(kjXtWgn?}}G zHr7@<+pEp`mb(dYe5>onhIV-mcVUGYx$7&=ded!j?UTBs=&W}(x?4>bMqP6#k8NFc zGw@(3?}BSat(eQsj__HAI-)J7?Ub9~-O^}Rvb9pX-O5+04peYzHO7y5*ZJvtS4raE z08sk9t75>_*Qu@^Nw^IO^~UTv9D=MB1FR|GSAcUmFjwe(ycQ(&toA z9~Bjll>0d*;)A9Q;au-reyjsgILpd8vFa{?v)b0`v99~<@?CD{`1Z!;GOh~|UWfh_ z4+0WDk8LrELcGZzY&y;3&M~*M9RFp1WxkiB@l85MLh5xg!vUj-Fg#-$mX0Av0z+Dc zU@?9-A_&rS`GUkX8NT4iN54H3Uy$50^93xdc#?Cfs|oDES9XFuXgRBECq0#xBF`HGKO$f4WZ1gB%%= z2Z=r$v&D!U8H*8#Ug3z`NYdFkZMcz-Pl6kX20b919l$)qz?_#SWAtgkz$6{L;Tf3S zzsKo#o+QYn<$3ahc%JC9K3&EqabX_g^S?eZ6yuZJGc!K5fI=jS@ri*?;C{5e z%BuWfYc6#nfq=-rlyw`$a-~>k%uenXC~;S6a+m2D&21Hth&=u z=wrQd8KkEE{EIMNOWpNi`txc2bIqCbYm@&J&Z1vuoK1i3<3B&nf37}<8sEu(ew+XN zoo=L1F!k&F=jMy?&5pWg4}EdgW&HCn|NON}_~)DX=aU!m&!6U>pFN*{ewKgE>zB_w z51ZBbSMbv;|J=NQe>VB&vzPPF_wvtw+Q&bCm4E&hJ&ix(pP$fO?c0lQsm)9I<$L(& zEA%u@^3P{=S0A9C8TIiS>7(Dhf&Sc^!9QKaA1QvRqt>a9jQV?i>+u8p7Ozl0?Wh;g z8Zs)&UH+2piMQ!KH}JrpU*M%OQ1w$-1i{zhUPez&7uMu!vjhF5TqUw(srnUAi1siXc%zx-l;`DPyH>%4-wMI5!O*Ok#P ztM|WzCgajZsqf==KdM*Dkk6DNEa(ltu)-|%%cGgy!W{AN6f*?l zQ(kjMeT-(IzNRO`GtKD7O79ca`oNF)XGXoAKYF+Rh+$!Xjx`)%B&^njAAR^*{0k7{ z31EslY+mF8$xl0q&u2!ztq$`7F_8tn%-6;|)i+Xu3X?41OMK_eg+QkYZ01XDn)#k~ z|PJ{22DZH!-80=X;B8``FAsGkWq0{T#9R#W&N(Xb{4#^;)>K zBYP)5c@Y_7ABht$)x&qYS9!E7p8uYT9{}mq>k#7)S?L`axUvzxHam% z)WS59=$`sxYSAPR;jey*T9^tdq;u-esYR1K+z0iqsfDQ?kvH{KYSEMqw^RKDwJ@<$ zNY&I|b3a7U6z;tGm)sAxAbY0%j#`*gQ+QU?k5UWMG=;=Vol(Gj*K`aIi~3je4wEt> zR_a`Ohv{*KXuJ9Yc!?;s`ZE3tXRrPb{tM@*zD8~MuW#bNkY1>pp_8s=C3Gjhj}MV- zseSZN(@Pv$ok?Q~)k4ax{sv!1f~Bsd*EN-;*I!Jp3%x>st3NTXUq`QN3XY3ce-F<( zhEgGEQWgQ-SLbve7sb9bk@%*XJ!@q=jWrzz^zl0BIg3H(|k}~x&>Q$&3 zb^9Ue125%A@n1A}gzcH`UEG z4>eV!UeAM;j?#pYw&*joFij%~l)pzUnp_fyex6!1<)pQLf?6~YMZ~85BeiIHifByz z8ntNBN=nED^oq8WQ?`69Jw9-mtN zkXo4CXH@V%sYTO&LIi(7Ek_R#jiQ#XP>W`6X}|W;elefRSmu0c(Yyj(>a(bY`DS95 z)!Edd*-^ah>PBi|&Xo97brZE{J{J*)x{6wu^T+n|Gb5w&Q}np!TV7R_W+ z%O%vp{5D}Sbt$!I&VybLd9ps6}%;bR`c_i)Mb1k5)BmVNREE$L-XjSt7dkuc8*_ZyC+q zNiCXDB8*m~7R@suicoh`i)NqjTC0bsg*hp{xes7V7nrI}x7qBgx5B~bHkSTB-%sbE literal 297527 zcmeFa3zQ_+Ste+(T94BEE$bO-Ju0hJRh_TOhorV$YPF?{k1 zvoO2+{r`XOjT;$}Sy|mJsanXxsG}m|{`bGH|Nig)I}ZHFRqyzwchLXB+q(X6tJgpC z^0L=)2Lpew+-R@&-Obicc-iCaC;919I}0D%d2J^X-paq!+~KfaYqY&#t?7EhUVnQh zyu3bYcZTimU?;qUe%bldPI!H{*YM-twJr~D;kQW;_~~}H5p>#vVXZeB`eQxVKexNx zl%H?$8|!`wZfJQxM)cZFc%Vkz^I+~9^hSNpUmmo2o9*UyE&k_nuixz#2i16_B+-)Y?uUeWLMhP6$1h^2i0;THyee{eW(H`@Mkzt`xu z*GK*!EP2-2lq%W}E)JE4;ezt2V>!O-$jX@)u_M!=oOyP2vZ%GecGvS8^tP30J=&^-#kH324BH#Nv(@suj;njv zat991yMs{lgdT(RX?dlHRj}G3=9ms19aT7HKy)NI(l}8XVBq$s6#%J_ROABf47Z~u;UKf!;xG}nBYxxcfWKe z?`K%J#KGz(Dm6GeAw88*3F_(UZ~~bvoz22se*U%4VzA<*OPq@=^4a zA>{d`(;aQpvFSj}hIpqMrqP_lOmFskXWJmc>a=_p;J%OG+H2bP*FkigjQ(~Jv<}B} z(E-(O`X1fLi_X`-OK(uHNr$fy1boZa#%>o}+G# zpU~@~N1?uTMgv?zxYvgG${P)ay$viWUxRqF?QC{j+?D)m;+DF#KH5fauIKri!$EDs z?Vs`0RZlnTe~HeYcz+A$91vsRyVS)DchpTgaGL$z1~(!;#-9dcFmBp8&yhuRgEgdU$wM|=9=P0qN-OjdCM@ukn`lM<8 z73j;fTHN3bAnoAWJ9KZxk@zZ*;N7Liu8_f!fF0Nv5LT)&4jVX1-)Rs1je$MDZ#L}e zZvxs6r_AZ15D8kQ)f2~^%~2mT3Nos*)@lzN{9mKpZ2DO2VRUR6p_;lOK*DiD6I-{{ zYJ-7Clc6k~O?~L3J7D|hO2N6)i(}(@a|gc=Up&AtY9y@HM*WUj*53j8PZIhsoP5SG zJe$NjVv_qH>-dQ&7Wjv51M{Khe%m2p)K_F~oZwv9>3K~5qs{lb=!sd$X!C8hwg+tw zlw5ypb;@($5Ea5icwpyaWT=%9b}FN1Up}X+aM6j5BS^H@+o-p@7(Ndrb%q_oy9yM# zE88#gd=5rUdSv0l#dOf_qkV!|0m=7TZkGs>bl9O^iIm57$|c?2P+!?!2eyycQUd*^ zfIHSog2aMBfUpjZx)hM>2P>KaA~)>lLiVR);lr(9{0(3{OvB#t>vZO=Q>E#H<8|8J85~}h2;3RH&Bl-M?Soc(bCbYN zkf{Sw#-Y21sJnF0R)f&Il)Y$^;VZ#9I3Vz!u}{q&W$S4O+^l~z1B|5WU{3lj(AcI6 z*cwXO7;n=*MqSt#2wr%SUg5p>`Ca>pws$IZrm}sJGf7} zU8QdKB6?5j^czc8ZsEqa({iY!??C`*5=UQ83mb>p--N=`m#xFwJWj|%XU z<4a2A!K$Fbd)_*Ey9?$TdfEisq<=JB8__&?LONuLh-C3SN#`1FN~f&_;qw-7$9NEn z6-O#Jx6;o;Bwl6_K}iQJDKtiOE2=A=r2{A<7Wt~iwGO_^+3MqJbn6|6aHL3wO1%-g zqOTc@>cbvJQrqmewbmtgUIyyYBJ+EF1_UK_^)oN0g))H;et*COb^v~Q2uTK#0j^AS zze0EGzU&VK!C`wdjtT!(gYKsTotV;-2Wx^!4zn_3WdQ+TMoxdInLj~I568ZLFB$p+ zCBz5cCh+bu@RXe5LMnnbpMltI4_Fd=@FCTB)e*}M7z&8i9iq*IdUYAn&kR<451-S zyKJNQWLukCk;*_rfWosAY)ckb~3VUg_lD4*KCtH zFucs~QnSVm%!1dCx=-5Y$8 zrtu&?xUY48>w(sTt$Fvr(2+ihtg|1WDHoE zWYRPW5IQAlF)+gqQ~O8dDuL~?_3lXJcKrlRZ15Rb@uwqt80o&87HLP*6tYI2>%fHM z_eq$BCR{XS)>5}VC&-W*k@@iW)-@YdPa-Qql#HQ#hAk>OU)^yPYu9Frasc_o;Xcq^WzrTu_lE ze%f?|SB&%Zzbrk!YpiF(;#(buqAVHUY(h3tr1y)`o`p)K=`;G66wNl66+J#1@&TKx z{Z|4qw3aKz+-8m~=SoEyre)T&0q?SWF<^UNy#u6QRVuLHD}pQUd44~>m#~UBk*ud; zwVcZrjy?7{Tv0XuW!i6QPXBuW`q|W@ih;_ zphCo3{KVgE^}6$Xvsw&@Q67;`Ld*Bg!0m@yH{H%)tT}YhbT8}Hb_+|Bqqv5_CNywr zRKG2wVjCadqmH|w^>-VvFOsze(15DhB21SU1}3rJ8?XXP56=NZM=np+T=MP7r$gVP ztF(!BBS!76>?N}Ak#34Nzq*+%=;1YIK>_Jvtyz|Y;D45Jl~PxW2&-;ILj&?L>S2NB z>oWKrKobv;;N$!lg!t!s2f+`>Uq6U{!j-*Tf%?2zx8R}sM`33AEyx#VjkrZ#K64Mw zSwGk};hzGpl$-F+>2>@jA=?du%p2_OSmOp&OnJdBHM!L zW>G`1-Ywu`91b>Q80(B_fgfQl>DH3JSZC};^{beK{QlWUtov&jk&q?%g?P8KxFyI8 z%VtN_nyCi{P7;K*8(UwMTZXJl6;j|fUCcVEO02mT>4A+*W_d6#VyTMrpI5B6o5LE+ zo|*&wrf=p+Z`sF&a3D3c>(JMj?mk4}F(Rf=rO!z0C8E{<1I+9T4G(|O2GQ~c=$YGJ zhoQ=vIC4VVP&T~aQo#d?a#Ao8W3NfLVAFNRxpw;kzKxni478aAt2^7a!@bx#N-Roa zI zTYTLoH#j9Y?ItD8sewci#$D3oC*tVp@fuQZW(@t&?gEML8TCh(+*u%A3^B>tdy)1r zPuWDXIc*KNK>FlcfC~jC0b*VG7O*Gia(!&o{d70B zMg(NNlT`PQ2!zy|pO#jCP6`ULvtr#qb?KLAckH?W)d`9=;CrRlyJ5yUUg2<*p(}}(!`$T8 zM{xD;_Jw|e#-9{zPtoi6h0d=gUFa(_Tmi$F#og_41L5dn4Vl9maI&QMnnWk;Fl3~59Y(-~f+CZWa- z;DX{nU=+j(4BD)gJHp9@=ZFUn?sgX^kXU-BWBmprrcb=j_iBaz1oWJ|r&bc~|)^T6Cc@#b{{kSX2 z7C+>d>9_XL{vMjUshsLO6B8E zG88i-`cl_-0Y{BEgYCf>>zb+=vsF~=l|4Z!)VPx%n4+P&6h1Nyb2t8kVC@<;Ol!1( zh>>Q$jjIF>UT`6x`=J18&6SqNW64nD@?QGJQ)p08Z%B-rHdD{vzi zbxApeE3;HYa0Tb#>_RffW=brB}eLMwn2z>}PUDxkeyCA$)wFc6#!y(#6 zDB5QQ?|0kBNTY>SHH|cbb)tv;LKnsj0%VJzg5Y8bw!uVKA^Q%p^e~s2QNw&XAuj6E!Uri$0gwIq(I>%g$!5#ZQm9`R zofl3V<(Qr0ryhGw%TeQmCc2En>)1!APvL?w^X2~}u-U`X68)g!(CiIyU$_?l8(JGk zs*L~^8V)NV{SXLH%ot^p|Ko&kd^gT;s`ad-Ukm}MTx5qT<;$bgi>0Cg6=D@lidNj* z3@Lg5R!|6FrK(`(w79B5A90N%Zpdj`ixQ!xI9-UkAe0_xH91RCC|`oADyY_p3NLSO zP=ur5X#ayO*JyXZuBO2_sSIS9MJ#@VAw{gd7VE0GFuqUpFmay^F@hAlt~Wd+o5Ujo z|4%`1Xd##~V$+({VV0}1?Ff0?u&Lw;4gBC|3Z9iVxz#?>DckdQllcOn5?xFoZCFLS z|58x=HbOCN--ynnkKj@n{+5hk!rf0G zOapBcV7~?>o{>j7EOtx`>@P_V1WSU49qt+bY<6nrt#n+k=`$pGKtxeQ+@e&s^g0bV zttb)2sA?6mm%I~HnB#fqnpM8;qKSh4H7hliofih=9u0Mbh7#`$_=1&nV|M$?B?Pmk zfxY89uo`pi`g+Yphj~G*?Tr@?=GswSVSbxn{tL8QL?l-7 z@z|1L=kdm*n14EAV?T44hjusBUBud8)5G1Jx-mZkjM^|D^d#IP8v*O~RG^vQgN`L0 z1m|L#i45ToQ%eM-y_OqL>9OzSj>wHoGXrA?Tl+8|MYOb5DrpYwn)&v#L6JIFKq~X zBe84QIVoyua`sW%1C#=OAYG_qh-kRZ6H(OBDPdpi`5?WrprSO)59@maUUtx=VA;j| z62;k!Z!P*}0Lp5C4KGJqD=0I_$u9l@nQRxv8|d~ym{W4P4qiFuedg_&zw_oD{w2HzTs~PefI30aI;zXCS|0bqy3qtE7vDNj*5IC z@${Gmm!_VMNLPegbyS7M+QgQ^S>$cO;no%z=gAP;wZec79&Vr^CTTPv8JOltn(Nll zEteGCYBZKOvz!p!)HzQP;hZOZs0OsIk@gt{rdwWY);xxn#vJS3EvwG%_PcVsG$tJB zq0&z1s~)@xdtFHT8hv4Rc%}7TQOu*#>#x(O86Z|+17W6!G-laCZdkSR)TSFdV_rU==R(*I5IO7uipQayWg(!wG|(}fPC(IqPHA}1ei7T;vh%H!^+bTe8oj>g zoWcL^y&~SXow_~Z+r&Vl%~T?C)u5VC!+%PK&mx9sMD?dQxI}MBi=mIixL!IufW78x zr_5&sl$fsQeX8J-fN?e0r5X_c+kSacV6pd?poOoP#Kf$byR3 zhVBhZN~BY6 zLngz8KvpIU9e+L6#-ThfWE-Oq5)n~bW#-7=a?1@~2fTc&A<{VsRWIP!$>1n}1@-F1yZ*WsDAp|TDHACoTFVQ&Iiw?HyU zPf>&42%0BRtcec3dwK`p45FBpB9Wp ztJ*ve>HigLtOF%6$>Opju7gny9@}Hht&?c2vmIC{!0jJd8GMRz#!b_NLsN{cZv7G; zkQN2yvtvjyD4(@r#eA+z2ibDAB+*kM^dpTs?L~#RHFn#;`nXy;#n()WmbOPRFH;z~SFoU3D2BHxv}^9!0W5C=@;|n;oIfj2`Ap*1O>&b~ ztf9_Np`uBZryp22@+3^yrJ{~-ppZ_9y`gG|=2rXSv(nKvO%v}x=#!LEPJvV!pUm;& z&n>{I3~S=|!PcGWB4Qo`g%TFAuM^rlhBkViYOM}<3_(R)ts*wiLiOy~lsWlDLG?!n z)d_QA0mf`e9H^23i3tS{i5)YR69lWt4qW(!F#@-NjRr?Oo^MtwlTTQDo|&0~Z(a{O zlDJ%ZX>Zp{YtOjMqMG!7AtQN)Mv^`)N{J0+U>hl+HV_S_r?CTF4UGkP`r6FpHgJK* z&RBRy8UkuM6b8R47;w;_O`!Co@$F|Q(j+YHQD1Tf6Rn{CYk__%jnCTuSa~wh+pR9c z^!dp1rW*cRX}G#-H^XA{H!7T8RDrZw7HFMFMiE%Mi<>mrfWI@@nrsd7Z%BXaW)!&^ zL|T0t&Yej((T58Ee<$!hNCVgAM)0q7Bv~ZKHbPo%ZjOKFKT|0Mbewb(5OL$|7S>2@ zlJYYz!-Rs@SUMW>cC*I{BNSAC&iFcV!9Cz*Z z_GGvEjhg+hOP4pSVd5rYKPQR)EL!_#((FBSHDcaz*4wXOlks!a}g>GF{B+Mx+EqR^%4r7Z=0^ChWL&;fcKmxB1!Bq`|dL@7uK1VsE3LXho? z!OmQe)L{&w8)K49O~6_E!Zu9i*EF-Pw3^4MCzQ97)jw@>zmXM0Cp$gH1;%fo%Gb2(J@eNn2ms+emHri`PHN|{n(^4jSD?OjP=~4P?hXCyB%{D z19m^=0xjyrTBYQ|KfLS0M}Q_SevnXkJdyw_3#kqTZKzq`lCDGUEv5B%*Q$xzio>u5 z8FExxjPZG&9Giz&1uqbEbb&gw(PmC^+iSd?B#$R7n2YpeK5cr}E zz2%snJZ_XIgJAIOf+5R~@`F)ejdu_mstnVj5H$fbuO>=7zc?cUbCTo0EV=6%(tIZ1 zH3Z(GHFdkev=B@uZ+jpXNA^N2cyQLix5&ohw?@I&XFBfL_I6L_`c{7~dr(xl@Mnz3 z#ckm=@o!b~ZuJrg&rKW9kX_Sux18W*n$3HIKK*kr*rI>#yMTGQ$FOZZ5ZWoZ^*|{l zcWXX)m3q$v+w{+ZV8$`y;pIBW9T~IbXGP}1YdQZm`6|Mf7O9wbkiJ?6lxM;N5}f<= zQ{knsNw#|pWTtMxQ5JFL2sY0I--(`{J{|l${1bc^{xhQZ^W`-Tb@SX!1TE7wCNYY7 zV##>xJS_{h>^O7c4Hl5gt{h2v0+>hi?XE;t@W+&POq}sGFplYDcius-Ib2dcz1DUO zk=;`^f$ahs(hOC?>(?N)(uvpK*bOg(lus6B#dCa8niOKZkm02?09(TeuDR>Huy)i2 zdOgoY4OUsWyddGA(Kh`kgZ}_!40{4bM~VYYHp672pL*`9yetJQ0F{)qK%`sTHn8 zls1=rJrNft3=^W8#sIQ6F9q1Su^GI zNjfL5bPxrlgcT=P61(+VaC4S|ezUW^gd3v;?Mpo54Qb`kH|bE+4){sw`YGyKR4Yht z;Udt?)(Wy(ho(J&9Jwn4A=dE_Xlq;8od4}F2-hF2v{^4}VyGb~ zrgMXZ6hkiNg2UR>i3Exa)yeR3A?RTc3kI{}4_{i9c@VpdwKdpON$r)7ln>8s2t3NG zTN@(PJ&jNd-ndGUn>N}jXx`W~pqAq2WvIWu%V9*1R92xeg07mjCg(uHmQdCi*}E*< zIxij^AUg#xMo*le_uxyJ)^NBvc=+()mfzW2)}$7Sw8Jg$u-{!84GyD4+w1s)!-Y~d zo3ECu#X>o^bc!G?odTpKLU5_wT~f1qU#qu;-L?cFpaWgR68E`8eJ&00WnqDi9_`O% zqKoDjT!t@@#X>97{+W#akzGblBD~~$pyuo{hdCfw#&%d|Ert+YrO#M9%IbK`1uHwW z@MsnWS){SS`_92eAIYH(E;ZHydgZ zV3W}KWfxI=ds>>Ej&XXIsZFc8{Hk=xnbY)kW{3N+Jqa9$2v%BLCI4NAerJ{uT>%{Jv4B%dMyn$5}86*pPio;u`Zu%$S4+a2r6doQiGqmL?oegR4Ic^47uVK1@JIztf_Jcc>i-+I> z?$R#XguayMlGp`lvo~OQp**4P1}p>MWe|M;c(fZ&>*=jAI;gjT5+150%u5XSwD<$T z)a+n0`@VDX*y`iY9%HGafx05?&R}6#v0LGsI2ITWflTnf&~#P8X5#*VdZyn-S~lR? zgvTxoQ||@okquPqux`Q$3|@O6VT~Sm0lEM-TqIzo+)pn4l0bx;BK*1F za%>tabaeIE6RXFcd=B%23yda-r-nt^2xG*5TZEJ<@*ttSxzhim^s}CR+5{evQ5Y&n z60uhsu3iaxak$&tAcZ-sXuT%#WRpejG<63WvaxyE#^eg~S{?kq5L7<68!Be!&5VE^ zbFBZ%Xepx!|7+=eb=rhK@yzq@-^*lQ%UvjIb=1{=madZfjNsRvJ$CBU>XXNI?Ptb~ zX5FGTlXYuilk-}~7D&!|g!iQf_WO0~ zPd)z}cyVYW4c##t-bVToD^m74f&7G)ab!31VWBN;Ad&YVjx7FDSH*4J|zg@CAQFfqs1KwZqft{_J6VN)mJc7eI}oYH%X zf171oig;|gT%1f>ZtMm!s89mx@h{nclhfiaPHyyogw#Jbp7(=S$FRFSaOUvI|I1SBeCoG|YrE1twP3i0lj~;*piKZ*6p&VBDfN_2Zfyrsnp? zR?hwFpQCV9wdu#cOS0QvOlP;boo2P?5#BR$JM)Xqd&|Kbv!Xa0Mh9IsulCKS2$ zBCc3}Pl8J>w*twfTrO4%`6am5QkJ@=iC5v0aK%;o zM1_~BRZ{2psGQ^P{1zf!m<=J0NZu(D<|50M>{fahqoG@BNz((!Eu<(Ql0>OeNSmQx z;|(a4OwL*h#o8p4NSs%-z;Ni05IYY1KXk}irhxcs*&T}0UQEAmsRuEgqGXh=)@A_; zuhsq?Q~(dSszE;^gFc}L&2aQ+ROuV#q<`p;Tn3V#;LxF|gN>M&eL%Q!yQ^>`!bLM+ z(XHoxIr3heK({RBIgNZ>Y5$(2VlVDa#XdBNit!H@go-^XRE#1Bl;*78Sc20BypKrp z*MzrKBqcCo2`2ezr4>~Hvd~3ye7bf%^kr`?y)f{XJY)?5hatafTB9ch@N_5EmbK~G zT?u-o+d^Wo+gN1HvB{eLJiV)Zut#TbEQt1~9t{R>ZPoW3iX00jY*jhIX}gpZ=2T89 zxj|pueS>~<(gx)pF31M`jqwc%fwbQPrNX5OVogzyn|=>zNDs5dh$UJ?i;@&b*8(KH z3n|sgWSzHIYj5$7CAK&XgbWB2M1f~jrUcH8BT>0(Uq|SHo#%1k^|#uTuTq^#ho!&` zs9YPQqmxr@^t{47BYpt7Klo7k+i@B93SA;ZM_zth&hmXvPz^*$Eu$C)nF^?iR1@no zh6aodgZx1ObN?v_sL)T?N~dXXF0l%E>Kmj?Uk3< z2&_Eem{mF%7Qld#>HQVKhQ zizK$x+EHV>_;OOZyke?P2EQ)t?4@Ugm2#^z<#D7PJ1P_T=U zjp<0dk5;;fBZ zMJ?WQ!R9?x^NiM2oj&%h$DUhTCf(QR1xrv$9JJ+KCvJjGM_u2DeLht2X#>XXgV~!eNTlZlYqM@Q}>hoP+-jkQ){8 z-G@Zm{gIE5%R**;kPfvr+}NC7a9(?DZf;?5ZVpbCxb|Rx9)re!`9IXdM?PX6=}+y- zQX?bkU>Wx^*U>~V`gLsy$;28^BSBmLe#C9SIR$Lqx=+D5Y&}6T4uq!At=sET(&b&o z0Q3p2{Xg72HWEh&cr>B9pUgt6Ve}VGihx^U?_at;q3QDah@y~ODc~${#gXX;M~Q>U zv`J}Mwfx8f#NQ%-Ix}zeoMtS-Dm?I-YNdyQ#hbC|t4@GaUrvVXy$ccI=pNiLFaT&X zNq0FN?T}>TrT9vf#fNz^#=n? zf@!Zu!A2Xw5Sw&vF229jj@@Z3hX?pL?Syj@K`^KZTM}Nn!DM~sB^;oK_<8)urEiR# za6!Hvo2|4Bz7yV``t8`v?)c$>E)0nSMkc$L^G_#rC%FC6cf7+Nsoe1yNgm&F!t3qh z4Tp$&Z-*+eaD|quNMlQ-Jt)>_)K!U^YD!TLGOHym}JW7^Ll}o~_1mpQ96Y*aT2XN!dva1tTPMY{oddz%s~_x9o{kF+hwAYt@-evSZ)tb z{VX%N%kTiE&K>LodGrf+L@JwD|}q_nVESgt1jbrNp@7ktT!Mzv>5JHO zaVFMJrgGaydGyJRY&@0z`)I#c!Z#t6elj^7=Kzwd7Ftr}t%S`po{=t~G{~}1R6^v} zFPnbS>3+sM`pM)&94j45JHZ1y|0Md!OhunqgH1PbD}=&?Gv6DooRvqa_ct_oeli1f zhEP@U$xw?CQrZ?o8Y6Abjpg~d8GBh$BM~R46O9Pn4EnOE_m(<8nH-6o`3W0nd1lF+ zKL?!PgU?r>?9Gn|BC{sXPih=Eq%|!YkR`7Llp|mIdjqoN2b3FMdfRK3{A4CpKJg?K z*ykOyJt;$ec!^>t!b`v+Zc*X4xlMQIwV+ELwsu0pILdVeZ_ecXyiD%%;pOm4MQA9P zmhV&Lap<~bK6EFI;|bF_osq5%clk9xKVk+7QxjZ+W&gmBK?A6SnK2$uxLV>%BhiH! zCkWecao|LnM=X}!W_&d_o5C#XpX|>ka@O*L{i$-)t!XevU={}Nx~%`!a)YCD3n{kU zaO?BQFCw1Y5>RAqtgme@KV@9@&kzC(4-Z;1ie}tEuZTnk0!M%7EHaNJSAA<++PcTpa z$>2ZWv<~q<;BJFOJk83?zLPlj>1-UawZz(6Z0&t$HHl{>)=#syht%GRBVG=c(f z2tG&uA$C?sNJ;-0zPDVi6jrMByq7DlRI~N!N~2s~DQBzoW}}g>)K{{NLcUN3kLwrV z!QhpP`D~$>D>btf-!HCI6n7g`0THwLZvN*bF#LB0R5i+XQS0y_Vm(Q22|mdf1fRk` zsE_rd_$NsQf=}c1__>$$)W`nwfADKZQ4VW&Q41`$Dxx98;SWJXA^5`yv_0VX8FqAF zIOH-R9*$ZHuCe_I*BvJt(r1bdb6|~N--15{K}Fb>=OC5C zVuZ4p8C5d#2#fxy9e^gRA@*iL6gRu5f%r%5mw2~Sg##3yhkxCI9=xE25L72VCuqSlO7 zZYTIR)OZFu9XQn0>qez-jOhmiK~^{XD!R4ka$Geb-)UNWcaoK}!7Z9L2%}HcQ`iabN`Jh$Wt$$;gzQz+QtQ9wBpQ=E@fBs4K5 zw@fwwXwk*~eBVe!>YCcO(opb|M5?vGL%DKh5qN^1qOJP6U8ExJOuS)8)S)Zix>D~+ z$S!K)Eivc8Nn+0Ur{kLZ==UADX79Lc(lv|Aw3%y^ip^ZUgsRTPM!uY@R*H>gzFsO6 z@_8uon>o_n7gwsKe6yS_ls%~R8x`Mc)bamf*KAC@q2xptNW2NYm>@Kt|M$g%@ZsHE z#8DbXQo#v5`diSWUBrjUl7oV_7tz5e2KI&g5F5aZ0)%cey99ATjK{j$y;_cUY4^6- zI91D(fxcjp0HkMBZGcn>Xldr7$V_)|7$j*Qh(I^RL?AU#mVq)r&?4BkrG2P{pnKAU zAO%cILFqjSeLgagJ~tYLtXp5H*PHoD)5{l2&0?ci%CC5p>`J-b$gVV3s$SKvG!aA7 zsCeakvyjcz^Z9%M_SLFikI`omgHp#~pwGPy zVnCG-1=gET12JhSdka=V45;d%O!4bm|L{gr6)=&@yGF;l60#iCU2k#p>a`F{Tf+R6c7GL5d1W7&hmLxepNs>%_ zo0-BO2(R)9^q;P>Eqawo)6F)Jjw)Afy47mEyppZD&2qi4lB;-?BE-sExmfn|6~E+_ zU9Z^8x|Mt>U(6T%YR--EDlu8|<5->xDNE`z{P}LigUo=&j1FFI-IKN$wd6d-ME>q|L9CUZ7oT9iA+i9L+1Y}}Wv_Na7V}1Iq zT927R6=XhC(82|&$ISJY1?=0En0wtfsuDA4jAho9?)Z(X#2irVW$F9%ufiNq$z|#6 ztzCS1S{;rzM<@S_!%;v&J!W4NbpPPO=;XC9ZY$fh0{&vv&1-S`BGJ+R8d&jtqodzl zK|xv@+KHB~J~L5Qub0Bo+3Ogw+1q4hP@9M*=RKEC(&2mcdeyBIJ@|e>SKp{+-9~k# zuu>?w#bULbD>hxP)GU{q(Bw4SQWnk#g=Vu}fnP$Yu~N$CVw#+o4*#oIzSl*E|3{yH zc?9o$%2ht@y&uyeajaM52ljsfpL6yDlejS~&BdHZgwdZ-OD_X{gLU)L>0UMRQ(L{Q zho7K_e{iB6KDP9!zF!Z`c=$x;ehS2AAL!g~NFfeHv!4Na7R|mT`I*+Q-^Ifoq(m%g zpRcq&gaW%0DX?2a&Wr|v2aC;oDcAIKIlovb!wEN!7)01o8!Pb8EkV8RBHc#4*(_A> zzEUpv{)(H=Rg-})DI+lcUh6=^)}TK$NrS$}j2W$?%>K5HLNUb^NurQ{6g`n7Tq@Z$ z{y>~Hl`6F4;MP;p{wcISM8Y&xq(Jxl-X+R`naonzdR72D3jj~A0{czM zsf0q7__VDaxz-q`Ga^`f?%|~La1uS_2}Me0i6r4DpTU{2&jL5(fzcu4Q&4@s0D38TEr4ABwBZn!~ zI2NC&LatO=%F#q3?aqRk(Aj%wN-s_H@?PpC%3Y~ZoH7TxR5H?ywR(26QR|F=Jp-^@ zik$PR+4FEtP&WnYCZKXA2Av~QqdH}wN79t)(>*}rG?_7HX#0w^eMJwZiF9?U0+^hI za~jM?1?oouHA5KLDKAw*$!Uk|yQKMdp*fd2vL{!PWI7orxz4tcCLaOBloxXmxg-&^ z=TXJBMd$0^@zV=44F3D1pYKCIt7F^Ht=IcLD%5cO7j0J`lnCHd-5x#|0>5!G8Q$4)2etZW+wa#9z2PIDT%(5Mzh_Wi2C1hQgWwnFLaT&N zyuXDL0>}i&bc6V7D$GUjdz4$)r?k70msb4#knfEu$WSAS%eHCsPsj*=0>B?!!|$jW zgk;meT!zBPN+w7b>yPA$R^#wSQ99A$cCIe>{8h&J*(TuuZX!(Bx#%|{H{R%T|j4MCfYNbt?fbE19{b1qOFd2q)aO?Oq5ii>Vr`d zRlD9J&#in;x6Pte#~mb;QtGw4#1c-NKTc2){mj=<`(>W3!Km59BPXNc1kB(#X(M2g zK$0mLAkhsup&iPHK~&b>3N5S3{3ABkiNa%)*qMu5T1!Ml*rf10kza$dJ@h}5`TR4? z=eN^p>3xdb!+fkpkf73mq-5x{Y56;BFBCAUQxOvx4^^xgA}^v0mny8#EuXVH{DyS+ z4Rkm%9XbF#TaR>fQIL|DasbX|b4X*)b;u=?)-H(9_tCls-);2h^aPAPP8g*SMj`-G z?VLRH%@&fwCAFK>dEv&g5~}(lt}ISgA~PoO0CGd{!BQK*h48SALYuhdHhcYHY}Nlt zrtGhP;N4FlUn(u6W=lC_z#tTjt@St3=x@-7lfiHKb*!j;`t;#-yiS`_HoHWC&giW& zcJcx$+siQd31Ai&4|y zU2EXc6W}q|Kf5$F4fah2Ha!70Cs4Hc-7#@z8nAa6VDtoFCurd3AzMxB>~7N;J)yJ5 zsIxtZSku7YXTZ}Fz^@Ycy@*=Vpl1wpdIEHjo5t!7OoOmwAkY&aFsqu7yrzN38xZsa z5WKH0hyWIp4QzS>Y}S^fiDA<)eAGapCqOw#i(v20JxgQLx?45f(G$AkEoJTB-G#Dg z;GZzy=?UPOIVMSLPqNvRE?Nshd=~)Rd%rFKqOK4WOF{~5ahoE}QZbdxU^b+fyxcWX zlDr3X53yRfU#QsVRv$#1b7!G0F{-z?{f2#41kann(G&W2X{ln#HwC)7cbHqy%(=rb zDLWTa8>Fru4S^q+O5)<%o13_Ip@MQ>_6LI0u)S&b9^OFmBL9w5<6dV3zD`Mr&t1XT z+?t~A5m8NX|IRmQ_^>6w=FgqBa!)H0UVltKU4p{nwV;hJ&g?S5LO zA9_MR90G^@$i#P1%_1Wv$hvYp1x)HhK`YoW5a|gJHwg175Er8XL9a4t<@Jii_RzBP zEOZRCtA(LEYnOZp`UVqv0wynvVM62J4Mf$e?TNH@?btvQ9ohx^f-Tb{J)uX@_omIJ zB;n=hOl02ejQf_bLMP5DPKodo?1@?9s|%Wa%6DlCA;HHCqVxnrnaD=+4Y)bjR$R>}I{6_vYa>dVmeH4(v z3G`n4L4E*hcRrbZcz)jsULZUWRVh7@zI0+7=^K{yG?wS5b;G`K{Fr1-Bhw*mG|O~& zcfxf;<{YoJ3Go4CLfq}kOgO1uF(>{6F4^>;%x1CKK(hYA3erX73SPdx0<&Sx<@n4h zl9pCWu8VM;YO#=Sl=D?Lo69yDUcKx?cF*SA$@xoLcfBs&9DlrU=_s5bnFtC5bq7)h zmKY5=+=oD*&e^BKf;ej==KjjjKS(heRf)0t-_6;>aiUDi z$WjWwsm%Ng?I*Z>FdA>EYB5+9rB)?jggES}1!U4wp)OAJ1+k}kT0G_qA=Nf0kiVVa zbD&}Sz%L{oeQ#mOahU&@q?v=QJ6iX(?r%LX7B*>ptO@*mX+9!}@5ZC8OL_ulc?Ss_;HWh- zYc;p{$zLgIn=tNI4KR8FuriGsR>Kx_7O#j2oNd?R*s{YzNjzxPg7_n`Oibn;{%iA=r9_^)jS>@op|C^1!88uxY=Cj(A4aAk7bdJoDUZEUxChu#3L z06v-QU~Fu<$hmIIv9@8D9TSp9jRWd?j)Ef|y| z{P7espgoF7hLhl@&5Y6$W|Re5k;BQJ7M*SjoP}HPvjzY?0RSJPzCYL`X9)5BFisE3 zwaht-dSXqOFL~|<+XK{Jv0;AJz@#U@+@?|UUP8HNRX;!19f`kJy%A>KsN<=qjm*v-rwj1M=(G?6Ey=5nsULz#DdKmxJJ67>wx& z7(YW8r;k(>=Yc`IJ#0A}&=2dG>G*DgPFMq)+~EKNZgA0Xd%=FybVN_+h?V*_kA19ripUUEL<6 z6q+ziMBQy#EK(_+1*NcEXM=AT*z^S0d|4^K7S(>jynmZfanci-E*o{;eT3lOoDi=J_AK6*L+{Lbk$!gSn7om3LYu`R% zQO77PK8^V~AC0870B;4oq&1w2L^~Or#yQ(J3d-r?8>uNt(6(gQ`xDAXdkHLMrG$A5 z4$t=ecut`)ph~X&(A*@&Wz{Wu%`DQy<%`u7FPm#Na#>UvtyD@YE3OM)IS91PO1tRKyNNsQKoU&v+7_;<3<157wOg02Qi}_Hqm%5%Gke) zC7W^+^^}vQGBtdywD%Lss<5CB;xOBwMhQGQ(I`=r4*1$i*K{Q z>rl5{kob`k-vl-X{}X%FcT6Pv^TA&bTQIN)Va-WCw$N!K1r2C;n5Gi-Eu7k8{PI=BCr{m zkGXjxui0P|`p`!bV3p=`Z*UW8(RZyHl_>H5>4SWqDZoTen7D`5;CrCtw^VnObT|q5 zyh^gk8OT{AUyV<*lkwM=mAZG4lqbWUcV^M?hu(6`k>%SBcJu`7STCi5Vzfqk9JoE% zH3NX20AOBC3Rhn2u`3y`+&B%zPk2iruh~Emb-}sm=76Gt~v$k&pz!@$)VhMqIgjAPU3`-QuPWM}h z$S&QlnnjoaG2sq=eIj?@7m!D`Tz6O8QYBj~lvhewzX?M{wN%gMipVbO6;~ShthbVH z)|*AwtD-({#jlqtC}34-R7;bE!iTYh7g8vU6Rywy;m!3?D0PdciiTR#9f^eB1d;HZ zeOffQy$DnL%c&(kf*B<#(`a@H>fC)~ zoTl3oIuly`A1Bl5B65KjAefcvE@<{jCFeC!KOH%wP_n9$&zB1IIvi07MO1{S)*HoQ z7Wqqxe#Of-JQo$#W3-wix%8nJ3GV*}Cbk5(G)aOp=0vjU#D%qVwl}@Y4PwgqVnBt+U`#FL@o>_IZYLBn)A!8_w;j8%r7 zfHeDZH~gkM>O|R9w6LO~S?ILB#73Rgm(cb#lA4s*8jI}KRw~opSw+f_4WwX!O_n6) z!Jxe^#+(6Sc;jK=^uY$OX>US z&1zO$40PWAH`Oik{Glonw?gfEGOy4oZ;u z5HF))+wlICfk#h(7g|da3nI%LTh5h=WBwdA)LoV+25iqO6kd(PLoQD>GDG?*GU(nb z8E4+l{C<4jVC7UhG4Z=>P_-sNB97dbYyQi$y%gLB1@324&m+bxA4^^fxUTS~nIn2X3>EzV=c%}wtRra1#xjB%n-(tf~+0`#aH?4@C^ zA9K3sjK|Kb(l*+S#MsVAY{PZofT4!fud{FS+b}e?4NJ!001Bh4nfgv0g9YTS1)HW4Tzwc&gvFZ^Za1+zyHF#E4qr z`@ISA-Aulbz~@ooRoJ~5KF&;Iw}kb3AI@)j&`GXYsh0do5m!#Wnr}k%uIId>-)J-& zrFy|_`pv567vZq%Hu7#gSIT;oaz5vwELc99&6m6w>le!+x`QRUkYc*21or!{9Up~- z-NgaXico}SO*G$;r2gmUY`nF=z3$dqtFJwoZzmVUPE5(gt8JJtlo{0y$<}YM{vnCL zUKJ5DLwH*wF(Hv^exgPqIk(eP6XkQDMJx*kKIrm3&{5nS(>x>w&&rAq5epcF(;S@M zL~AV;(zF(d4z&7WH$3Dr8%(^+vJJQu;&V6@rHD(AWk_wnF34i3*J<;Q&)R=@p4<-DD#EOJ~M%uFtaC7epkaEg2JlvbIUE>pSTe`VqgUw|c|TFDi& zE6qZ|E9C2Szv|_4S(GZRyVXLoQO?$@{z`SFTtTuWui#bvaGg)rA&37;NPJ`P#>6~Mr%uZ2IJA9XPEN&qMyXCFuQr1y$9~A{iVTaxS)V-K zYolQsSFe=V!Tmtl!h79}nG|Yb=Txz332B_|p9eNkj@m+1>(WwAY^^^Spk9gT`?c4i zWv141n2@<9QlB9`C@mtv=l`f}VH&pK0*N%6NGsawf>G4QY)5C4tmTrg^3f~K@MwUk zyou4zly^J&RpmHFe=69x<_@EuStT6($#$L^2l2i7sxy!OhkwWtBkur&vi9*GQ6rte z-FnmOB5n}L(V|zq{<_;$G1k#rwu-0(z0q6AwYP}$7!=cml%C*;UpTdD#x!hi_^%-D zJ8A*8vSaM=IxvCU-Qnunw>IOQ*{rRf4P^Lm>pB9Z!)s&Ydcf{B70b?#4i zbV@ei_1um>@cc~8Y<}35eX!gJawS8^Lejj?yKSd6L6n{sQCedt<6d6(hZ@(U{2VSz z8-s$Jzlr1D@q^n?V(_J%Ot>fl_gHT!bX275{{h!YQpygmw;ND8;@(bc^(7Wlf_u}xy0{rng_NU!JVKNp z#QQeu6&ry1Dzg*2W>Xlr*Tq?O<5iSIN0qWyMJzHwz zs`cVZGa*r@4Z?`g|10pY#pvHyQl3 zN%24wzpt_$Bj!9I)+1*#u{viUX|knm&j>JOUs^n~{Jp8_)Q*Pa!? zjsZYV0C2-m66G;Uh{sg(pxw3Q<4>E<=?S0Te3Z=B7}}&3pD``y2`%nCVI?dznhfd9 z>ZvL#QSi{YLD`R7mHX_=HkA#^RwN0g_f?SL?B+E5}!Q0LM zxoJ*MXnx-_`aYhi{TEDodP4gL9;5Aw9R(|Wbc@SM)_qC^jKgYU@GlJndIE&oR!ww7 ztVD|4=+{gmdP1YSPWtPVr~`4_!Ujy*I=^mO(i2+VP5Xd21i_J0w`2ZTdllcOCCC@N ze*$_!)65#N5|n!#y}@Q)kA@x_y^Z;+u&D_UdIFHrw0)>Iio|VCu=!s*#-phHbC~zf z2eRm94OCD*qK(dKJ}9$@PnBFS*jON@#BH!A1<@>;hYc5D8tY8H6xlc(*a;7C5~H2)Qkkcn zG?qr2O}}v4^4CTIu|fbOIrzR8P|rsXrD(%qB&X$9x?jyQDvr2s#oxn?VIrv8FUc_RAu$h;nj;mhrvnlc#sX9#*@%`{FE z8|n`R^W1V_?zPt@aMrQhn!&3eIw`8A-zIKx)#hA(3cKcYLf$n%#=_{q=@P%bq^^)CTf0=ZGK~uta>pm6fq6rXc$4`ccd7KUWpdV z^lt01;ITOH*D1pelotk3)+-S@>KKgakx)lX>Vy%>bWb!!U}0)QsATCETWv)p*J3Y> z?u0nS5txBaZ_DpzbGdn>8#4oA336eM7>#nQe&peO!z1hPUuqZw*JJs4OdteE)8C#h+^M`Y_43&<`8$6bxWmEB~S7A z`D_k1T&3t|SA5u@i@BVOqT$6Xs)SekxQ)a_b0n}dTAP=FiLJFk95baf@!U1RHvSU~~N%NDK*)x|t;g%^-;DR<;0+)Kk#zt{t@?1wU%~ zrKeWq15}#n2^8s|s0Zjq$Y#&6`C5q*>1a;#unb*0?ezFCLpXp)XUj4aR5BzNZx(|f z=xF3n@=J=1`OdKo=!l#(MI$N7-|KBs?F&{dFjW-{tmcaj#3ab|RG$;B>27x&YB9Fp z1A#Gsj1S2-ZU-tdk~k-0WeG6BkDK|SC#=i+Ng9*|)%g}VX^p(n!zQXJ`e#bHpx;81 zMfDcAchu(UY%c-Z77_r)v!eZ^>64z&=Tp?DW0VS}S z$Gi|hrfaESthI5KQhhe3C&JD*6SgMAq@(%j@6+s1P7`+ zo?>5<@eL|5E>dyfB`~#lq>aM zkEq=so0xOMIWHa@Kr;#Cv2xB3>Xm~pWm?1G<^WQ1%kOMz^XW2FoQGT9VZXaH8XTrd zb{_P?hYKb6C0EPHl3&g(ogzp}rvPb*5L{|^mlWl>uhrYa_FE#O1BB@%?sJLyT%tY; z3xqOl*tmA|pPBWiCoIAvy9}Hhj3lNBut5Tl2o}R9{ccQan#csWc9iqCVj7r@NGuPE z++v6Ior8@&Dh(Z6bPk&N7Mvz3fs2}o@v_sH7{ zEUHk;d&I=(?KcHhP{nc??Nvq7CgEH(Vl~p=hZj@FeZzNcG6S0%Z18bIkJYr|c$0}kc^$V44@pphoy6UQl zv|B!MZF#wD6S`Oyb=m@@gOv5)yDAZ*IO`SgE?c=ekhdlvnDd5(s${`WmF;s26=?>)6f9MzApYn!g1e zw!Wq!`Wn(szhuIL;=zO{ zt^m}1R)PqYHi*A8Am|Aoo}H@0d2a34lP6c#jz9mLi0ve+t1ck*NiUn0SvyhygjdRU zwm5$E)gt^nM+q{NsarwIaMBEjfTxdr>#^t7mPv1ZdLaTAB!r*kU1xA+(dRJuo9?GcKDWKNF$#!$8p-E;4fV1cW9Ib9Zphj=ZGSFeLyA-( zKiHpYPu|$uc=^0vsUo>x zrC47{Z0T}{`09}6_p{0?LS%e;Yx@^fuOE~uLaWO|WvWbw9cqH2jO~D7Rrx98ey&OAO zWQ4Yno@R$uMK8x7#O%;EC>Cg*1dZAs0u9%_)VSMYW~t`A#EybS`$sn?dq44 zzf;vO(>_p?{Dp~>+-sufCBpLaC93?{3VZ~^Yl^ELVyKHgP$t2+?9}fGz6$2td`+*)_YqLY0=VG zLdTXw^rsk38WL|COh|8jv3UGW6B};*#XlYeM5K(^@Wbb6Fwt8FyD!G!U!<}_Y&hnA z+@EHX7x$R}F`d?uyD#m$#I<7zR;Aq-M5guiGhVQ2`uD0})ufNqRrGOSG(o5+7m>=W z0l@;5sVJJQj@;w9LZeVFR#A<)S+8W9UbfOeI{wsHa=5KOnRM`VfSkqJ%GJE8k`x(&J{UH#=BDrgXAxlC(mUbn@ooeY@eFxo{7DF9< zkcmfENjGBI`6m-^8n;|@8`+#+Y1Td1ZxBl2LrsNTWDQilsOHMZwdv-NNz*UniXOtI zalv@ym4=(Gd*yt&n)Jm@qHm;~p9dDUv=iBNPgJc7lWKt%U!fGhm=lz=@dvE)?kSoR+pZ@AP4us@U%oIEg@(fT=tSU`&DBupjXic zHMMSPO1>gf@}1vu3MMR=oJ66zh~?x^2m~d-k#vy)i4S8)P{sR8h)4#(f}|_-ilV@^ zpR$52rV*JT*o`RN3$x+L}z6O<5p?@AcYXxeRg_x?#SuJI4YV}SIpO2YjMbe=BZ z!aJnwmaFAlDW9)byhaXkY_8z@`FhS>sUq=d9{wh!yjQF?v)M|ivVths20Z60hzmjv z)k$f+CBAj>b(3&^>XlJA&r>s1!sRO{5^)~|KIfAojlo@vGOmUAj6$xo_&XxyqNXaj z=`3!s}0aTgO}hq4FPQhKLmrz8H;>%!?8~NggW_Xlv%@%!2dU zYYxYS_B@WLh=-Z-!M5dSegW76cRe05E7m(%N4tTtsoSp<8)d&DtRhi$G_rrw93p0< zgBT_Z2<2{2?#PoDQL`v(*kBv7gB5q1D*KYyeQtTqWRz*i&@Nb-vl;W~9g0TJ>mFZg zVz9xXkGfuFzTs|@Kw+&i<4V&>pT)O8uN%RQ?VbUme|qZ#7D0%a7w7eQ6X>x?o_~q= z7U1JDhcs8y-&%%QISF%n&Fc2xL`{P9ku{-#caJ^a#ylN z_~xL19IC{v#FXO{KAbWFqqDdhXxKW7uNhxd9tS8l1&|7D8!TAb3j_{6t+Jg#!liO- zZBC?Z+_neH7c}{sZ1^-%6r~$-cFp}3US(e}O0vC=mc0@-6Pgis2+6!YqM%W_4oEwp zZ=&d;a@LW=ZWF2Q)+mQkqX$(Eg??_h$V^7&YZre}px}^#vg5&wi5S>p)4XPnu0DHW z_4t#P%Ph|c#YtL-#?o_zS6XCHjdoE+dnjEuARtMlWE54liXov+TAhaR6VE*Vev$n# z1J1742LIV8tLQ0pNeE=^*<+_ptv-2dSI{%Ai4|`hUM~C0r1Y=KY~7mJ8~mL;HJ5@3 zhP2zt1oQ;t^V6nAPLy(WmPq}00(?qMDB$P`;2xOW^q>0*Up?Jq}ym- zXW-Hk;6AZNnt$l9WPMClegkJ&b~d&d0n`rF^!)5Gm<5h<5VYOJ&87=_LKhEV_E4Z~ zfP9hLj-JT|v{)1yjS_MatUW%X;ngwrM{VEdWI@)R6V?dlPL0PGjYuKamg=3Y@Xo8H>?xk$7$l%P9hu;1WFgW|; z7>kE*JEM)R9WnkU`lsLeL1)C=lu@poZ)7eXy|;pPjR#WWt2U7pZlVu8wg{rk-tfrW z-@_fZpM2COv5BN*Bi=p18Q-1IvZ?8h+)5spq-GoYGBc4$6>j+z^qhg5ORI*Jh#8Y|6mDW7X*^DqF`!9M4UIk={~+42hVzxzP_C{XIq-2UIX{_H9Di$-qxSIlh z7k_0l?UBGfMx>)3Hrm~czJ8HAj75IQcQ4z{&M&s%zMS}$k=CDz6i*52M;pj7&sT?H zOeQcNYGDwM&S{&^_~3dt14Iwaf#YQnLc3x-XmRs$j^Udm!fMdou@1^`PeLvHHSOII}M+}2F+exG!vII{I+ zHf?1r%gD9*cBXrzOxiMA5jMvy$4SwIe5~PZVIpB#_c5U z-0*7caHA>&tlGI;&pET*tx*+%G5A!0pmke#nR>nR_jf)9wVVDZ{Q{tC_>b9Ia6uWMs3aKC2N<4gc(6`gar2 z#!zn$4r@G6+6woX@fy@YhJxnkMN zd${zoZXL?6Y~F1mw4s^z%Gpw}m}?dql-4YVGP&`58&HQ`Ymk=Ry5qX)-bebm&muRt zsKA&Ox$EmFQ35qE@+PrVr$~U#%_KJ>q7Nk7D`|+>p9D%F7qlw_IvNCc(qWGI=y zsi&Bf5z!kUPzP(|3v1jXQvWq^D*E`n&J_u)dJ-|BewyXJsMv&k1FA)j6paXDrc_Z2sgXjI_b+Ajlb zUY*l|t3uMo?X*eZn9vwKHKWFe?p3~ltz3Sz`iGVI%hF(kw^$6FwOf?n{c}W^Dq(9{ z$3~55DJ^-7m?F%Bo}7$YE=8lL)`il>lBJL-d`w|;gN2ydx(ca(Do8b^A;p?X-GQF; z^Fk<~B!Qy9dxO&j2IQ|NJ}c}qVo*Z zJ{DKULT=_b`CBHIo-sGdWQ^c&B1MqKXsh z#ko|Q7-L&?lKL;)bJ?|{;1hDLrP9QIbG@lFAva=FR?n_zabzABJp?ptOmfR*KAyx> zrDlaG{K)*6%GLUc0y*34yHVdh@)6UR0375r^#>nz4jQ?<*F6|@z~8_I?bb+!rSHff zebB&ojWfDR#R>X?BNgiHb(q`x+w&q%bz^nntbw2g7&1xu>)Rw6!=Yl`pC1QzZ!GXZ z;LS@(wuivbz;D+YCtd0_NQ#&_f{4$CZd6EO4$|j`m>IB8pxPvY0(hsvW~Z%Kl~@H)!u99W(W=)Z_&w0R4h)Q7F#)$bAY?$LXab!&3I&}(kOf##8v!^+ zfaTlrp%dtxaq8gwK@}bUWwdu%y-}Zhm+>PN|8epKXUQpK7pN(s1|b14$Y^i%3dbQ! zt-zF9v!g7xQVlfJ*+HQ%*bpoY1&rm`9>`1#s@$W6r2A@{r<(hc`22BC9_QUhz=XrE z$z-{Y0&eJxM8}r?qW`I3$DCK_>>xRGhW@2PNxPKR*w*k%>*@bx#t;TJv|qC7R8DUs zztY@Ltr)-7>qlN#d;pth@M$h!*wl*VvJ-q0)ykA)L%?tjdRVq07*3O@89WD6itIk5IDxL-FVH+es>2Q; zb*k*GL`4pC=)X+z6KlO7bb;IOJJ>PcDwK;H*pUt5QYcygb({FuZ$Mv%%?0pX-v@@e z%Yl!3p5cKC37{j+i}Rv{9l&FaHZ`WkVu;%fdZB&;ImDj85wPD0>O@-Ut^QZH5ZL_o zC9Q(Qs4(BkcDv~gp-V%}R_u2+CSwsewKF{WvdiV=f^b>pxI;4sZVWq}rUb-|JSJq6 zn1yW)`oJ=PTCr>^R8kDu5eU$b246SWphO5s)TC*l@rxdCTz?%qBs2>d+FnOkN4^`8 zSR~;7=I}^->S^0z<@J`NDdK9TG#FZ6%3>y)m&DULvdAIzG+bpI&_^mr4_zoegscB}1D$9MN@sTWGRH$Uj@)OhZ{tuE_%=g35R zbB+JbG}yq^&6agqd|;s8)zrHhvAq#UTBc?Ck8~AnJEcINqTDna@@Fkxqg#Iiu7YZy zTA#_As2laAl)$z=R5h{92-J6~x`yeN|4u+7hj%WA8Fj2*Mc-Phv}`?(&8+ncCSQ_R z5t`O}*nH)^9IohGspaM|bo}N}cBYe~sSmben(Gyv}jMZ~FE}rg$H<_Q5)I+R-<)j}^8%+b7A`I^YUx(T#pn_Tf zMelPV^nmg-2b9(4PrU#{2S&^_4UTJA-@RpS|I};1XPdC{HWOz;556Lo1 z+BP^yiDfqU4E^;$c;lF*QCm-MS6)%6KWCC1h=ufT05shPs#r$~P8XS}b1w4Z6iaT_ zLyBsI2NX(v!D|$X*(&n8c@?*TP=Zp)FXJl@Ke(t=kZbtK%x-t@vP;~Tc7kuZ7Vc{> zr^aJ5HKE?2pHk97(Cc_UaG^5%ef$SGWBkM9gnL%(!UqPFZ<$M9#}5m8$9o3yFaVNYj8Th0M1lFP4e{d@R?nHR3m!T2YV5fh zm7+@8LFL}uCA5Mq&B#UI!||EYF%Ty}=3HZbeDm!{$(mvpI-Vk+;0ZC7y&Xm|9@=7s zQ3Mn=A@lTh00kzD{aBa&AF3R=Bp% z1W~WL1RdWLq{_t-$-T{5JSiWpdI111xU0jrC_T=;$18sL=0;Y4Jt`~TT{7huV+vp&!jY%qgu*^+Ea z)~j_T`Sy(Nz0=*d?@QL$9=$BBp4N;agDkH4@$c#Gxi8%etT_ zcCnWv6`bOc1mob4xG-Kq)dqGKXGuX!Eo8w2CsZgZkjnmk-*>)q&i~PU`;JB1F^wb}hRT%*7)?kwkUvj=&3Mxit_~@#Lh!Oct>#}+F zY3^NGzWlb1b}}u4=}Akw^H4z-Z`oP5jcw~jNrC87q#Mn77oC1!LU~y4U6egqCgT%r zmOlN3v_t1P^u(kNr-^Yimdl+$ac8fbm(Zaq{*K;k8!e?Xb33Z1OJY*V;KMm3jlM~D zmFU)7C%f9o%DvRS`Pp^5FB|xXEv5UJdBv!*ifBH1g8^5KoP&Q};ol|xjL_V@q%JIj zmg@3c4<{Q*m!BG! zf;^3zl%OU3WpPF$?A|TI>)s7s=@~?nmcpeh*X5BMZ&O80+F}%r`zY?ib*Ytm(y97+=(6AtETob$oA_U44#>BuX=5%BrP6O zzS_r(WSfcXE&8!w6wDWC;IZ=CSWjW&MowCXF1skm8Wnd!e4T{WQHyFxjFAcZXks@#zco#LPjjA@8P4JY;_s8=hU}yea0$OiVvztb>SfvM*z7n z9ioyBPw~8hKve!{a&Sr}2qjYPs%F^%D(`K>g|-9<%>~~ar;AfsBqGv$?}b?S44M#k z$e@;&64fH{M#xQb_@EYHCCy9D4q%G1k_~5ys1_m8x{Ga@D?O+GPKCFW$`-wJXGA`@ z{_#k9&b@B9C75(}lr$!nhP4d4mp)HNk&R1jJSziN2>!9h)2Hau^xOx@0IZ?gfp15VZ{ zWk&y_KAj4mz^L8!KyOzfi=ifLKO{Ubj7hfe@|%@cCpVU9ZV z?qYy@{Qb{)8t@6<&pZMZ+#Z7Na#I8cZ?*J9-26ZF&H04pw>`4Gh49a5+keKl=M&oB zaSzuiWk%g&YFyH3XeJu~4rNq4fM4|x_yh>ooeYMroh}0n5$1p|!aMd$G%+%mEc9eJamdQ$e1EeRzk|7GeKo+Xg@-2F*wA*I(Sx-S~T z=uL5lavM3Z_A2cR`e%4COPj?`wYcW1YA&7YXSn)ds+|}db$MtkKU>gZZ=En8CCp^O7FWTAf;5vOeTUt z3}ig78l-7&vYp+koxNj1XF`GL`npC(#wC&M=V%HQjf&vn5ovU1Q73n5Co2;= z88ezpA9)SMmHN#HMnJ%FZwH5?N_7$~iSxzSRPK$<9VlegIX#-Pmm>nM|2x>mX$6H> zJd}R&*`Wx0*ygHSXnaFTxe)TxaN=p$J5W!Mk;c*xf~Meucfhe8K^Z%(4tQC0w>SY# ztg(ZWmw{0BE8>d09A6eq!~s2M>=BX>SO%CJ+FnA}6CXCf;O3bT#KQ|Y_RDRQsDK{{ zf|PLHxxMSpj2@E0fJE^HVebah0Ftd*0EE9s0GO#q4-k=?#w6mK_jOe>PJ36El#MLwE_@ zrpD@fm0u@ydf-^yd>(R~(#r0-!;EokcN4~!>MTUPAgGVAkl2`Dg;IMI;v9ZmASeDI zEK95`%8mHwnK*XJlTCxD{63@8L9`eg#{4z2@1n?22GSh%KW`=#_iVzKu88&Q+^kO) zf}Jn#xJ_IJYK`zpQEb+SZxIa`VIep(OA<}$ve%DClC?ewY7{*qXC=xLx3AzG(OyQBG5HaF^7={l?^i0y5wttNR4za+oi z*9k+5IO!e?X$R;j>C#K>aZW=!7XzWQ<~Z%MX>J#t=Js&y%9GWos@#1PtZ%V$w}BcW z_4Z=3(_ZN;H>zvRR=v`0tyb5NAqk$pm8G@%+FE@XdBqp2tyZnsUV%2alB_mb_1ao( zX)UYVJt&1!18Ut3xzzNfyrI_re@?j z0@CK1Z|MMKFV#AX*}J0VJzVZ0p>wgC_sHpKk{5los(G)=sd;rZMPiKTT~u@MGH77> zRJ17cD=L>ut8(d6r=q02wAz(E^(PAWl4?@=RF^2+OQ$&LQ$3X6LM`LmizgO`eO@DdrqkC8G;Ek9H$Q$~Q55>{*VWrciC*P=_WD4BQ4fsiU_91k%? z?x0tn>m}#+$LLOGJHIv@Y4ughmT7;lOZMT&W#fpIvlhPk04<6HO!LE_ED_GvF7X4J z=bbfDtg0zRGQfk!1{q@EXTboE$(j-I>7sa;1rrZF*RVG|vjq9XDaVH@c(c#FhfVqX#du7S`#!qsTLkSC8D z2kf%$Nt$N{3wM#Yx2!jbv^*+7`5olu-^l5^LNIm|Bc3K)rgD>X$H_~}%D!lmyboeD z%&!?@iHAzweMRsaBmR`dbEW@U2tSF-N?VqA%28#4`%2-o?)SeRNBC6I)643`@&>P} zB*D~&<$HixPC~jm{h`T0*JnLg1dREwWTC5o^Krm07I2cK>hj`pyIx(ZqYP5L)2cSx zmD*x!xq%4Cwbfduu~c1Ypw9F1%3{5}T&=DwEjQbZwR)>sTTCj5BxTHMe@&%SJbk_M zUYSXWbj35$!1q4|)M9Dpuj1H4=fuJhmY}d?LK;*#kZ zKTMoO^^@ExtE0+O>R5tPhSvh)QQ-+rmO~Z`LHmWlgglWX5<5Fw#&Y0?bKL(MTnD`W zdGCbICrsww%i`yZ=^(u0j(-YNB&Wo?SHo87mNw^KZlWfD# z>Gtby=zhH)`VCc#n-_#Xp!IX?UAT?N;Vs-bGP#7=7X`J*^itRntd&)ka7omcQ)N=u;78zkGe4erBJDs|- zzmGlZLi_3L@P1@d*xCKJ{sBVx6+^5TAeeh|f+1FCZ(i1=x4}Ad2hZeC3_?Ef1fFbK zjm)jVo{Bkv6+CVAbVhLd-djGY%8;Ch3`(Z67 zeG{A)-Pa7_Y(vu^b$KkZSP15a2nh04Yh8#zU!zF;29rw*mySAfI`fb(&>_2j-fu1# zld<>bf>HtSHScJPv2;wa2S%R;@`}n@RrptK%OGS^`EIQHEPN>gvf$Cz844!jj1~Ny zr3z(%tx~!|5ac*~XoplJk8Gok{^JxR7?j@(; zSRAK^T~A+{URO5wz{Y-ec68T)reIq}qI69+FOR0dS@kA=0j!JlCKXhYu0aD*Yp*t% zwN|s$Tw1Brmzs-}%4#D?YROt_rQWHoBHX9Bgo4t`ORLS*=31?}(yZZSJEu1ht8anz zw{>}}zeX@Rc*xE_`PhBY)vntQniv0_a5&@db}gZEMeiafsABD7{NRmm}g8s6dm?8*#ZS&g5k2%U{u)VzcTFoB;h^O!`X_p#9EuJA9%r{X|aC zRR?q2@)uVtW|CC>-dtx>N!2zW6-21qe z3`gqKWTsX7J8%t=ne}lqv)XdWiJ7Ie1dbEC>|I5JMbw%bGjR}@Lz`TE2Zu4craWgo zgiB&~HE5CT)qa8~{Z(LpHEe`$4>nl)*-sQyewHKI-h~|4Vvn_-tx0T?_3sLj*V?(X|YmWUTUPn&q)%n^*w~@A+KZdTxq+>3Z-hhiv8Ze zsUuq0LVlq|Gvs_O&7^eyW}~-JI_+RFfT6X$)1%RgnkyNA<~N9%&!JA$Hsap*P>7ZF zzPC_xSRJ^brpo{nd?bOx2EymWHa-@sh{NlD+|!3onCPb|dZg2zN!AAa$%ZW{xx|b? zR@{DtDazHlO<>#D*|;zdwO^Mdg;U|{Kk57A6Z(9ReKItM3W<#d0_DMQ4YpehIdHj4 z_KL7#2n{fi^q68Eiv*AV&v(Knbn-U0g2M#+X^NWtjBmy#G&^(cJ)4$L#Fw zqQ(&Pg~Z4p@b`8P>Q&;4&l*03#UMGux_~aZ1`pYWzgK4GN4o080Y zE{J%HG#9pqv_@iLQAAjl0X7|Jq3aZTuv02MGc!O|4yb`yv}g}0?Pi`WTb;XZvaw@K zycD|YwvH!T^TWY$wCJ^vQRVpJa-~vRTUo0wu2knw5z_oAKob9r`QFz2!2sca&a=-&i4)?QOlJo9Cw_|ggn^HV>GlKX5u*~Zj922PB%|nV>}isB z;y8UToa#9FOjtPdRlf|b&&E50D38vbWUVs#%0JK)e`8C`K(F3HI9Sr2iO;sr`hoBX z1DU;d8yyaISmFzoVXSm#|FBH7ibxFO3myia0OKh4qE&r~bDbF4NW~#%K@26A)}eC1 zS|Ukl$b*r9B?{Uxu$)5XTXQ=%a&9oRQu@p7;f^HJ;kMkyp~-`B6O|uvPG|FPGo8)5 zUfic++pwQg#5_c5h;q$r?1%JZF!bU9=JGl`oT8R&rYXD`476OlMcR;@N5dnzeh#I3 z8QaknwaevEyS#)lxRa6q-138eHk1k`-mBq%zV=Gt+qm#;F!@JyQ6Tu|s@P7hvg(bF zkry^>r(4@DO3(PH=y>Bji?Z9`C{o*%ScA#qEC*w%%S8|* z$QI|Oq!-7Tv=ybE4yIoQ3ka(~jHoKYk;~IIYQ;CRp+&Bup&};<#X$^ML0~9^8xsn6 zFzY?29Q$*LAZl2OGC1-(hrJg9NO@M>1rV~bk*H2jNTpW$bRi(EQ_Df1YuLS-a2-DR z$Ro#&Sq}Q$*8w~PqgJghRVqu+S=1`4emUyUv&Cw!)aWI7qyNkaOcu~r zTa8|=pBDQ@&p>ft&N)D|eoOTQsNfWz;p`f9bd z8eEP5!;qjHinNGG@z=w}z|%FjHbvNjJYpt;jGP`viASv^%~Yz&0cMm9jyLF(dQ8b^KJvu|bP4>h8;(esQ=$~?{roEO}quyIE!neNU8`DepTLq3$>A*S&i_o?3 z8_V+pieRU-O7y?<&d|fH=C+paMuHNgho!JcdYG7qk0Z9h%~dJ7XqB|caiNF8jC}(6 za(8creyt3%ag#3}lfDgC6vhsb8Jq~JQzA=<<}y7cs?T`Rt6B zHR$^B<=3&|Y+HcNbc`fU=J%)}vd72LvWD$tTuCAe>}VB1LxNofPOiaziwee8w& zJliqda_D<{pKELk5$){p(ri`ot2w0szc`9q;{9#36>>?*$Y_se?pxXGMn0)y zmrexdN0(kX?uaG@sUq#*V4z0K(@rb&K)>e6%7ch^sBR$-787B2d4~KaN=w*27jWNI zYn4(LCn7F4BwxD7JNGu|&0YB6Jc>iK7-Uf`LW4-!IPQY;DR3y2Yjwror62&nC_tD) zVkNA6FY(z;DG}3Lr8v;zBPz`u;Lt$M-E&yr7Hq6rX^b!kajMY-MOL>!QyAxs`26Q8}7c|2yV1TlINz`heeKqSH|HIdgLP>dyUF;k(AL|52EN zsq!4*@9*uF`ag)DQ$?Ajw9CZIYJZF-1o373EyWG{f6Ax-h(Cr=6_~H^$8_zNOPQ4I zpu)rS$!CS?oU02{v7vIFCU@gMLS8mKdTlPSHO&WR`9OdCF-^;(gYZ;GnSVIeQKnWy zX^mv5vsS5A>q!+QH5&D5y;+03aH*5Dk=vlwY^^SKmYc0wb#ZN_v$D9jvWgUK%d7Qz zGvkMkq8nEa_ReHRyx(Yq8XMn;9O+sbS?eH^gLg|`B@4(j?RJmaN+jLbXk5TSf_2Vw z33f>;FJtAxE^RsHA+!gU|ZXGmdX=iHo>FxT$wNeqs!nCV6CNTSxLr&nh#?pT?u*$ZPE*Be^uk;_y^w0R z81lsS+gqL988~XRDWS5TkgLzsFDb4<(FifR=;tw%twvLb#B%EuNYNN-gtp@BZzbRe z)>&sVJBqo|I<)fZF#%Gbs0Lt7ifEKjAL0JZEF>uqfSMcUFh+{XJ=D=Watg`iH&Eaj zzqqMQF9{IDSobhzBvBwU_dsvEecU)UOoLSJ3}S(sHuOPqdrrSpR^}i41_tlBZ?@yi zYb%!elpu=STv_2#ViV681-#UB8DcpHurVxWnAl8#m{J*gfxGEUvOBNB%EFa`<%hD; z=UjWP6f76ljeOt=%dD-Dz6kO*NW4eak*=};yrfwVPSHm7oXr{b?Hi!tC;5GGUu}U zAH`+&eX|g2-~vVmIAL;Vl)){D%ctFg4hSN+vn0@?OEdi9UV^+Ebky^b(i%L_{SCC$ z0Sbdc`_lj%rztX=plsYDm84`ua8*M)48|ljFdY~3kT~lG;&rw+@O_5Crl*|~zrBfz zngp>C`c3v+iUz1-MowT8$~f=|X#{)BQDA+C3ih>w}sIYsZcEzv+12$?@hEtz*H1OcSpnBQ(eyZ*kUl z*DZdTE4^Q-fs9QE3!8{cVnw5G>6M&G5Q?J;L(zs9n=|Q>26Y}>6#0L_7MxfV`R#vj zVK|yqeZ!!OXo=2+1@|`suaIQ~chD{p40gA7_o5ik8^6(IWP<(}%6iD9SPyAi)iF`v zngfmmZwA1wRj?W8`hv}3ubi`ptRos=t5pV;TYFt3OQn?r*^)1)@dF+6hokUevlq0P z!_KbA<6=A%YSv6~BP6j~9ukbU2`~&Bq~RDtu%PdDUo6;gH~@JT0t7cngE?5RC!D=S zuT@ztD6Q|oX&<-l=1$Rv8Bd4s$w701$}ggj&-CGENEgt$3?QrvqlNs^+uDNGOhR>S zI3Ya`6m?Urjf3#el>&R2b?u2PYer{Hvg(4L%dML*MSf$X=1S)$*r;tBe$rDDHR-!T zYKG}304zIH2|Ve$u`}$gESY>=N|FVgSeVJ?N)<6X=?|I`1GU4lOLH598MKlzeU4Hf z8g1q-O4_I|g>pI`oF)Q;(yNuQ6xkHusOnsYHgQwapL$4{-#xTw*=1)>UWIsP#n(?Z z*Iu?oJdrqf+z9<=k&h|)WdFNgb(v`hATlpJ62)M`sQ?I5ZV+`j0R8PC@S9XNhx8a1 z*yd0y7sG)}k$u8v!cx|VgFFXb4G@Th^FqKBbIjk$yEK^Gf z?&CcbxfYAonVEiZ$a$n~ATPcst37T8qiRCpg>B{+xy!_B3wR2^@ir<3JZ?Qt0X*9@ z-vP+HuF1~eq^$;UPXg-L4?S;igA;^=a4rXKoN~Hw)@+3t&40tEmR^r+OZneEl0}q)a7W zAKfyJ`*L^7z9r`v%byMQM;bJ5tegG4zOJO+&nIagz23Mns2Q5u5}U;st^O@cKX57X zwP)a8`|N(Xd)??8+|T>pwg2J$(e?IGp4X&3^}4IYp1Q!lZW}#u{3!+r9Pc+ad&$D? zb{k5;Ve-Q9`?gy{#(xfuqpEaw*hC@Aoo)BoI-P6U$+_eF+nLV>#|?+>9iyAZVqmt| z+np`;fDg-)2BSvTMU103J3+m=ves#@)>^GVqsOTy zkdH;vq8~!P#Dd;bxIme;KoJyCuoAczed?}f=&YDVMK6>{aWJ|j?$sSfuJZ@9^Bs0R zt4HCig&{r{E+hn|s{%;LAh;~R3++6VUo6zUeumLCq(Np3vm#1(17t~N3{ zIV)&T9#-Vyya1m5yk^4;D9z8nytw5FZV{K=Pm9u|`)LsQ7LGGSXYVGAx(^&mOtd3m z^o~}i6`cxUq^DPB%%%Zj$MR6vX%)`s&4rw;ga6G6e~$1ydt!t)B4MrR{L4y>5xy>a z-`PFvz<;ZPuRSKU-o=RkJS2i961WBI40jRzAH~+klOIi1t`oadT_-K=OSAPaCG{S#oc5^cHWI_LN^yNva#Bq8{IJ*>L$4# zipnH?z2*(y&)(Fd*KK0YqD03A0)*Q8qt{3b9&Uht{GOA)GyLFZj(-1VhW(o{FzkBC zpFMgp#UjbJ9_(Q0YiJMuO{VX}40I|p%GIh~o^MVdE*?sm*;=K#HeadYf3v2KIO;xz z0*J+{_^HO?%fDvGpdCH(BEr54a~h4_w%KUyZZD+0U)Ke({e~+|llLE+;f$SpR(9me z%B%Frb&Os!#3luQRdAn@K_Qvp@TCk&zrugrF}gw87?Z*LMXK^KhGNDs6caxy7j>y@ z#Q%hDirI+8#mY*xiZn*>&Z;AO(Q>1;l&m&ei)(Akm1eD7T|sS{MR;(5zo=H4%gf7a zi`8a=_(J3ZX}8lkRK1H<_fFp3!W{mPq^0WrF#h`9LH|eb*GKx_uO5COyWEFKxb!0J z|Bv|1R_HJP^)mZ^$R_70qv$LY-m$r_7}E+?xrKqNm=II~;ajg3a-bV!O=c-oIPI3c@U&<(Ct=igDo#|L*)=(m(%JwxC##wy~B-@;DtIKiB zNiNCh?8Gkjzjy@46aN_1#!0s0cR+!p+P}<4{?)eKy-cck?08`1&ic3HKel7u^4N|0 zq72vAyfmgq{69fo#Yg-~C8@2pTS;XJ{AA84kO()ui6+)EmwE(o!48eQO!@ zlk1%&lv-}pmsfDeuPvkM@=C6}*yzpl&&?r1sj&YUV1d6!x946D@@Ln6EHcg?C^AxD zIpqvaDjP;d*6uq)x|qMlN)q{{&nJj54?i7+6WBtA=tmK2i;}6jVwkrjG8>(Rz7Eoo zu}$K2EAFfjcisOmt|0A)Pv}R)9P%~7qf;Ky=$SoAKW+s}?HH#~je&hq@5FAo&nE!8 zgEEadXu_WvGPK5H#n2)M-Omax-Or-!i)@SJCm%pgEcL=Q08S<~Y>-WGkD1hDv~)6o zcfuKsTNF>JbYpzrD}x#YN^Qu5MsE_hMk8o4l~e3fepGw{W^W^A*47JVOfnV^B@#dH zIB5fcQ!(Tpgr~rX1&%CZ$k6|1zDqu#%j+{;((ypjnngX1-duQ+I#KBlxQ|yyiv+ag zML|7mNwQ2zG>YzSwxcfk|I#DIC%_vKo|~neE~8l;@bdi&)#W-zi3NDnjW&jQz^tW! z9e&bo{U%%2d;+4ft|_AXl14T@%wVG>*Nb{+H%i?2@u=VKf$<5zK2^9GF}mb=E<~-% zu+zA}{kPY69{x-)r(m+7ArXp8RU~G66K`g`l5fs$Z_VzBYthcm1|yibm@R;mk@?-E zbrz0G(i)LqgG}=toT}-Vt{oWg^4d~Zu<64nmc{jvZHGHfk+ zQt=7UmkUY7a|=9`25Ko`Qrk49KJ_DdL^(~#3K0&P5;XT~6^9{GDkgFm3c1H9O>UUL z2D%ONs%r%Q6Nl(5PI;yC9Oyo}rhrp)UA;!TlKg1yD`y@OR&&x(F}l`o`iP}>aE~b5 zXJiPmN&zP*bax1r^8QG+8RSM0zLZPWjt5ArIJiM*Tfil_=kIOrUWn#t^wta}#uqwd zu2N)Lhef8DK)GkI4vkbe6O}y5j5?IARg@azQ7R+o9O?D6d&K@uq8H`*1F3Xrl_dRx zgwD^*z4h*4zoa`z%ZmL0QZh;mhfVHeKarFuC{2QUhx~J$`o{vnb&@csT^lzg3d~3x zJSuW#l#IhOV#3EeDNIf3w16Nim}lux8beJwT@SAh#4SI>sC9O<5!^_GRihna9W#bl zB~k34k}<#qxrp{uU7nGvLFjHhD@Tc8xADCDy|@i77WY2LOo~zftg=&V{60|WcnNT0vZUNJGar4 zoPzQcs)h7wav;LI=?^c%WFeKM94bP3*Ngp@o>o13Fd6Zu{>Lyi4tM!s{Dh2Glt@Fa zLM2J8B=JJLIZR|Gw9hPIP>2qavMGnUy&dRF&#bF|3OpWW=5&(jsFFZwI-^Tc6-b=3 zl*X0LzO0+n*n^dw9tCsiLo+bAEvRAwojmRrxA8e@{+Ch zNNpWONwV}{Gi50La%>^%Ft_Fx#;(t?pZfJ#JUHvh9G&!YSu1`j`OQn4PC~ddqk)P} zXC!4fb7nU=1GauJc6PDsE*eBM#Q>8Xm_H&P(f%e@9xnu@magCX8g7@52J9 zXwo+8Fk0hCQh|LRZyR%R3#&%o3Y)MX*Fo@K6M~8+Pd+MC<0*sTN$=TG@119UWcs21 z*|(svQNb4!*ocwKT+QlPby=q~XfSiL=!a8CfZXSYBtyP^mKdD;XyOGOrA>-|T8}UP zaMH#+8X<*&>I8%@<1IaT%#&Ika`+QL9YhH-op~og$GG?*L{v=&~*r94)R=A5%S<4q9j(FOL(zI&Z0`n&@Xmpm7*h(yrQ>R z50Wh-GpcwCqmTE9YYhNDSss`8zm+?NF)5J)d`6jSP`*|~N z;C6g6kaGW#*TNo9A7c*?LV1;PMhM#PpQSBfZmPDrd7-a=#SOsoh?y*E;nUO5r5+q*-a@e9R=XM;beECVPAOx3Lr3fN9~Tl=UHd z_z1Y0$AGiBj_nS2jjt?^mGj2hiihPAiwF51y!~cYOyFpfnUp15m`haPRy!idVx(f;>~(NI_VB=+xt- z#p?3%d^Mw>2R-O>G*vGh?WKcW-c4Lp)f!_wfd){HOYst9kLhm5H5$5S73^7neHX!c zQ^ypP9S?O!q3!_c?FtpH`$N#;;E5h;(;=FQJ&T^1)3$v<+rD6f=?tNxf5{~Jc7^)w zfLi8YQnnJw@iK9deWy16PBfQlpfNs>rKsXBOEN!rwZcwLo5>ur|8-D=25D&KN?-ar zpMc-IuF46^@FUvKN6^nnq8Tm2Mzgt_APo?=w?T4U9}M?n3io4xd%p}HdIY%3>C%3o zw*zGH3;#J+y1%!p4^!g&!wUO{0sAq+e&`81rVPy{gEX*{B>3GWNL}c8pV6@e=R3JlXn)JuAM=+>|8pKI zJ^`S3%pQ!@#y0Ep1WQcb=KTOMYYg|c&m@S(!*Xv=F<31OmNw{n-{W7@VgI6GiDW=Y zk~)LU{L5<|<||h7X~pK03GT~6aZt@xT{O1XfPNE4W#8cQaR#>T=M>q`0a-B>amQ;- zA$OimnxN9XG*NDCNKOPsMTs=9hpu&D(B!M63Nz6Cg7)|YTNO4U*E84^=8l720ZOys z2C}HLE)+Rrbz6=G+`k3|2L+lu0pQr@NIjKl#K%^r6KG0gaJQs}j=3ij3jW zcd`?6o8mGfr=WQyFe-jyIWXKYAae;$0;fY9xfY?@{cRojZv)Zy5YeZee8ijgcF1^u zd=hew6MV>|ZySJw!5dXkAA))H+{wZYW9VO0=wAeM;YkAjw$r^Z=)oluX=Ph_>V}SV zq9nF`cbhriQro3lR-k30t$xl+V-D%wY{M{Y3L!PFK(I}JmVRns_vDpZrT4s0YcT9| z@F*5G=C$Tp;z9r@1Y@&C-5wUPcDTW}^!JFXWOcu!h<*u(z9VKHk)DhZ6cljfoGj@S zF})hnFEITG4DBALn4W*65dR1ezlF19>lCX;*il1}^S})${@Pfy@*S3!x{hP}$avt% z0_P7pc0<6$QpfoRoT_n$U)B!4j1Gss!xBJG*P}ue-Wq@_mFhz2aY;X|P8kOv!tcW- z?SHp-4dN3p`Y16fIB$6XNH6Inq?=1E*lxc_W1Wc|$o$B!hdW7X04l|VGJKB_%l+yW zKm+LkFQ9@OuCX14Zsc*4BX9b-D7XcFveJ#0P!wm9>|Y->hpnFQ>54~$O$ z_5^1t;!O`LB2DV-X5Sf~(Ahog>`;=@B=EO+@O%RJlLUVliD?q_vWLzmKv(ex*GDWl zO@c7*A@B(hgcr>TP?JE^JP1AkgsiJeB1iRCJZwGzwkSP{q^U_5-tD3A2~eKoB*d%p z&_dOu?oRsd_=N6cNk!}TVA*OC_y;_AJ^{Qi#}udzC1OqJqI*;i-=hHDdfKx)dWCEw zy0y1O7JNZCOZc;q5fBEmJ(MVW{ZN=nNRLQ)&R8-n4R(GPhd3P*LgkqFuINAR2gfJ$ z-{4e<&C_k|BqaP2F2mJaTq8%X1R-Ric=mMp8)M94~@xKPRXt;?Ah`8mq zdMfaVExmv0-u782>P+xXT;JTPQVaQ;B_+i`<=zjh+=)%G4@5Ko7mshx5U402>N${4-;hm9v-I!R$bvRnSKjw0>h@yqQx`@Qgve(SelHbRB3pm^&$o6rk(68HcJ1 zan?bZbB2RG6xi?kKJ2!~U6~>YJa*ZNZ!~X zu}#+zt{^qm@GfH92lH?aSbUS6=(WJA<=9OgdAa>J+);Xjxs0PoCf^N0$-lnVM0Esw3 z66{=INo;e;%p;X3YukCvA0suP;y9C}Qik>)h2*WvX)`VV@H_ymmP#&WcG$B;ve+~JskU2b3NJ3sP;VSg5uXv~;~p#QhvXf4i3 zc@K-UmvqXLMo%)*I{31BZ?{Q#+O*+RKF7kzmXC?&Nai*S9v1--`7Py`nh%-`D2{Q# za6#_<*CCF&pj65Xy#-E2q3)w^Om?~nbbyVG{fQM*$^eM?y<_s%uzPcV4o}_E=&cO4 zm-IP4;?HIOVRjykcz>N_&UNKV_D9ni^XcBe8PB;lti z)Z5L)rB<`K+)9?~t81OcYRY>8jt_4waD3ppi)*8d4ZPpSbdD^^Q%EL}B2)a2N$Dku zA}8X7W>Nc}sr=d#!+ts1)bIOV97%9=hII~QIm*t9_e925DCOMy%q-;tFskb*?>O0T zdWA4CSNaq8`?CnCW^lY5BzE24GM$ulG*Vy{mu?*9lN_H^_R5^w8j**%z003(_J#sNDjTT1$hhzo`KG$@m>Y3K zp%la%0a6X(p%i?HJ9}@tbym`2Ps9N{2TTR9H+h;BKr`lZ;zx36lAR3axg(1FkoCii zhON%HoG)-^Mo9e|6iGSVdfNHd9&fUZ);Kc@#UL^t6@=xxPUyxs?uxk$8#ct|{|XL{ z{{) z#nb%*8~feaQDJ$lX_}(E*5uFj^&a{B*n6bfY_%4fNo{F0S!}l34LI1X)|Zm{GAeE@ zB`e8Nvz}CvBw4L3!dq`GskGYsxdTtU&dSPKEp?BSagkh;x=3`O&TlRb?9c6*I9~r1 zyJ-49PeMs;xNy(><|l_^lOjT|(H^$qRMelxLXDq0 z?Xrp*W}saRpuwzVf{EaU5RZeIULIeA1vflN^WhJo2x2x2ARM3}r>R1+b66N;`^WlV zdn3v?ooxfbiRZ0`O-VyLs9i&k(q#=T;6a{6)sJW^VNx94=Lm8Id*NSjsO!<&@uc#D zjK0o~z8F>a~e>NM>TWnHs`w21Nf<%Z*i9%2^7iPF5 zU5*)DX5a(z31&D08R2Pc$|Fw&+uwz;e9@YYcF96&_FU9m`Zo{WhXsxS5pkO)q=MLCn#iA zyY7Q%sd+rz>W@#}3?p~=1WRcqt_<_TNR!B!3}}DHf#idIi8q*v(|ein{i;SGG7zP@3$o$aMc1qa}=pLC?xBo-l_m59d6RyR^4wt%@sYWD+ zL_5*MAZFV|A#r5w9bA9{dNa~yj!DRrOOz!3`DyEyw{;oHw6wUpC+ea9;~sB50q=%4 zz;=hotUKS??I8#XK9w%9ys3^ITx2|gvnulH(4!Au1us1Bz39G#9~H#Nl-a9)lkc5R z=>79>F&d)a=^5tUTdvPHVRWJ%1*PYpTMo`x7)--*{S+iJ^2o_dLPCVv-(?00sWEH{ zjqa#SO5YosRg$nluDvNBysD8?mgik>Ao$+olaF{fY zh$+^efTS%Jy;HDz6oFp$p!o#Q*O3ab3ydv}V71IAA`&BinskLbYOMYEevby9fX1z3 z(7?99dTOWge2re8Vh5ZN;YDiinJ?wJ~$#fE-gGx1P@A;MoI_ z#sRuMg-y&kIH1QBXk`*+k^s~tSvF-rm;t12kC83tqpp3_4?=u$KmA+=r%bNvm<~KL z)jv*djFc;KpE;S-9Okk!NlZaH6_gQ_fTDyC^)C|yWw69^0y-ale6@oM?4(BOk)T2vWco*iF_c|1&WBQ<|~lIt^SC0RfUOX zwhQz2h&D9V>1KG^v@~oxHYGu)Kk*Wa?L6i=O-aeZQOlX`P?jH3Vq+{YQ0YDx!1GZ2?|$$xQLK-AR*Wba zK|710wTjQpfMpCnr4cH~)sgDOqnZ)6BehECC0+_fWk1BsPA*WRa1XdcV%>BkvBf0^ z!DajlikKLJy_^W4x5av}NFAq+SMlb`_14>D(&dSt2zMJJAwL8HyZ zWZXo4n9v}M$Igeib^h%HQ0j~sH`iYdY_blqOR{;`-qv>V^MuA4ZNFZPd$ivUZdNO3 zRy(-aVnMUT3C*Zk&rYNLHlbOMNlrd6>`|&u_?sb27JC`B=qj{WSxu_7rIp2%r6w%Et$MRwsV*)x>TQ$+TdsE+ z&1##5VdQgJX)G=+Ru|!jwA$`0wbNckunzbC0R{&pkfYO7B3OqyjAcf=nDFO=?B0k3_ufV zJN5vZ?i^HtUSH@sq1KGTJ;@enN#gkLRmN;~SW1~;VG&_9rbEKOJ?TLP3kQ$D_1}wK zr)mK{0k>|f*^)V<3v%g9uY)Ywja|eRJp}jkDF3#@(c*}3q0lLr=~AE<#klYsNWjUZ=mN~>f39YQvAHL>7|doM zvEwWnw=25c7}Xh16+VF~Ws)<5b8ya?EdU_SGqm5AT#JG1`W4J40J$x; zH>a1ptp&$x#E9l}%DJuPs5}@-v{qa?V)Ulm>FkuZpHju@+WjP>Zt$4GQfryYA zU2BJZtb1^ve?dXt9zfHFBB2fCd5flSY-9}bD&w=9Oyr>bl0vJJUM4M-o_gY5NtX4{ zse2x?m7cMt#GtP;&{-MO_3)QR@>^}MmHYSs@vvoLvfxtnJ zdwjk1DEEo$<2SVr$v=?3eKM<@2G#6EGVVF-R_4{h>8?tjJaWIkah?-97eD1!+>c!67Z zkSKjioL=G~(@9Bo7$AhGJfuM5l8)Mk3K;Pm+~^5rK-Pnz!x8Uym3ZGwREwrvHasGR zT4#0K*~lNAtXtR%1s{MeYT zH8D+(2|G}kg!@%6jVbiDJcaD|ayb2=;`AZdp?&lSLHQw|K#SB?kkDV3z=pABsE;DC zXz`blt{;I(nGsxg!Jz&ZYhvuIsntzYesAS_(XI`Kl zu4S3TRDu~SG5oyE0!TE>+TwQP0RG>+Jp?nhG)$&FaE zhs8-FsJRh*b7b z_TP1Aw@RO)fJTP^lEpm+bdx_FiZpZ%@T=bSIbQ}Fx-j#uhikNlpXD4EG5NN@bmi$6AqtqIx;1)H8I65sQ7l_)L90pv+SO$Br@v9#qmw^Jc)n`EPch!;MJK|JTyI1mLl$rY z+OH^Dkl?G-mfB{D8_pE0k`2`L;~f_vi0mmwXKoZgvD$$}cwogkb;3gFZ=)=9TY)0L z{LEbGEdGD{1=(}<710=4Fe}X9W9l zJH^cZqi-9IZWBLObLh3d*Vp4Xdd`#9uzD}XEUPxTp^0T7;~Ekr^7pO?QdEa(re3Fv*w9QcXhJ9DL3AdV5|OYS(iOp5N5j?Pu(vlNJ6C;J*1z%kp47_g;d zTK7W=it=2otB8(+f=EISf-^oQmayEv9X5i|joG^GlJMWr+Nb>Q|9#|QnkJ~d|FZg? z2Y>RI0OEiC4jw<*+U?hSyHEVR8GhhK2R&$H_{o1%MnPSi*b?F#zjeOokE7FK)6Xg@ z_%_xWjpcR?ML1X6O@skf+l!srYNfJDxAb;%xv{cXSzN2GtS&9DR@#+jr&_HwD{HmI zwaRkJ7abO#>rxh<2$eX(d{h~0<%wF5J3FO=!s#du=l!oULj#|1>fXRh5^8Caj-%$$ ziJDirOI69Jo#O(jB<6J*fgxj-Il5!WTmBy46ELzY%b7N~a@_^y#0vK>Nlg+1Jnx6d zCjb;XPf*Ef-NW%2i_!A~;c_{*QTN_ylBzCoK#i#2Gkw(ekW< z5NiIDOF7C?8kdc2G^ru74CGPoU~yWlBwH%g{07N>kNZBgFVYtuFPVRxg{$@jSlGe&Ac>g0G76a@-b#3wvO`2>oJaYl_<)Mf|9 zECLtd*8c|{0G|Lrwh^S(9hUxvOa-qd9|qv6YPj;c5Vk02<)U2rpYkyI1eg~%YFSIr zdb%>zuC>!gmLGcPF}RzO#K|sXt+QK5q)Z;9*+634F>UTa8(VRvYXoBtZ$nh{P-ASw z*8YOWici4mM~Ky!kw!2;15GsRR2sB#L1x2Tr;BW-vS-s04Anc92r?}Q6~(F{KWlMf zH+~UTV36O&TB4L0&&@A+jQIqNA0fuYBXzbCR*Tx}s&l$qV;j&q5a%}XUy1bC&T;&| z;ydCKI+8@F@gZR}5CP4f3geK82l1~wY(4?@TRDhmHDbod@5F6>-M8Tr+MGNYx4@*e zk{)VdYl>|iP@2Ckf@*3fce=&Uf73(f6QGM#F&Kb@2`Fy$TfP;a(CYmhhlL5jp43eC z&eIN!h2dCANkJ|DEZl~Y_KdGl8WYNxc!Y7szvDaR6FQcx(&5%Dh7fCo{7Dsq{dXQL zp8!^DWNEO)$H#%7zvMyl381e&jZu<`E5ziF{O5ea=kMaJ05uKvQ11oIZnC?J!<$DD zGA<$+8Qo1tFgrwDy%)PF;!%Ft!{!rU%Vp(i0l4IKj9C(0g}W*Ek2rHuTC zMyscLo5&c`*xWHP3Y)|Ju)DxB3edp?NQ|PweZbY|jfORPeOks*H<|xabr5Zi(B79s z>Ww!@cY8CsK&g^r&;CZm%+T=49QOR3Q8dlKWLlzd&s=U5$HMphKg0gd#8tTOeRUl7Ll%GflujZn1hqv(iUZ+*>kmqhSj#Y& zEiv^5V+gQrsq%*%a2H-9ECq5DK9jS;qzwkMQa8|>>GCN#yfdbtiJ$|Re6f(yd70e1 zjB94lOT3b~9|9JQb7#s@?ohU}QY5DK!daYjM|sqOsMrd~;?-*GutpMQ2MZG0KS&Iu zgz};jRzJ&bi@pXPQ@ad)5JJIY5!%v#7t?sWLU=*Jm2jsc(<2gUu0x@_6=mo;3}PyP zzGOmW5K^e{cJa$lQyjvJ2=zi>UU4f=>Dp6bdl>Sq(p(dJ1mEv$Y1(*ZeP7e%0MQK= z?F(K`C{iMUz5**1?v?jQ4!duR&dQ}&)B==!s(hw$MZTPwuWtAHA|r$k-t)slMN4=p z^W4m7td`A{(qg09SV`7uE7e65t6Xg?)fQXrR<*KRSy^tjQ;IM8Jl{=EW@y01 zDB>a~=T|oGRmgbt&wp}fk@;{0r^+!>o!~K$rj?>!36~q z!3|KvikM~V%)XuOj>Pg>57|QP3fn~r3QsTD7IM`3Vva2#^!Mz?Ug5jwkV3h%zipppuO3z&1ry3gCf}35i1t< zYXN9`<;XuC>-2{XXZ!JBz+*8ULycg{FQl%33*UsPGmP8@R?>zK2`v4|`dCnT%;24& zY9z#3xZ->8xf%GWli&O&(H>0M^uU7emdS^l5axaI!Nd%#8=~@Chefw(*-9Ir z5<7fmP--o_n+*iv5m59WB&uX*?*ua0O4=Np&)N-GUKs|U&iZZ7e^`IqjQn@Jb>xSM zdjw#G&_>kEiUB}>_!VIr|E7S#oD!Mb%*;MpIvPN}_+lW4VPNAKWRnNR3ob*P!%S&r znc0nypV0J&@pRgomt#67o(v?ZOqXGhpRU<(U>B~2%(faoAJ&EK*bK?z9h-Tjcbsta zxk;7P#Pv%rR;YOx^OxEAgRnlRP|sa~y2DR6!8wbjyhRumYX-Ct!GS=e_I5JZn%#qQ z-C5`;(czg=OdjY2w4^ z#DUz|q~mCR^p5G;r-|jbq5b|F-U_SnRrn(>yo_EuIEygg&F1!gDp&l)o7Jz5lEiz^ z%n#qaZuB;r?K}^<|6ThZ-XG16|DcFTrBw4;j0;lDP5kS&QR_Io7k3B8B}@GRB9l-C zYnZ%n{J!lLyzG&}SF>6`WCN>W>`BQgDAyS7rVHJYu( z&RQc`tF+-uu)I=fqZZLxqtjYihBLupqq3Hjn?^TIT*8#7-X>oZFH*ekmw_z*KE}U8 zEb06H7Ib{4C9IQSgph2Yz2z?VSBV)HdWj6$T^y&P#_(iv~ULp2N1i# z!##hGP2d=Ll0gNjlMDI;oR4CtOFNmuj}9Hc6mv#xW7KKGR}V_dUGR#O81zXb!F zNLiFXHinz1ni3otfz1xg9L~b69;RroKJtR+DLsybbPubnvvA}A7$lAzbN@Vc%t(1x z>0YwqQeBu1zZ4whA0RYJOEK1y+2)uwiRs^lT8EhWW#{eVoEOWz1q=aY%#*EQLh&H& z!r)+(ReOC7J?x%oZ1q~lNo5$tc6+EFhrVbR>##5mjo&Tk`Wr~Z2bHT7pJ5HL-Z|8- zg=rkdb1XzU3JZPU+ep&02mut1-i6ziDNaX`Io$H$Q2Z;52?vSbz3$eRxPy|WWH?B9 zEWZSn&Qj@A0^L3a@90>P(`I+Ok55=&0lsdq0br@gN9M0-s}}1E!M3NniI}N%Uj4v? z3kBxt$tU_mMH+sfs$GomEFqV#(2wPPJoR9X=E&Tu^>|>VQaM9u@vJrqliDOZ>h0X? z7M$2kaj7Jwb@~{u>z;#%=(a(ak~HS@+R=@oJ{#p;;%R;Kh`J7;@`d9VGF*wXcT{)} ztiF$RC_ya)rm7%4-8>E*3O)skjaxWZXl+6Ekw+>N(eIXd(O9#(Asl zExTFQvx*6a#=8^^3BHpXOkvT#1p& zi3qAX2x=II(|xZzPC+XWA4gILA{;$5qD8eUDWQ})`qid=x za{2y+>T*5fZAVtnY04w0!60E;0UDJPhj>pB*JL96Jv(EV2iuA2Tqygh5WYr3!Me(e z!NK2B_@62~c!02etT#Qp0_6sh+N)rbF(cs2g@|%r#R)^?oAVOX!UHlCYQ$I*N@dwI80SWy=<4yyUAQy*B zmmb$TX%P{%eoa3b#{Xds=$ix2>3nPr5s%DE4OY!WK=xP zm}WN`cz+^9#&`#Rr0}2Ns!$0ec#WwGw{W|07f910LKmI3+#=@QlfY|yXIr5Jo{{+* zV~lPYgAw>-loV03To?J;6{*%?k&@Ig2J6tsqix}#(31q@JSgmu+LRV znMA+osP-mfQ@w7~A@gxX=EG0vjTXEfDXudMIwR`H;Nx!`P;kO^XSDg?Cc6uz$1!KS z=X*SJjGrZAg^LM3CdkY_kh2cU!|hE*urrVki5igm;A{ffFXpK|vUY!09kM^E$lmsV z@JW)B#mOByEFR!`8OJLo2hKv&e_FxaehR39Ihz*V>x`ByC`}w@e_ugeeJ}MW7~BOw z16SGGiV?ZWH>AA0Yi)m4+rC*;1)#^c=HFz^U+C?)Zhu~z-uMK{AcJES?`-f+5Y0T0 z7=h~zf?EYS2JxRMymy}V2O#L{nK4gfcvgxi9i=7zluxr-gLA3GiQ5cAO^r4lUUmWHIE3F-*vpd^ z5F;1-^5Gp>D&XaBGR##?qsOQzRE!D!_uAV@**P}nfhYB!gHGVTbZyDi1LYQc-WcdA z8ll1=#vO~&%uT`{YNsd0bgKHbLv;8S8>zA-qRWHn-u3n;+FQGrpmInn8xk~%6rrh9 zRHf8LZxflGRA1^eej|DwpKmd@oW!d5WckOVD_#CZ|e2)Ydul%=JZ!*H7&R%_;h-xc`A6=%eu};zV z7W79ppOE71H^Wb z2~Fw*r;&A|_HF`E)b=iBOb;Z)NN+<@DML)hVNBBq0^5`yQXvliwEK9^U%%~S&=Pkb z>vx?256?&TWjJtvPmDaR?MoCmlybgwP*9#gd&5acEvO_agpGJhv|$65_n|(_MO)&C zfQ^Qx9%&>AGTkYv*1xoCw)Y;(lf_d7s|~{!a55r!iku(P&K}`KKE_?uu*?`-o{?yH z8#44GoR*o=w~6UsxYyelEJ*OQHo+WxTWRL#%v@=Po&hr?5F148BR{ao9eXcd!9X<@ z7t?pjStat~V8YelcpWh0^utHK%DaC{HHP9USNhP0O0)Ps{3ZKWqO}l8O;Zx5(K&m2 z$C+z+SPsfM37ZE3o;PlG!ArS&ong&w5YYc3zR76TP4n- z=K5w#V`X}TU|OBi;}yRNjb(*;61k%WE-NuH;+72WsOZwIq?*Y}O*M-Y4M$7ICxOJ; z<}NPKfTX8yuL18DYSt*%f~VOMQVo_{vZzC|08!Fjohgr>^0a)wn{J1<*Y=!WL zO7ZJJx=El9-uNj6WGS`JJqD?7=I9UvVFr9XO#C4DU~kyz_>QJK zJh_nNet;eTYJhFjXe0gy+81;R1H9O~!5nyRNoMOV<_eCM?$GEfZdV6WeJ%-ypr4tA zRqGtg`Hii04f*4BDHk>$GNw-c6z-=s|0$OmAM{k`UBrL+i%FVfFO2Yg<`&?K2?zZY zK8Uk+qWi;M&?z{T3x2orw&0bXrKuP3X~!1@rxJfIJ{_hRN@`aVRBlW1$NYW}WSo1r ztZ_I#rWXP&U|0cMd$JIsw{EH6+{Bv&{6E}gJ|rBSFq3Ezub@oBIa%HZpJ_OE0(7!w z`AwMp#P1DW$IQ}s&{W|kPXWRV5mNUvk-KPeFE!AQcoK7Mm4Ea>W#+A zVvT>VuB>%Boz=$b>QbYFH=U*BWO-$+Szl}+NtR! zBZ-WTd)qgk;COU=tm6?~cCI)a(NzQlFLpTU|Md|wobw5W^Owod<)(?UpVLmRsY2+o zIJw+7NtSf@yz}zm)Bhxvv8FiS6DHzo#H-|W@h)|AdtB*uNxez>f1pVSV2tGx2=vli zMnZ;4hWeM*lUwxGUSwnIR@c2ekm`7fHu9ut-){*`jvGToLWVQF+p+re}yU4#r{W-CVsBv|I z`hSv9q%@UP1U_rt9HQMhV+duxAlgAh6xD}Wvn*m>%_01Df;Gf3$y=fw1gi_B70iO* zp2;rv;c+O!F@DI{KgJC|1oFK+<`1JoJ7?4IZ(fQ;!`ZGb%BYgMt<%alC8_w87@8Tg z222)e)yS&=A`1p5lmB@w0CV}6C8Mz?YCF9yY%!P;Z=wmqwUmoss)nXriW`RCqOp5B zhgsAk6z!+zb0`G`340}9r+$e(_ONrd>8O+3y9j{wmis1jn|l>C_x-0V$5G#@-=l`s zZ|Z&MGxc+%Q>L*%m2Da45NTTYCUlx@%udwc5jT`yj|5%sMJQlx{e)BKSS`YE}3K z>0e(d{ie-E`b^8JE?-9NrXrwLtdwT+=#e8nVZBCqTCjkv&v9za{#(EZ^xup>5)0Yx zf8r|q#6P~86p)i5XsLc=kate~cxR4@TDOhsCR39nnDVhUR{1!gS$Se~uPPpYic~HP zMy@ZllUA#`w!GF!I(7VCQt32Tl2)x*M}b;sB$rki)#XaNx?Dw^a;LG>S*_HN$$YW7 zRH;|%jjZBvcafn@xac0ZS5M*1M+)b+RdsL!A_2)JdOOBh}4EYIKwr9tYX69b z$tS=(c`w=HOXFqUzsf`B6QExzck=#6ePAV@0QqpyGW{R$?fHcEhYXMD?|T4z0)UA@ zG5sI&pYsWy9~1}E{|VoMPiQe^_)Guid_z8=;i1A$`v257=M$PAF5aa78Q-2yXn)w~ zlK!uG2z&yBX(LMdzu{Z*2`#6NA?fFeZeK*;$XAhuv;Y0LhP?N8TEDq=^Pdezj~|#w zYP^DV-6ixzID#f!aWOzzO6-FWl|J}EQC4X(6)hn~4OZ-6Rk0bW9t;q!RT0{7ACEkXREwM=Wa*tJN@XWxi{oL|&F!elCqPg9FkgJ}sNk%Q zO6t6H1i5BJaZ)fsPp5*R8Y{Q1jiaF|vc9dQQBw7yM$mX=OAqziMOCA}i%x~vtE0dH z!x-pFt-H|i2C9l6w@}=A4hx8peVywq{s3i-k~8o^%b;BJNe)iN&zKk$sYkgTsHs4lWC;d9PJ3ag(Sg5x>3z5dLe#8kA?*}6&V$0EFQ%mU ziglggE@dd-m=UBdUjvMDA~I{m2&|JITDR}Q9=ZgbyAyt5$1>n(`xV_sGUH)75Oe~H zj=7*x8w2#vLm3x5=Y zFYMj{E__#fKNbP!v0Mnk76S4UhP!a`m+3no>P=8h_Y}^g=sVwMhN5yhsXcZ4icOor zxH1lEA(2d$Nl=0t$$c^YChM5okhF{G{RoCW>|WhG9Oq$x+IT(Sh!(cR3rU_khbDYA zc26hnCB83&?9PXWT)TP!K~}8h%h!aNNd{w0o4*IuZU5tM!XHdY-G43q2u98l zqbxqg-}y9^rSlK@^`uaXKgI`iq53jEWRcnapYrL?k;He{|1&&}-k7Due*Y`{w6ucU#Akt@+{LI1?YVkoNa@wYpTPEY<3()!OP&r2Tz}F^yXTWR!y3tp>zx6#GKA z;4NDlz1CTm75dbpr%LXPrjU{Y6>Xf>fn$Y18H_dxz8VRYF6ibolfXnHnb&5$4Jpa0 zhGo^u#Yv8zvx9Hldhr|pWn9G|tAuQldlw_G$?p*B9v01RB=r?pL-W5w(@i zmYf^ArN1UNrHBG7;FB7@A@-c~6TTcLf&@ZkvOkx~SXOdtCA;%71Y}EoGUprRg9tD7hPa;{~4&`zr>%gayM+A?e)|DY}!VcZTliI_R=%Gdwnb!<0(+cQm0Fvsl*#0|AB!Xj(h^aX34=vlEd^G{+`xWT>0rWVr6ODv}D6Ars z3+|s2pfnUp15h3(l)dxY^9b6eKqpz#q^$R1b$NNdNUtZRbEP2WpLd+DH;ce58Y zy~h|&pn+95M?&-Nb~|1}XBF&OfR#$jyc1G%xG1PQ3UvoiZzr;rqHPLl4z=kJO(p8d zCuEzV?F-uW1sjY{eQRwmYB1lfP`@2e%N&e&A2W-76EloG%6XiyJib$#e(NTv5_cB#_Vlc+X(7L+!k}CFa4cQ_}b$W`uT|V^AYrOlKn)>u+eNHQ9hz* zdA+*@?YcgAd4EjdehhH$m*GbV0n5l22xRe#mQ21Mah_5;c}kprSYiJ#U_VCK4?SVW zl%d&#c82L9p*i=(0W8YQrw_bPLLCWK58eX|xs;? z87e^u7NUR?6Gl>2WDq_atS(Bk1W^5J{+8_}J^|q0Eg;sM?pD$q?vY4DvWpWUL5UY( zlYyd@vfm5-l!BARgy1;DNli}Sd>0Z6HDx3L<|IA_WG=x;@DwIDpHJG|{cRojZv)Zy z5YeZee8lrIJ7hdm)+g}h@B#pB01^goR7Dy!s&sfJ;FIjG|Dr4>*^=Ha-Le8L8*TM-QI#PHjBOZZbd&0umj1SoeyTwx>Iy|G<_Wb1 zNS4!kUQPt@-sD>1Lcq7MnlposW}RV&8(e8DgAgx;?w1tNF9Fea#LOf7KpEUbQ<82s zog%u|f=zB+ACG#4!^7&eif=-`L!04mIsNi7a0U*7kmym8QO}p*(i!|1m*x5lAChYJnmu#5;fFCI1 z?gZIbj=l}Z02d%o;~Hc6+SIK7g_7(qfZ)v!LR{p6G43*rP#9bHue8x$p^nwP=&UW3%+BjGg{BgVPXK!-iB&9}piJG)PO$*ge~pL3C%}0mUde|P zgC=!!#COCebR+@mlck|a@UHUk_yl;uyiYF_O@e)`hs`IzmRR(dZOuq6lYm|Cf$<5z zp5RPHyy;;@q)DCK>^tKVI=hFR9ZFJ~1pYP;o=*UOlHd;`F-?MA_R#qR=qmnXvRF@o zFz+Go2@r%A%?VJGK-4@4J^_TRt4ktB^;s24H!Yt4Ta+F}($pjj@Agpm1Sn5(65`c) zXrXFScPD*!d_s4!q@wkEuxvF6`~x05p8#H%V+vHbxO8hwBVtYHqI*;i-=hHDg5ZO@ zaSsI3D`XqB;(A+T!54(HbWEi%nC;;%Pfh($m`Ys1TBr>73!^>G@8S@b%79|NKHu0y zZk}-L_aFCz;}iOCaH^1-ABh5;+^Nu`d)+hV&Lj@sB{^*d5+>bDz*LeE(<2?4B$gmi zq)=un)%#;8ovzD`Pw2gh(PQWk1f*_>dSJCSkU3te3kIsdzA2H4@mNlIXnX>+n>;k? ze(}EsxM=83WJGbxZ}n8*6I-6Npq0Jtv*6xMHp#VY`IdY_%ZEunO-2yt5>;*C5T+z= zjA7UJ!zc8!#C{OR%2{FxK`#p^bW!oMFX6xoq^bU7n+zI*~0QNE=4LD4L(qBf}4E1KZquqQ_*_Y-V7J*aZi zg1JZZ!-}Y!q(O+Gvm#t5QB0Ei15EoVXHRtG<4)qm5UbTZ3P=xq`1m?zou4z zBIA$3qpT9@=Xj9$7wH3MGFb^W78d4~%04{PAQHMYi*j{bDJW^EpNoqNBxLLc+YI_* z&|pE@0L6`h_E>jGGjr>Jb$y{OMJL$g=?e^2V)13OYk_`Lk`EY0w`ik13L#gIH$Gv~ zAAEr6k-48xSC5iAXv0M({&T6F;ZBP!eCwuWj6$LRr0;}J=tPVW=s>7ba8vReinq&m z_yxr$04S5BRuB!O;d{C64x0#V{Cukcf%)iBOIx9Lks^)?PBy+UP-Rn zMC_O5;!wZiZPM@7Q`x#v(GXJjU@!aOdw3*{4n!$0fs@CfIUx4Rj|daPzMf3^BGSWDUQ zYAmw`Fena@yRSp$Cl#4TiesmJpN0%B261sALeba_3-R@h$k2Zr;a$4-`GigR$3|R( zsKawx-}g6pjHRbt=|-kub>vd=aW>=99_o%0UmBwuqSe5G$G(bgB7R0EVmDsXR%G5SJgkPZm;hM}ZrX+5WODsd zDJMNS9^A50_ZnC;#BIUOjtGZX1Q^{i22XRBbh!Q_#r27&2Fbj5zuJ47j5OksnPM{5 zGJEmDVL@(PI9Ez@V~Yq=0lTA2tP?V$wUlkeFA+)YTGIBr#4c$9rS74LE9v~HwS@z2KU&axkn>qg-MmI zp?1Urjz{OAwvDuW+-(MhC#<@3MH_5%qjXzFRj!wO#u<159s0%*1{yJQs zpn#Mze;PXd|H8dNE@Nu5dYudF(tvVZI*#O+IESa=e{ue=>*wp%*w$7$Bp5-rXVoS4 z;-Fh&s$^^gE(8~#)e@Yn<9Xm>REbi7-`gaM`@gE%o zP44q7DEU#~=xcSsN2C}dX1(5ur7sZ<3uYa88s*kShD@qzhfq`NcE;W9w=DK1BO1p4QAO zzrr%Vdx~Moj{J+FiLv48Eta7^C&oU=yo%z& zZ0ZDr>_9PtgXw}*}uDSnj@W)hvaV6Fn zniLp!k@0L3!_Z{n^QS@bEUxW@5Oi?-Vj+}A7c&x#Z~J}D zL}BL8wUuhS)o!&qtE-JW!q@T5WZj zi>*q#vQk;8wX^YUqnRldSL0dKx{AIlTt4`y|A)YvfBy&m9RbnKYx^w_bx@Q-`x!Z|p0%oJX|EjYeNji^{1Ne2&P%}Fp!{C(^g zJQJceF!v&ot%XDt8z{dS#c38kqG1CUvHnVKoJq7$e)7h4a~J z#0rAX4lR6;j~vorRR4c_-vTVjRh}nfJy!dYR`0iVS6X)T*ip}P&vZ9p^+XavLK0dD z0m^E&U$gff?Y%4CxmVI62@4xa0!FbhBe2227?lYD%4HdxiW446C=wE<40b32jsprN z#xX7|8$*$@6Y@XKIsKTP>7Lh}>y%Wgy*=Hh&pG{{|9t;{{{KJ!0Vm+%qsqv9i2Eu# z3B=QVJ5=3#hmO`Y_Tj4PVcfBZ+xxgO4D$j176gxyiv&;I>TXgpN18W&fKUfPBd_sb zw-j!Az>sbHAT>?YW=}S{;(Cr7f|Y8*l#Fxf{o2=iNh=C z#saVzgjFo>gx%pV-muFrS`L&m@y6?4f7kW5-g1XF>L?mPccEX3xRtbf3<84H%t0d% zA#u{)D}JIofmhIpa9Ag9zWvVobcNIDz_00p(C`X7a7VsxO3hk0#H~&Ku+BqKK#?Iy z>!)Him=8FPQuEToAVDuV3}4u$h5@gj0~ZYF00Lw3#Y?oi5wGCI_As{}!RnOVed7Dt zn2T4?h5J%o9Han;kR~7ze5$LDpj(wp#)_)!MnK^K`G+CE8khzCry?+=lAryOZWFJd z%{TV7iR%IgZi*!*Snh8@e1nMaSyDFkU8>7 zzwCfOnTRk7X%}YbfWVO2dvLDOS@+TbL7bWePze9oF;S8l-Q*?&3;Yu-g$@#?X zkKRK8H*t`e)R_<_lz>v(5fhUi6^hQ$08cX2zF*Ld)RaL5lAsX|*QEG2e8gJ?rBard zg5A^8-K5wN*~<#|@(A}*h5c~cW=1G`=p>Kfsbmi!!VeB%hs9|efEkDNbk9*eW1Ryr zrA3>_WcT)Q_joTjDu0L@9I29s0nDLg^7AiJjqoVNjez}hs=AXs)!fO9BYPUt^)~M0 zmE1{;pv%N|sSd&b^2KgoyQ327;=x&FoPWXKo@sl!2BQlH1~tT-k2O?b1F`ZdXR^LaWITPa1EjcPF@w;UYQS zmld=Q+?(#fBKLq(RB-q(&qC+{qep_-$LZ1>J^#FASCh7&FjHYHP(aqF}RG8{Iku$Q0RGnn%;<#c(X-NJ9>Pik7ii+lZX3i_A56ygF zC!2D%|9wpx5Eb;aQ{_US5A08nNq>!cs$axat9(;2VTNDwE6Nn2gq&>3<|dR)B|FP> z!w~tlTItVv+ge>&TMjDVLWB(T@!@hhUp&nU98**ch*y-35VI5cT;iX3p1rY7R%W;oj>rrMCRy5En#n$jNfAexVAEU? z03Ef*r!r>l#jnOMfOt$a2EWpUlzvQVbfRGDeu4;m0Dwv)CNn)p%NV8>B3g7XJ$+~Y z{kzpTw$?ge!A!^mu;Ah@4?LMQQ${|3#FvTl1n^6wva8hcL^m@}(%&W@GLh1BP>+)2 z=*xzW9#L#Q&h8qk#d~L9HJq`g1uzGg2UwOEIoJ#d#7j=Hgld@> z!vQ5U$PTCn22?7E!|IAl>H3o6j6;n7C4A=zu}iO{f*eRl!wDjl<^46|GB`$|@94-J z`7ywGT@fc?9N{H!ShwiHRh(RPH-;8|8+PrKav%TJjNHdt$!5F+Nh3i@^-8%n(R+-( z?>_IbnXKz7_)!phs9eXdlCI;iUayquGy933f)z%-pE$JZZPT%Qw`sOrr{1(`bvtZC zhFOd1k!g5=8F+0!upHlSLsC@N@*Tqu9kXdiHQ(^+eSYFm6Sbln_(#AD2{-V<6$|Lj z66n5S57Jy6S$*5P=HbZd+x)fOjx5|-#e*R?S*^Dt3-?5E2juRkvW_g=wZ<>X{cG#* z$ihuy+y%LPY)lUiZs6j2v_653v0IRog z>xuWnqU>Gb8Hj8EZKS&u5@$o8AM9IrYZUf|owaFy?>E*cau{A?lmBPnWKuHu%V@x? zF*5IP#|Pzxt@w;VJR%Zo$`mu$f{4M?Ayc#h#(%Qs;+3;+CbpE9v21d5QHuTU`3=l1NJYZ)tJ4k{}M*DJUF^sSj?K*ervGVrI*d zQJ01tin56U_M4%=UBevv5Sue7el*E2l_kv2g9oG?kpZ_$5o};p@uY0z*u!aMmQXg6 z!AG+Y!crz66h>LvdDu1+8_0O~0Fvi2FuCsq+sVq(&c}IE0h~M~k7kqI2ICZlz0zrG z(psjCG{6_|^4?_Qd*Sd)stxk2V9M;u-koS&Z$WP!hp&oR?dx(EHhZF_K( zEG908EH)TMh$-t9JWRHL$wkRid@BbgcQ8~As1hgsMPr2AzAulAP&AB|L(H-R#GyOT z3dys?aADqcbk-(=g(FNX%f1Fx5!Mpq36aK~7@)GgVMrS)v!v&ykm&TTCh$fl zI_+|0tYm5?&m>IS@9-Q{FyO&3;bh{FcO6|#F_8NZI&`S~K8+gtz_qhkqUGhAsmUy~ z4!8Ox4SsZvlD8(_&C)`2;qTK6JH-wRue|;sg(!)O(aN_@roO@*3TWrU?Ja$FK4Xxf zPQgiXpNul{*@J|v+@C!7-AeIh3O4VZd%+;{p5-^|K{KpbrWu%?ZAT3&w5`B$>kU7I zO(BiYY`2?D%l0GFGun=8hNj)L>aZiEZaR&$c@Hdgbh?ozu7Tl#k#k)7k8K%USbksXutxw4Lf6{H@)&IvK=OY*-Z-|PSNTK5=c z;?*u9URqT3p~@|Y#D~KHz+1oMWAbB+#5mf9pGVe~mOHJ^>S3MDBi`GoV(}nmqt(hR zR;o3>UUM3uUvJ<_oR*y3=TbgT?9lLbE0u#fFKo|CK3a}lad*M(5 z^|~i=x3F{<%shEi>>Y$>TM|U;bx+Aqtrv+?LBMyL@M(~dsRaSOD-nhb!`Q4G!*~Vo znCFef-pi=(Yu%G^h1!7}hTvH}SB64w zjl-KO90H|epCy&-1Y44&3IeR(hRU%C1Q173YI65@*mxWD$SuBb#Tt&AaEWE$;&XVK zXI9T$xb}&jcrO%zKktJ-Pj^y=u(*-V!t=LW|BbcBKDYJ#|E9YQcZ=eQxSXgG*cQ&= zg0lt_U2SPJ>#cR)gWNO~h~&@{^1ny}fB&6a&~$9usvAMw-7uhOntr`qH^RV;yqf8` zmRB=8IG@#YOg{?RCWEGU3yd(}%0i_GDaAo9ITR(&$RpQaxV*M3T=rF~a8rcPt1^Ho z7Lb(};U5ii4{RA1=89+wFejFvseWV=4`DYR#(y5ce;&nuj^RHDJmN8RH5vpR8IB19 zAgGV1{Xuzo8UlgRGtkiyK&gme5|qS~SZzgo6v;pU^w01rPS@}Y>SrJPd=&#?#)2Pg zLc`CtU%5rR2X1utNckcn2SLi`@v01@d~$3^!6srz`O6wZ%0xR>frg|Cz{bx{9X7}T4!bwh-yF(U z?S|28x{W9>HVk|?R#kT7^CV~+)PU>$CQxlx*fH^qAilvB188~^RhLc@o;pEVnctmf?8s` zzGWJ)$TDh8yY1FzqLpk<6KXKDxMiUwQQY_ntK_tY8x{tQ`I>!^*{Zu#%t>Knf(Lo{}X*`f=o+94M~_A($M3 zx^HeAkGJ3S9n-Bjj%h}Y1z6%ZP0zDxjap7ng)D)VQedE z5f#@PKHfN%R#M2o1R4iM1C1imWI$sXuIfEVwY z8eXv3Db8ddonna_c^G0Cz6}=Dz~4Y?oWN?@uFS$O~M6L|hyh~%v zJIZ3sbz|FJu?dYer=D>dW6h;`Sd*m}pw6v?Iw~Ap#^ynO+!iK(q2N3941$n2yMBBD zi6!X`1xJTrVU!m4lNfzde# zRXrIa2vxlrv%j7YdE&I;g5S?_oOXM|m<(OJ?l$3skhU8%0xN9zP6QFCe#3Se&00`z z&P1GUNl7Wl;+IR2{bHrn1y3*m&cZ)7>QC9wj|f~!9dlhHR`Y--f}ih6scj@e!J$tPW@(R!6rrz;yVJ@X@-Gq z*Xy=16ESv@q|jg~HrDi;M2O|h%5p-ih=OwvVs}rUcL@xx$OD5S5mrQ>3{qUDk>YB+ zniW#82*V~~5%&B}UX~4miaYb5A|DPDX>MAn>#*968g@Nsv}=B>&(1=g{Rnbju{y8sNEYGaNW)H9F!g>z!)wqqi zX*Ar~m@BuZh&IIWH_7asL@MS@>T*)Ch@NwhiX#O%swt7?BUKDUy*z z)XG51;~H8X!K+z83(H7sLd(eW8uzk{EP*XIl^2yVrJ?)-3qC)z?RGnGyhO0#ECl2h zEg*{`bu>e8Cr6TvU(VS%z5brO0jstw?TL$@&g0?%uE1;s8D{-}W>&f?!>pSok%RBu z$8wN{mgHbE6ecr_AOf$=V^f(01v4mQ-r&5O)ew@MxsGqttXPA4opMF<+XaqjC@izO zsN@~{cVnWBz7^MrT%Gn&)8{R`zM-f7hhWRYKDJ5qxqMvX2rjp>EL;2EC$VBQ>HT1yh0xbuZP?i>!%JYt=nJJMU&E2JOu zE1Ey)YF7NIq9M-v`u-7^lH-yUgif-)$V!?1RfTDK7DO9(^#ml(I}=yC*=WL1Hjx1d z3jC()IZfBKZL<-zeaQMy>%;nj^jkViX;|v5lO?H!MG}rFHYQn1? zj1-!z*uPcC!@cO)rKgXh{~$x`f6D`iqNPL;u`<%_C5;~6$E#VP2QMYCiCDV*_#iJO zhO1{ItRgtAvpnV!7HCz=Zn$9+Vt1WbNt=Oa6DN+oir~JEw2Js28zLTXfPl)DGlqmhWV)%QPpPoJe>(55zF&t9ba!bt zPv%=R$%$7T=2d(JV){OefA)0u6uv9Dv3nXvA6zBdP?7AnXzrw|GTfP)AHN`Ps9L-2 ze146k8VxQrd-Cw0 zNOl#GN6D^RvGR&o)aVf6)vVBgWfwM~W!KI>HCc8IhKJXt;GrJ~L|^RS8Mb*+qgGz8M-pmJZ3v+jhd~VeGG&ke1sYGJSwptlEz&YB4udFJ zRfdV*p_!Pj$}sVPQ^${C-*w$5S;WQeAGJGiX#YXr{ceh*M~00&)`8`3YBf$ckCREOLUUSRm`AarYHyY7aT z+n!B+xul`=nLJF2-2yB5Ov77a+8RByJ!rZp2I?OBR+oB)rM8bFA_ zLU-5(w*H}26L}Izn>WA9Nm{3XqH~b6{_J_1VCAcMuu>#3i|CcXnE$CU=0&_JfidDg zLcving(W67p(W<-6Mlsy=1@?%Aq6V^kc#?dhqnWz#Utzk3XITg8Z(an|L3rhV)2N= zxBm<)K50wOD(bJAQKf9SPvKH+?xHbvDW*RqhxEj|e*;6^x6sY8y$>8e8G$41G{@}( zDwA)Lu1c_JcYC^{V~fGv58TXRkVcxs;F)rxTc(Az?n;VVM}~<(#ON1&aP%wKbzxIk zLiwAs=!3AEAc8|+Jj-jtK5fG_ny^vZZANfjZOv)UCV}y3NV2kGZ}bT|iO9>Fx8+1$ z5hdp!@=9kTNl%F!bm-${f{Sf1zx&{#NYoY4DI@B3YYe#%uS#HuI1vhtC+e_?SkyiC zb{2I5f#d2FaP*5gwtRJBV^_5a$2(iK$ZpKoNf}#rYh~n{?C3}m?qe85GIt4gNeQYG zuU27b`*?M4iMKQSxF5NYWEx$S;m41kGde#i&*bi}eLK}LpHQKz`Qt#$d21eX?ixOR zX;tgZnl0&SR&2?^_-};9G)(S!@YTej5XVkx))4lzQ|vi-?lFTJc0GdASPXk+NexxM z>B!w_@?k1V)98FS<=}hb!ix*YO?(*T@!=4NO@-Y{rGHg(B3;dj6BR)2`Jk(Yv55U1 zOtIg{dcJ~B{+qYYvFgJSg`o{+fS56+&RM~4J8jsI6`G!BH~nVa_Z`U0WHbWX3|-f( z&nN@9rqN(?);RNR63squ8kW=Si%2*J&Hlg)xR(&%$vgxoQt68blu@Cc)d=y+cr`18 zU@Z-sh-K9uyt`0H4T#@>9qI9oM^0$vt*)*t`fy_R(PbUZRdqsGHlrCU5xq4F2TvS^ zIPCD_;k_P7-~Y~r2;kU?nE_UoqHxh$g%j@Mc#h#;s>g?z{5OFo`qlz*JV(i@Bv*Ik z;Wk$#dxk$0yQrAP=aJcI?u*#2iGh}7Tv=udg&5XUsCvxpO&Ye~u^cp26akB%iN zhgYkIpwE_2Z8j`8>ITwYY#h6o2OF5d7vu+!%Mkwa8jzlgi1s_ zPCnTuk)e4QP)>#x(Q^(mGy^52vtW$N<^(;T&x4*K`C3FgC0{>{l~=^qG|>DZUd;+< z7|XB;EnoNk`ev4|rIF@SlOv7xqmosb_YZUu*5#Z?u~CA~s%GRFkhj#^K*{MMt7({l z3;F)7z=mUeAgaW!!6}m-Kvct<(e~M**s$(Mp=J@g-)R@ld zS-4{1RZsK^Hjyw6ViPeA{=*+L4qhg0wZ-%Wt?T9#7HWG<>Rq|8Rw$>}*;VkHw_)R> z*PLy(3K4r2UR`$Tru(esY$-STr%(Z&yOSZKDZ~!(QbR-he*CT+evc#9N>!9$?=zrE z<~_P9Bj*3@1nY^)k+<=BA`T$moyXnj(FV4DIK|duAyT@|*q_$Fl&~Nha@erjP9lJ0 z&K5Y!@*0iEXc`7M+Tr}preoE8BMPGk4nuD@f|)EOk|E%yaC(u}N_50SV?|HO-U%o0 zBtkcDUY8TPMbwzifjz|r{@K&D$EZzmwBBW`c;wg;B#NqtH)sy0s}daEJ$K*$jUB31{qQ?juo8!m z6Kkgwtb-d{>%Kn4^;%mT_(~q%I}WTJO#|Z6Vt>^vjMX#d{gk_PWAJ`stN|hJZ{=~n zJ63%P(GOsi6|t=OovupoyLc14GU|dzxn`@M|HwFu&HL-sR4pq^HQ&?miXC|fWsdC! zoU~yr^4d)^5mzv0714-HBeZM_^+DH%B+G{9nSlv?v^>a%KAR}aO?(jLup}|V_Sa_! zuH@4sTH($du~kkhEF$3gYK0{IO7E}F5OOf*5<0v!4;_j$zasKvaN?IVPP`kh%HYI) z9J;X#C)kA6{Hia$hBZI6zdl18SWX^I$-R-`L1}*pJunX>AgzT7DGIIT#@R~jn!aPX zo^82i+pr^u->dr#$G0uW$I)!gC=>e@MK4g32gh;@+nS_DP}S6#22@-;HdGXmaSl*% z-;B7J0OLdB07em!GJx?r8ZbUt7BH?J8!)g54H#G5@MQ)JwI8XU-2gL|Cc}(}R*r^i z0W2NmMQ-d@8;)+Tw|zGm+C68r0&>kk*2|_FHQG(95yJ5eKKu?F5Dn&<#*B{Q+Z+>V zFklQl#z?K)71^hO7vDUie??qQwJ0Lu9Pr}ak?}&2au^2_T6}gKv?wA`1}*+bqs4zN zi5A@*dRnV58F{(Qb|!2w29Mve89emCMp@Pa?BK&ZW&72UDbGswk;Uamtx51Y7eVTf zWGjRW$ZldaK4%0m;JgXXjG7Rd6XE&taAdXNhHl#p0aAQxHeoQ^Vww%rIvQo{XmMRr z(L269HjWgLat=6h{|vdA(Bxa=ph*#-GHCKcjV3=Ri6-JlIEZ5{RTAI9<5FnpY! zHP;Es(Tt1I4e#|zMN(`hAsV5(P0RrE-;2Pyhh|S;Lxd!V+^svn%9O*5vJ+*U!46I0n z>L{e5HB$nvSi#B}vMMf5>JS%eZ=5Z7rWe&B%Y=9z%kmp;5JX@rf<%y@54CG;V>aof zN_cl}DFakP$6*>!wfFRKb)h1<&L654Muw`Pe2o_2(Fe_GNKsD9r$g{#6o*S_?;yEOu5G0|$c-TCKJeOI}>f|1lnER>z=I=Cu9f(PX>@s1vuVO0^mxG8YPZ1dLD1O6_-9YINKY#wtiRjoRjp)srZem1tOCb7yZme~mTMt;5>UtvMKyqC(Kq)pN-)h>H z>2I8UJyBQ#SCwOf39^POd9&d|zN&f{T2|W*n%->Sn5ai?(IV~l&M{H6e|)Bapu5i< z7eR~YJO>1QbQ%cSPv_!!K*;wy2u`DFxuamPK;>xlRM4E_}_ZswnV&OgtCt-kp5u2<00 zXbb;*iho{p694=U{PUyo=b@ja!q1<~PhW97{rvZ`Dw}_<$c9$d*M+U&yMqQiBzNK?zU?TGHUpZ(o3a)&zf< z;6feo1zEVlr4C%krMT1bX-8D(3o8QSrJ$~tWL-=L`LrWGBumMLcgVV!Jo0Hr+)jkA z2n_3ny3i*9f4(BC`J^KJADHh^Q4I3G$3A#T+1?b_AZz4V)w}eHhe*N5H|Kryd@?p#^{NI2rr`{;rBFEKoSW(?13+8~)&tlJEyllEbo0 z`HDCNmh^DD3LEX=52nn7KN0_VlK!m8*7RuMu4^cSyCtzE{^p9nH0N-8n|z6T3Z3B| z%W-;9KINYkfyafwOPJmt>tb4HqW>n97N3_d;U**`0`6pkmvBoDzH|{YBtPv4=Ff`Y z-(ov|AO`GWVV*Ynshp9LRJaWQ3-O%S69P@Zc$;}z-{yI`re-w;`62f3Z9Uolh{=yZ zJ6H$L#EP1?=!3`GJdG=|^8(#tcpJ@I@TF*l!K&rA@ZF9YJN1)4q9SCADA2GDTxCHW zsM%v3@+sf#DDF@{c~%Rawi5ItxJcL%j7t(r1S6hc%n+&hmu6{^nhhc~pN7qRk(#Dy zHcn4~G&807aTtS(6q|_`ndwqoo@P10d?J{q1P{F65f(h6as&mljvPQa211TZ_XG$W zjmQ#0B2|h~DMF>_lp<4#N+}|xXjCGRWuFv*QuIlYCq8MQ3>y{Sp*t+k1j;XQ+$C6#6lK_3@uyUVrI|qKB~G9+Qjp=Nh;LCD zmSv<%h%Hox<=4V#;%iiZ<(EKtB~GORQgk69#EVphrI$cyCC;QWQg9)8#CNF-%P!JV z#CcRkiY=tM_&Swg$t6%yiHoU>6k0eE;!mgy%Po>cqC#b)SVB6BA5a;VOaf((xQfb1 zF@!3M_;V`5l88i(Xiym`eQ=<}OH_shkU&WzuBI|l=-|+bzoIfMcSz3>H&7WVWRMHQ zUs4&CGXe#QcrBHYvIQAN`~{U^@j?Pb+(~7WEWs}pyWti|QE>%cVedr^udt88#w+ZJ zxCXBf!^I+8#X^QE*@X{LaEbfrp_F0Rw73oKfRH0mQQ^AwV{sHB!l&X=@=@{EQE??h zkl^BST|A)TQmW#|i`P(bB|T7Fh=;H^N(!-pS11+4!}Ow*CQ6DR=ZLeh3_`ScHB-gb$Gk#c6njvO_$ES12yT+vo+UMB@AtKO~APS%T9|`~+^1ZX_mf1Zj-Ti>%wjv;k&=%F@PE@=QV0?+oK9t=JR}ailJ2l- z%9Cjy-I0nPaq3NUhjl>G{lv|5N6Jo`WY^LiRw{X_Tt|1LM5QU|&>dD*d6K$xM{3wK zA1|RhQrV_Em(m@nchj9cbca=NQoY41>5i1i1O#=u!&)>$gGqO!!b#(GH{D^~lTqdX z-H{3`P3qg}4(qa{!iv|^9jPMXY!_|1!`dRL{^Bs*k-8@Wh-lFrRznF=#38yPRa|1! zH_{!c?b4n5=uX74pYFVg?mU^e^JcmuwFQDXL3da`W#D^|?noVi;47p%Qk@|D`zLgV z^=C%JgLFsgwFp#ViSDq9ORB6`raMygpc!?H?no_!rsOK!kqQZ-hSnqU2Y%YGx^ diff --git a/docs/index.html b/docs/index.html index fa8b08b..56291a2 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 1819a6a..0b82ce6 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.0", "generated_at": "2022-01-05T19:18:09.655354Z", "invocation_id": "88cce84c-013a-43d2-9d78-733fb6117f26", "env": {}, "project_id": "da210340452cd4ff359d129e821085fc", "user_id": "3ba29a2e-e6c1-4d02-90b0-62926a040844", "send_anonymous_usage_stats": true, "adapter_type": "bigquery"}, "nodes": {"model.shopify_source.stg_shopify__order_line": {"raw_sql": "with source as (\n\n select * from {{ ref('stg_shopify__order_line_tmp') }}\n\n),\n\nrenamed as (\n\n select\n \n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_shopify__order_line_tmp')),\n staging_columns=get_order_line_columns()\n )\n }}\n\n --The below script allows for pass through columns.\n {% if var('order_line_pass_through_columns') %}\n ,\n {{ var('order_line_pass_through_columns') | join (\", \")}}\n\n {% endif %}\n\n {{ fivetran_utils.source_relation(\n union_schema_variable='shopify_union_schemas', \n union_database_variable='shopify_union_databases') \n }}\n\n from source\n\n)\n\nselect * from renamed", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.shopify_source.get_order_line_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.source_relation"], "nodes": ["model.shopify_source.stg_shopify__order_line_tmp", "model.shopify_source.stg_shopify__order_line_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify_combo", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_transformations", "fqn": ["shopify_source", "stg_shopify__order_line"], "unique_id": "model.shopify_source.stg_shopify__order_line", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify_source", "path": "stg_shopify__order_line.sql", "original_file_path": "models/stg_shopify__order_line.sql", "name": "stg_shopify__order_line", "alias": "stg_shopify__order_line", "checksum": {"name": "sha256", "checksum": "bb641f0d784534dc9d6d86bda3391b7c905b0a739c6cf34ef60e4716b5fd86ce"}, "tags": [], "refs": [["stg_shopify__order_line_tmp"], ["stg_shopify__order_line_tmp"]], "sources": [], "description": "Each record represents a line item from an order in Shopify.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "fulfillable_quantity": {"name": "fulfillable_quantity", "description": "The amount available to fulfill, calculated as follows: quantity - max(refunded_quantity, fulfilled_quantity) - pending_fulfilled_quantity - open_fulfilled_quantity", "meta": {}, "data_type": null, "quote": null, "tags": []}, "fulfillment_service": {"name": "fulfillment_service", "description": "The service provider that's fulfilling the item.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "fulfillment_status": {"name": "fulfillment_status", "description": "How far along an order is in terms line items fulfilled.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_gift_card": {"name": "is_gift_card", "description": "Whether the item is a gift card. If true, then the item is not taxed or considered for shipping charges.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "grams": {"name": "grams", "description": "The weight of the item in grams.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_line_id": {"name": "order_line_id", "description": "The ID of the line item.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "name": {"name": "name", "description": "The name of the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_id": {"name": "order_id", "description": "The ID of the related order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "price": {"name": "price", "description": "The price of the item before discounts have been applied in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "product_id": {"name": "product_id", "description": "The ID of the product that the line item belongs to. Can be null if the original product associated with the order is deleted at a later date.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "quantity": {"name": "quantity", "description": "The number of items that were purchased.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_requiring_shipping": {"name": "is_requiring_shipping", "description": "Whether the item requires shipping.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "sku": {"name": "sku", "description": "The item's SKU (stock keeping unit).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_taxable": {"name": "is_taxable", "description": "Whether the item was taxable.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "title": {"name": "title", "description": "The title of the product.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_discount": {"name": "total_discount", "description": "The total amount of the discount allocated to the line item in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_id": {"name": "variant_id", "description": "The ID of the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "vendor": {"name": "vendor", "description": "The name of the item's supplier.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify_source://models/stg_shopify.yml", "compiled_path": "target/compiled/shopify_source/models/stg_shopify__order_line.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify_combo", "materialized": "table"}, "created_at": 1641410292.125897, "compiled_sql": "with source as (\n\n select * from `dbt-package-testing`.`dbt_transformations`.`stg_shopify__order_line_tmp`\n\n),\n\nrenamed as (\n\n select\n \n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n fulfillable_quantity\n \n as \n \n fulfillable_quantity\n \n, \n \n \n fulfillment_service\n \n as \n \n fulfillment_service\n \n, \n \n \n fulfillment_status\n \n as \n \n fulfillment_status\n \n, \n \n \n gift_card\n \n as is_gift_card , \n \n \n grams\n \n as \n \n grams\n \n, \n \n \n id\n \n as order_line_id , \n \n \n index\n \n as \n \n index\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n order_id\n \n as \n \n order_id\n \n, \n \n \n pre_tax_price\n \n as \n \n pre_tax_price\n \n, \n \n \n price\n \n as \n \n price\n \n, \n \n \n product_id\n \n as \n \n product_id\n \n, \n cast(null as \n numeric\n) as \n \n property_charge_interval_frequency\n \n , \n cast(null as \n string\n) as \n \n property_for_shipping_jan_3_rd_2020\n \n , \n cast(null as \n numeric\n) as \n \n property_shipping_interval_frequency\n \n , \n cast(null as \n string\n) as \n \n property_shipping_interval_unit_type\n \n , \n cast(null as \n numeric\n) as \n \n property_subscription_id\n \n , \n \n \n quantity\n \n as \n \n quantity\n \n, \n \n \n requires_shipping\n \n as is_requiring_shipping , \n \n \n sku\n \n as \n \n sku\n \n, \n \n \n taxable\n \n as is_taxable , \n \n \n title\n \n as \n \n title\n \n, \n \n \n total_discount\n \n as \n \n total_discount\n \n, \n \n \n variant_id\n \n as \n \n variant_id\n \n, \n \n \n vendor\n \n as \n \n vendor\n \n\n\n\n\n --The below script allows for pass through columns.\n \n\n \n\n\n, cast('' as \n string\n) as source_relation\n\n\n\n\n from source\n\n)\n\nselect * from renamed", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_transformations`.`stg_shopify__order_line`"}, "model.shopify_source.stg_shopify__refund": {"raw_sql": "--To disable this model, set the shopify__using_refund variable within your dbt_project.yml file to False.\n{{ config(enabled=var('shopify__using_refund', True)) }}\n\nwith source as (\n\n select * \n from {{ ref('stg_shopify__refund_tmp') }}\n\n),\n\nrenamed as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_shopify__refund_tmp')),\n staging_columns=get_refund_columns()\n )\n }}\n\n {{ fivetran_utils.source_relation(\n union_schema_variable='shopify_union_schemas', \n union_database_variable='shopify_union_databases') \n }}\n \n from source\n)\n\nselect * from renamed", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.shopify_source.get_refund_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.source_relation"], "nodes": ["model.shopify_source.stg_shopify__refund_tmp", "model.shopify_source.stg_shopify__refund_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify_combo", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_transformations", "fqn": ["shopify_source", "stg_shopify__refund"], "unique_id": "model.shopify_source.stg_shopify__refund", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify_source", "path": "stg_shopify__refund.sql", "original_file_path": "models/stg_shopify__refund.sql", "name": "stg_shopify__refund", "alias": "stg_shopify__refund", "checksum": {"name": "sha256", "checksum": "db92848ca19e65385f44b51e662bc9a3c773fecefe896cbddd1f23d22d078e82"}, "tags": [], "refs": [["stg_shopify__refund_tmp"], ["stg_shopify__refund_tmp"]], "sources": [], "description": "Each record represents a refund within Shopify.", "columns": {"refund_id": {"name": "refund_id", "description": "The unique numeric identifier for the refund.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "Timestamp of the date when the refund was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "processed_at": {"name": "processed_at", "description": "Timestamp of the date when the refund was processed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "note": {"name": "note", "description": "User generated note attached to the refund.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "restock": {"name": "restock", "description": "Boolean indicating if the refund is a result of a restock.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "user_id": {"name": "user_id", "description": "Reference to the user id which generated the refund.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_duties_set": {"name": "total_duties_set", "description": "Record representing total duties set for the refund.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_id": {"name": "order_id", "description": "Reference to the order which the refund is associated.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify_source://models/stg_shopify.yml", "compiled_path": "target/compiled/shopify_source/models/stg_shopify__refund.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify_combo", "materialized": "table", "enabled": true}, "created_at": 1641410292.183525, "compiled_sql": "--To disable this model, set the shopify__using_refund variable within your dbt_project.yml file to False.\n\n\nwith source as (\n\n select * \n from `dbt-package-testing`.`dbt_transformations`.`stg_shopify__refund_tmp`\n\n),\n\nrenamed as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n created_at\n \n as \n \n created_at\n \n, \n \n \n id\n \n as refund_id , \n \n \n note\n \n as \n \n note\n \n, \n \n \n order_id\n \n as \n \n order_id\n \n, \n \n \n processed_at\n \n as \n \n processed_at\n \n, \n \n \n restock\n \n as \n \n restock\n \n, \n \n \n user_id\n \n as \n \n user_id\n \n\n\n\n\n \n\n\n, cast('' as \n string\n) as source_relation\n\n\n\n \n from source\n)\n\nselect * from renamed", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_transformations`.`stg_shopify__refund`"}, "model.shopify_source.stg_shopify__product": {"raw_sql": "with source as (\n\n select * from {{ ref('stg_shopify__product_tmp') }}\n\n),\n\nrenamed as (\n\n select\n \n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_shopify__product_tmp')),\n staging_columns=get_product_columns()\n )\n }}\n\n --The below script allows for pass through columns.\n {% if var('product_pass_through_columns') %}\n ,\n {{ var('product_pass_through_columns') | join (\", \")}}\n\n {% endif %}\n\n {{ fivetran_utils.source_relation(\n union_schema_variable='shopify_union_schemas', \n union_database_variable='shopify_union_databases') \n }}\n\n from source\n\n)\n\nselect * from renamed", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.shopify_source.get_product_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.source_relation"], "nodes": ["model.shopify_source.stg_shopify__product_tmp", "model.shopify_source.stg_shopify__product_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify_combo", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_transformations", "fqn": ["shopify_source", "stg_shopify__product"], "unique_id": "model.shopify_source.stg_shopify__product", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify_source", "path": "stg_shopify__product.sql", "original_file_path": "models/stg_shopify__product.sql", "name": "stg_shopify__product", "alias": "stg_shopify__product", "checksum": {"name": "sha256", "checksum": "dd30ab5bbf28fc246f4d4625c8057bd05f59c9e8f115d8c72f301b22236b59eb"}, "tags": [], "refs": [["stg_shopify__product_tmp"], ["stg_shopify__product_tmp"]], "sources": [], "description": "Each record represents a product in Shopify.", "columns": {"_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Whether the record has been deleted in the source system.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_timestamp": {"name": "created_timestamp", "description": "The date and time when the product was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "handle": {"name": "handle", "description": "A unique human-friendly string for the product. Automatically generated from the product's title.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "product_id": {"name": "product_id", "description": "An unsigned 64-bit integer that's used as a unique identifier for the product. Each id is unique across the Shopify system. No two products will have the same id, even if they're from different shops.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "product_type": {"name": "product_type", "description": "A categorization for the product used for filtering and searching products.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "published_timestamp": {"name": "published_timestamp", "description": "The date and time (ISO 8601 format) when the product was published. Can be set to null to unpublish the product from the Online Store channel.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "published_scope": {"name": "published_scope", "description": "Whether the product is published to the Point of Sale channel.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "title": {"name": "title", "description": "The name of the product.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_timestamp": {"name": "updated_timestamp", "description": "The date and time when the product was last modified.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "vendor": {"name": "vendor", "description": "The name of the product's vendor.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify_source://models/stg_shopify.yml", "compiled_path": "target/compiled/shopify_source/models/stg_shopify__product.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify_combo", "materialized": "table"}, "created_at": 1641410292.157001, "compiled_sql": "with source as (\n\n select * from `dbt-package-testing`.`dbt_transformations`.`stg_shopify__product_tmp`\n\n),\n\nrenamed as (\n\n select\n \n \n \n \n _fivetran_deleted\n \n as \n \n _fivetran_deleted\n \n, \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n created_at\n \n as created_timestamp , \n \n \n handle\n \n as \n \n handle\n \n, \n \n \n id\n \n as product_id , \n \n \n product_type\n \n as \n \n product_type\n \n, \n \n \n published_at\n \n as published_timestamp , \n \n \n published_scope\n \n as \n \n published_scope\n \n, \n \n \n title\n \n as \n \n title\n \n, \n \n \n updated_at\n \n as updated_timestamp , \n \n \n vendor\n \n as \n \n vendor\n \n\n\n\n\n --The below script allows for pass through columns.\n \n\n \n\n\n, cast('' as \n string\n) as source_relation\n\n\n\n\n from source\n\n)\n\nselect * from renamed", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_transformations`.`stg_shopify__product`"}, "model.shopify_source.stg_shopify__product_variant": {"raw_sql": "with source as (\n\n select * from {{ ref('stg_shopify__product_variant_tmp') }}\n\n),\n\nrenamed as (\n\n select\n \n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_shopify__product_variant_tmp')),\n staging_columns=get_product_variant_columns()\n )\n }}\n\n --The below script allows for pass through columns.\n {% if var('product_variant_pass_through_columns') %}\n ,\n {{ var('product_variant_pass_through_columns') | join (\", \")}}\n\n {% endif %}\n\n {{ fivetran_utils.source_relation(\n union_schema_variable='shopify_union_schemas', \n union_database_variable='shopify_union_databases') \n }}\n\n from source\n\n)\n\nselect * from renamed", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.shopify_source.get_product_variant_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.source_relation"], "nodes": ["model.shopify_source.stg_shopify__product_variant_tmp", "model.shopify_source.stg_shopify__product_variant_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify_combo", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_transformations", "fqn": ["shopify_source", "stg_shopify__product_variant"], "unique_id": "model.shopify_source.stg_shopify__product_variant", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify_source", "path": "stg_shopify__product_variant.sql", "original_file_path": "models/stg_shopify__product_variant.sql", "name": "stg_shopify__product_variant", "alias": "stg_shopify__product_variant", "checksum": {"name": "sha256", "checksum": "6d09962a9153df0f1b3220ecfe3ecd87997d5e5b87187a985a7c25006ca8b229"}, "tags": [], "refs": [["stg_shopify__product_variant_tmp"], ["stg_shopify__product_variant_tmp"]], "sources": [], "description": "Each record represents a product variant in Shopify", "columns": {"barcode": {"name": "barcode", "description": "The barcode, UPC, or ISBN number for the product.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "compare_at_price": {"name": "compare_at_price", "description": "The original price of the item before an adjustment or a sale.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_timestamp": {"name": "created_timestamp", "description": "The date and time (ISO 8601 format) when the product variant was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "fulfillment_service": {"name": "fulfillment_service", "description": "The fulfillment service associated with the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "grams": {"name": "grams", "description": "The weight of the product variant in grams.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_id": {"name": "variant_id", "description": "The unique numeric identifier for the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "image_id": {"name": "image_id", "description": "The unique numeric identifier for a product's image. The image must be associated to the same product as the variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "inventory_item_id": {"name": "inventory_item_id", "description": "The unique identifier for the inventory item, which is used in the Inventory API to query for inventory information.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "inventory_management": {"name": "inventory_management", "description": "The fulfillment service that tracks the number of items in stock for the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "inventory_policy": {"name": "inventory_policy", "description": "Whether customers are allowed to place an order for the product variant when it's out of stock.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "inventory_quantity": {"name": "inventory_quantity", "description": "An aggregate of inventory across all locations. To adjust inventory at a specific location, use the InventoryLevel resource.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "old_inventory_quantity": {"name": "old_inventory_quantity", "description": "This property is deprecated. Use the InventoryLevel resource instead.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "option_1": {"name": "option_1", "description": "The custom properties that a shop owner uses to define product variants. You can define three options for a product variant: option1, option2, option3.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "option_2": {"name": "option_2", "description": "The custom properties that a shop owner uses to define product variants. You can define three options for a product variant: option1, option2, option3.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "option_3": {"name": "option_3", "description": "The custom properties that a shop owner uses to define product variants. You can define three options for a product variant: option1, option2, option3.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "position": {"name": "position", "description": "The order of the product variant in the list of product variants. The first position in the list is 1. The position of variants is indicated by the order in which they are listed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "price": {"name": "price", "description": "The price of the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "product_id": {"name": "product_id", "description": "The unique numeric identifier for the product.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_requiring_shipping": {"name": "is_requiring_shipping", "description": "This property is deprecated. Use the `requires_shipping` property on the InventoryItem resource instead.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "sku": {"name": "sku", "description": "A unique identifier for the product variant in the shop. Required in order to connect to a FulfillmentService.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_taxable": {"name": "is_taxable", "description": "Whether a tax is charged when the product variant is sold.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tax_code": {"name": "tax_code", "description": "This parameter applies only to the stores that have the Avalara AvaTax app installed. Specifies the Avalara tax code for the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "title": {"name": "title", "description": "The title of the product variant. The title field is a concatenation of the option1, option2, and option3 fields. You can only update title indirectly using the option fields.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_timestamp": {"name": "updated_timestamp", "description": "The date and time when the product variant was last modified. Gets returned in ISO 8601 format.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "weight": {"name": "weight", "description": "The weight of the product variant in the unit system specified with weight_unit.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "weight_unit": {"name": "weight_unit", "description": "The unit of measurement that applies to the product variant's weight. If you don't specify a value for weight_unit, then the shop's default unit of measurement is applied. Valid values: g, kg, oz, and lb.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify_source://models/stg_shopify.yml", "compiled_path": "target/compiled/shopify_source/models/stg_shopify__product_variant.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify_combo", "materialized": "table"}, "created_at": 1641410292.167325, "compiled_sql": "with source as (\n\n select * from `dbt-package-testing`.`dbt_transformations`.`stg_shopify__product_variant_tmp`\n\n),\n\nrenamed as (\n\n select\n \n \n \n \n id\n \n as variant_id , \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n created_at\n \n as created_timestamp , \n \n \n updated_at\n \n as updated_timestamp , \n \n \n product_id\n \n as \n \n product_id\n \n, \n \n \n inventory_item_id\n \n as \n \n inventory_item_id\n \n, \n \n \n image_id\n \n as \n \n image_id\n \n, \n \n \n title\n \n as \n \n title\n \n, \n \n \n price\n \n as \n \n price\n \n, \n \n \n sku\n \n as \n \n sku\n \n, \n \n \n position\n \n as \n \n position\n \n, \n \n \n inventory_policy\n \n as \n \n inventory_policy\n \n, \n \n \n compare_at_price\n \n as \n \n compare_at_price\n \n, \n \n \n fulfillment_service\n \n as \n \n fulfillment_service\n \n, \n \n \n inventory_management\n \n as \n \n inventory_management\n \n, \n \n \n taxable\n \n as is_taxable , \n \n \n barcode\n \n as \n \n barcode\n \n, \n \n \n grams\n \n as \n \n grams\n \n, \n \n \n inventory_quantity\n \n as \n \n inventory_quantity\n \n, \n \n \n weight\n \n as \n \n weight\n \n, \n \n \n weight_unit\n \n as \n \n weight_unit\n \n, \n \n \n option_1\n \n as \n \n option_1\n \n, \n \n \n option_2\n \n as \n \n option_2\n \n, \n \n \n option_3\n \n as \n \n option_3\n \n, \n \n \n tax_code\n \n as \n \n tax_code\n \n, \n \n \n old_inventory_quantity\n \n as \n \n old_inventory_quantity\n \n, \n \n \n requires_shipping\n \n as is_requiring_shipping \n\n\n\n --The below script allows for pass through columns.\n \n\n \n\n\n, cast('' as \n string\n) as source_relation\n\n\n\n\n from source\n\n)\n\nselect * from renamed", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_transformations`.`stg_shopify__product_variant`"}, "model.shopify_source.stg_shopify__order": {"raw_sql": "with source as (\n\n select * from {{ ref('stg_shopify__order_tmp') }}\n\n),\n\nrenamed as (\n\n select\n \n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_shopify__order_tmp')),\n staging_columns=get_order_columns()\n )\n }}\n\n --The below script allows for pass through columns.\n {% if var('order_pass_through_columns') %}\n ,\n {{ var('order_pass_through_columns') | join (\", \")}}\n\n {% endif %}\n\n {{ fivetran_utils.source_relation(\n union_schema_variable='shopify_union_schemas', \n union_database_variable='shopify_union_databases') \n }}\n\n from source\n\n)\n\nselect * from renamed", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.shopify_source.get_order_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.source_relation"], "nodes": ["model.shopify_source.stg_shopify__order_tmp", "model.shopify_source.stg_shopify__order_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify_combo", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_transformations", "fqn": ["shopify_source", "stg_shopify__order"], "unique_id": "model.shopify_source.stg_shopify__order", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify_source", "path": "stg_shopify__order.sql", "original_file_path": "models/stg_shopify__order.sql", "name": "stg_shopify__order", "alias": "stg_shopify__order", "checksum": {"name": "sha256", "checksum": "a4b7cdee44f261fe11e487f1022c1f7bd57196220a453bff382c1876ee5a2192"}, "tags": [], "refs": [["stg_shopify__order_tmp"], ["stg_shopify__order_tmp"]], "sources": [], "description": "Each record represents an order in Shopify.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "app_id": {"name": "app_id", "description": "The ID of the app that created the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_address_1": {"name": "billing_address_address_1", "description": "The street address of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_address_2": {"name": "billing_address_address_2", "description": "An optional additional field for the street address of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_city": {"name": "billing_address_city", "description": "The city, town, or village of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_company": {"name": "billing_address_company", "description": "The company of the person associated with the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_country": {"name": "billing_address_country", "description": "The name of the country of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_country_code": {"name": "billing_address_country_code", "description": "The two-letter code (ISO 3166-1 format) for the country of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_first_name": {"name": "billing_address_first_name", "description": "The first name of the person associated with the payment method.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_last_name": {"name": "billing_address_last_name", "description": "The last name of the person associated with the payment method.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_latitude": {"name": "billing_address_latitude", "description": "The latitude of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_longitude": {"name": "billing_address_longitude", "description": "The longitude of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_name": {"name": "billing_address_name", "description": "The full name of the person associated with the payment method.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_phone": {"name": "billing_address_phone", "description": "The phone number at the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_province": {"name": "billing_address_province", "description": "The name of the region (province, state, prefecture, \u2026) of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_province_code": {"name": "billing_address_province_code", "description": "The two-letter abbreviation of the region of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_zip": {"name": "billing_address_zip", "description": "The postal code (zip, postcode, Eircode, \u2026) of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "browser_ip": {"name": "browser_ip", "description": "The IP address of the browser used by the customer when they placed the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "has_buyer_accepted_marketing": {"name": "has_buyer_accepted_marketing", "description": "Whether the customer consented to receive email updates from the shop.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "cancel_reason": {"name": "cancel_reason", "description": "The reason why the order was canceled.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "cancelled_timestamp": {"name": "cancelled_timestamp", "description": "The date and time when the order was canceled.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "cart_token": {"name": "cart_token", "description": "The ID of the cart that's associated with the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "closed_timestamp": {"name": "closed_timestamp", "description": "The date and time when the order was closed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_timestamp": {"name": "created_timestamp", "description": "The autogenerated date and time when the order was created in Shopify.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "The three-letter code for the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "customer_id": {"name": "customer_id", "description": "The ID of the order's customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email": {"name": "email", "description": "The customer's email address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "financial_status": {"name": "financial_status", "description": "The status of payments associated with the order. Can only be set when the order is created", "meta": {}, "data_type": null, "quote": null, "tags": []}, "fulfillment_status": {"name": "fulfillment_status", "description": "The order's status in terms of fulfilled line items.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_id": {"name": "order_id", "description": "The ID of the order, used for API purposes. This is different from the order_number property, which is the ID used by the shop owner and customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "landing_site_base_url": {"name": "landing_site_base_url", "description": "The URL for the page where the buyer landed when they entered the shop.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "location_id": {"name": "location_id", "description": "The ID of the physical location where the order was processed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "name": {"name": "name", "description": "The order name, generated by combining the order_number property with the order prefix and suffix that are set in the merchant's general settings.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "note": {"name": "note", "description": "An optional note that a shop owner can attach to the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "number": {"name": "number", "description": "The order's position in the shop's count of orders. Numbers are sequential and start at 1.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_number": {"name": "order_number", "description": "The order 's position in the shop's count of orders starting at 1001. Order numbers are sequential and start at 1001.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "processed_timestamp": {"name": "processed_timestamp", "description": "The date and time when an order was processed. This value is the date that appears on your orders and that's used in the analytic reports.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "processing_method": {"name": "processing_method", "description": "How the payment was processed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "referring_site": {"name": "referring_site", "description": "The website where the customer clicked a link to the shop.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_address_1": {"name": "shipping_address_address_1", "description": "The street address of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_address_2": {"name": "shipping_address_address_2", "description": "An optional additional field for the street address of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_city": {"name": "shipping_address_city", "description": "The city, town, or village of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_company": {"name": "shipping_address_company", "description": "The company of the person associated with the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_country": {"name": "shipping_address_country", "description": "The name of the country of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_country_code": {"name": "shipping_address_country_code", "description": "The two-letter code (ISO 3166-1 format) for the country of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_first_name": {"name": "shipping_address_first_name", "description": "The first name of the person associated with the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_last_name": {"name": "shipping_address_last_name", "description": "The last name of the person associated with the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_latitude": {"name": "shipping_address_latitude", "description": "The latitude of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_longitude": {"name": "shipping_address_longitude", "description": "The longitude of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_name": {"name": "shipping_address_name", "description": "The full name of the person associated with the payment method.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_phone": {"name": "shipping_address_phone", "description": "The phone number at the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_province": {"name": "shipping_address_province", "description": "The name of the region (province, state, prefecture, \u2026) of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_province_code": {"name": "shipping_address_province_code", "description": "The two-letter abbreviation of the region of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_zip": {"name": "shipping_address_zip", "description": "The postal code (zip, postcode, Eircode, \u2026) of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_name": {"name": "source_name", "description": "Where the order originated. Can be set only during order creation, and is not writeable afterwards.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "subtotal_price": {"name": "subtotal_price", "description": "The price of the order in the shop currency after discounts but before shipping, taxes, and tips.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "has_taxes_included": {"name": "has_taxes_included", "description": "Whether taxes are included in the order subtotal.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_test_order": {"name": "is_test_order", "description": "Whether this is a test order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "token": {"name": "token", "description": "A unique token for the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_discounts": {"name": "total_discounts", "description": "The total discounts applied to the price of the order in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_line_items_price": {"name": "total_line_items_price", "description": "The sum of all line item prices in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_price": {"name": "total_price", "description": "The sum of all line item prices, discounts, shipping, taxes, and tips in the shop currency. Must be positive.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_tax": {"name": "total_tax", "description": "The sum of all the taxes applied to the order in th shop currency. Must be positive).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_weight": {"name": "total_weight", "description": "The sum of all line item weights in grams.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_timestamp": {"name": "updated_timestamp", "description": "The date and time (ISO 8601 format) when the order was last modified.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "user_id": {"name": "user_id", "description": "The ID of the user logged into Shopify POS who processed the order, if applicable.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_shipping_price_set": {"name": "total_shipping_price_set", "description": "The total shipping price set for the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "index": {"name": "index", "description": "The index associated with the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "pre_tax_price": {"name": "pre_tax_price", "description": "The total pre tax price of the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify_source://models/stg_shopify.yml", "compiled_path": "target/compiled/shopify_source/models/stg_shopify__order.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify_combo", "materialized": "table"}, "created_at": 1641410292.15136, "compiled_sql": "with source as (\n\n select * from `dbt-package-testing`.`dbt_transformations`.`stg_shopify__order_tmp`\n\n),\n\nrenamed as (\n\n select\n \n \n \n \n id\n \n as order_id , \n \n \n processed_at\n \n as processed_timestamp , \n \n \n updated_at\n \n as updated_timestamp , \n \n \n user_id\n \n as \n \n user_id\n \n, \n \n \n total_discounts\n \n as \n \n total_discounts\n \n, \n \n \n total_line_items_price\n \n as \n \n total_line_items_price\n \n, \n \n \n total_price\n \n as \n \n total_price\n \n, \n \n \n total_tax\n \n as \n \n total_tax\n \n, \n \n \n source_name\n \n as \n \n source_name\n \n, \n \n \n subtotal_price\n \n as \n \n subtotal_price\n \n, \n \n \n taxes_included\n \n as has_taxes_included , \n \n \n total_weight\n \n as \n \n total_weight\n \n, \n \n \n landing_site_base_url\n \n as \n \n landing_site_base_url\n \n, \n \n \n location_id\n \n as \n \n location_id\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n note\n \n as \n \n note\n \n, \n \n \n number\n \n as \n \n number\n \n, \n \n \n order_number\n \n as \n \n order_number\n \n, \n \n \n cancel_reason\n \n as \n \n cancel_reason\n \n, \n \n \n cancelled_at\n \n as cancelled_timestamp , \n \n \n cart_token\n \n as \n \n cart_token\n \n, \n \n \n checkout_token\n \n as \n \n checkout_token\n \n, \n \n \n closed_at\n \n as closed_timestamp , \n \n \n created_at\n \n as created_timestamp , \n \n \n currency\n \n as \n \n currency\n \n, \n \n \n customer_id\n \n as \n \n customer_id\n \n, \n \n \n email\n \n as \n \n email\n \n, \n \n \n financial_status\n \n as \n \n financial_status\n \n, \n \n \n fulfillment_status\n \n as \n \n fulfillment_status\n \n, \n \n \n processing_method\n \n as \n \n processing_method\n \n, \n \n \n referring_site\n \n as \n \n referring_site\n \n, \n \n \n billing_address_address_1\n \n as \n \n billing_address_address_1\n \n, \n \n \n billing_address_address_2\n \n as \n \n billing_address_address_2\n \n, \n \n \n billing_address_city\n \n as \n \n billing_address_city\n \n, \n \n \n billing_address_company\n \n as \n \n billing_address_company\n \n, \n \n \n billing_address_country\n \n as \n \n billing_address_country\n \n, \n \n \n billing_address_country_code\n \n as \n \n billing_address_country_code\n \n, \n \n \n billing_address_first_name\n \n as \n \n billing_address_first_name\n \n, \n \n \n billing_address_last_name\n \n as \n \n billing_address_last_name\n \n, \n \n \n billing_address_latitude\n \n as \n \n billing_address_latitude\n \n, \n \n \n billing_address_longitude\n \n as \n \n billing_address_longitude\n \n, \n \n \n billing_address_name\n \n as \n \n billing_address_name\n \n, \n \n \n billing_address_phone\n \n as \n \n billing_address_phone\n \n, \n \n \n billing_address_province\n \n as \n \n billing_address_province\n \n, \n \n \n billing_address_province_code\n \n as \n \n billing_address_province_code\n \n, \n \n \n billing_address_zip\n \n as \n \n billing_address_zip\n \n, \n \n \n browser_ip\n \n as \n \n browser_ip\n \n, \n \n \n buyer_accepts_marketing\n \n as has_buyer_accepted_marketing , \n \n \n total_shipping_price_set\n \n as \n \n total_shipping_price_set\n \n, \n \n \n shipping_address_address_1\n \n as \n \n shipping_address_address_1\n \n, \n \n \n shipping_address_address_2\n \n as \n \n shipping_address_address_2\n \n, \n \n \n shipping_address_city\n \n as \n \n shipping_address_city\n \n, \n \n \n shipping_address_company\n \n as \n \n shipping_address_company\n \n, \n \n \n shipping_address_country\n \n as \n \n shipping_address_country\n \n, \n \n \n shipping_address_country_code\n \n as \n \n shipping_address_country_code\n \n, \n \n \n shipping_address_first_name\n \n as \n \n shipping_address_first_name\n \n, \n \n \n shipping_address_last_name\n \n as \n \n shipping_address_last_name\n \n, \n \n \n shipping_address_latitude\n \n as \n \n shipping_address_latitude\n \n, \n \n \n shipping_address_longitude\n \n as \n \n shipping_address_longitude\n \n, \n \n \n shipping_address_name\n \n as \n \n shipping_address_name\n \n, \n \n \n shipping_address_phone\n \n as \n \n shipping_address_phone\n \n, \n \n \n shipping_address_province\n \n as \n \n shipping_address_province\n \n, \n \n \n shipping_address_province_code\n \n as \n \n shipping_address_province_code\n \n, \n \n \n shipping_address_zip\n \n as \n \n shipping_address_zip\n \n, \n \n \n test\n \n as is_test_order , \n \n \n token\n \n as \n \n token\n \n, \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n\n\n\n\n --The below script allows for pass through columns.\n \n\n \n\n\n, cast('' as \n string\n) as source_relation\n\n\n\n\n from source\n\n)\n\nselect * from renamed", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_transformations`.`stg_shopify__order`"}, "model.shopify_source.stg_shopify__transaction": {"raw_sql": "with source as (\n\n select * from {{ ref('stg_shopify__transaction_tmp') }}\n\n),\n\nrenamed as (\n\n select\n\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_shopify__transaction_tmp')),\n staging_columns=get_transaction_columns()\n )\n }}\n\n --The below script allows for pass through columns.\n {% if var('transaction_pass_through_columns') %}\n ,\n {{ var('transaction_pass_through_columns') | join (\", \")}}\n\n {% endif %}\n\n {{ fivetran_utils.source_relation(\n union_schema_variable='shopify_union_schemas', \n union_database_variable='shopify_union_databases') \n }}\n\n from source\n where not test\n\n)\n\nselect * from renamed", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.shopify_source.get_transaction_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.source_relation"], "nodes": ["model.shopify_source.stg_shopify__transaction_tmp", "model.shopify_source.stg_shopify__transaction_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify_combo", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_transformations", "fqn": ["shopify_source", "stg_shopify__transaction"], "unique_id": "model.shopify_source.stg_shopify__transaction", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify_source", "path": "stg_shopify__transaction.sql", "original_file_path": "models/stg_shopify__transaction.sql", "name": "stg_shopify__transaction", "alias": "stg_shopify__transaction", "checksum": {"name": "sha256", "checksum": "b837eb0c1661d2817ccb6a1c3123e7d146dbbd9a63ea1fe0ad52ba8a1742ecbe"}, "tags": [], "refs": [["stg_shopify__transaction_tmp"], ["stg_shopify__transaction_tmp"]], "sources": [], "description": "Each record represents a transaction in Shopify.", "columns": {"transaction_id": {"name": "transaction_id", "description": "The ID for the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_id": {"name": "order_id", "description": "The ID for the order that the transaction is associated with.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refund_id": {"name": "refund_id", "description": "The ID associated with a refund in the refund table.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "amount": {"name": "amount", "description": "The amount of money included in the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "authorization": {"name": "authorization", "description": "The authorization code associated with the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_timestamp": {"name": "created_timestamp", "description": "The date and time when the transaction was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "processed_timestamp": {"name": "processed_timestamp", "description": "The date and time when a transaction was processed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "device_id": {"name": "device_id", "description": "The ID for the device.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "gateway": {"name": "gateway", "description": "The name of the gateway the transaction was issued through.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_name": {"name": "source_name", "description": "The origin of the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "message": {"name": "message", "description": "A string generated by the payment provider with additional information about why the transaction succeeded or failed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "The three-letter code (ISO 4217 format) for the currency used for the payment.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "location_id": {"name": "location_id", "description": "The ID of the physical location where the transaction was processed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "parent_id": {"name": "parent_id", "description": "The ID of an associated transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payment_avs_result_code": {"name": "payment_avs_result_code", "description": "The response code from the address verification system.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payment_credit_card_bin": {"name": "payment_credit_card_bin", "description": "The issuer identification number (IIN), formerly known as bank identification number (BIN) of the customer's credit card.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payment_cvv_result_code": {"name": "payment_cvv_result_code", "description": "The response code from the credit card company indicating whether the customer entered the card security code, or card verification value, correctly.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payment_credit_card_number": {"name": "payment_credit_card_number", "description": "The customer's credit card number, with most of the leading digits redacted.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payment_credit_card_company": {"name": "payment_credit_card_company", "description": "The name of the company that issued the customer's credit card.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "kind": {"name": "kind", "description": "The transaction's type.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "receipt": {"name": "receipt", "description": "A transaction receipt attached to the transaction by the gateway.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency_exchange_id": {"name": "currency_exchange_id", "description": "The ID of the adjustment.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency_exchange_adjustment": {"name": "currency_exchange_adjustment", "description": "The difference between the amounts on the associated transaction and the parent transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency_exchange_original_amount": {"name": "currency_exchange_original_amount", "description": "The amount of the parent transaction in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency_exchange_final_amount": {"name": "currency_exchange_final_amount", "description": "The amount of the associated transaction in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency_exchange_currency": {"name": "currency_exchange_currency", "description": "The shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "error_code": {"name": "error_code", "description": "A standardized error code, independent of the payment provider.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status": {"name": "status", "description": "The status of the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "test": {"name": "test", "description": "Whether the transaction is a test transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "user_id": {"name": "user_id", "description": "The ID for the user who was logged into the Shopify POS device when the order was processed, if applicable.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify_source://models/stg_shopify.yml", "compiled_path": "target/compiled/shopify_source/models/stg_shopify__transaction.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify_combo", "materialized": "table"}, "created_at": 1641410292.1795259, "compiled_sql": "with source as (\n\n select * from `dbt-package-testing`.`dbt_transformations`.`stg_shopify__transaction_tmp`\n\n),\n\nrenamed as (\n\n select\n\n \n \n \n id\n \n as transaction_id , \n \n \n order_id\n \n as \n \n order_id\n \n, \n \n \n refund_id\n \n as \n \n refund_id\n \n, \n \n \n amount\n \n as \n \n amount\n \n, \n \n \n created_at\n \n as created_timestamp , \n \n \n processed_at\n \n as processed_timestamp , \n \n \n device_id\n \n as \n \n device_id\n \n, \n \n \n gateway\n \n as \n \n gateway\n \n, \n \n \n source_name\n \n as \n \n source_name\n \n, \n \n \n message\n \n as \n \n message\n \n, \n \n \n currency\n \n as \n \n currency\n \n, \n \n \n location_id\n \n as \n \n location_id\n \n, \n \n \n parent_id\n \n as \n \n parent_id\n \n, \n \n \n payment_avs_result_code\n \n as \n \n payment_avs_result_code\n \n, \n \n \n payment_credit_card_bin\n \n as \n \n payment_credit_card_bin\n \n, \n \n \n payment_cvv_result_code\n \n as \n \n payment_cvv_result_code\n \n, \n \n \n payment_credit_card_number\n \n as \n \n payment_credit_card_number\n \n, \n \n \n payment_credit_card_company\n \n as \n \n payment_credit_card_company\n \n, \n \n \n kind\n \n as \n \n kind\n \n, \n \n \n receipt\n \n as \n \n receipt\n \n, \n \n \n currency_exchange_id\n \n as \n \n currency_exchange_id\n \n, \n \n \n currency_exchange_adjustment\n \n as \n \n currency_exchange_adjustment\n \n, \n \n \n currency_exchange_original_amount\n \n as \n \n currency_exchange_original_amount\n \n, \n \n \n currency_exchange_final_amount\n \n as \n \n currency_exchange_final_amount\n \n, \n \n \n currency_exchange_currency\n \n as \n \n currency_exchange_currency\n \n, \n \n \n error_code\n \n as \n \n error_code\n \n, \n \n \n status\n \n as \n \n status\n \n, \n \n \n test\n \n as \n \n test\n \n, \n \n \n user_id\n \n as \n \n user_id\n \n, \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n\n\n\n\n --The below script allows for pass through columns.\n \n\n \n\n\n, cast('' as \n string\n) as source_relation\n\n\n\n\n from source\n where not test\n\n)\n\nselect * from renamed", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_transformations`.`stg_shopify__transaction`"}, "model.shopify_source.stg_shopify__order_adjustment": {"raw_sql": "--To disable this model, set the shopify__using_order_adjustment variable within your dbt_project.yml file to False.\n{{ config(enabled=var('shopify__using_order_adjustment', True)) }}\n\nwith source as (\n\n select * \n from {{ ref('stg_shopify__order_adjustment_tmp') }}\n\n),\n\nrenamed as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_shopify__order_adjustment_tmp')),\n staging_columns=get_order_adjustment_columns()\n )\n }}\n\n {{ fivetran_utils.source_relation(\n union_schema_variable='shopify_union_schemas', \n union_database_variable='shopify_union_databases') \n }}\n \n from source\n)\n\nselect * from renamed", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.shopify_source.get_order_adjustment_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.source_relation"], "nodes": ["model.shopify_source.stg_shopify__order_adjustment_tmp", "model.shopify_source.stg_shopify__order_adjustment_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify_combo", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_transformations", "fqn": ["shopify_source", "stg_shopify__order_adjustment"], "unique_id": "model.shopify_source.stg_shopify__order_adjustment", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify_source", "path": "stg_shopify__order_adjustment.sql", "original_file_path": "models/stg_shopify__order_adjustment.sql", "name": "stg_shopify__order_adjustment", "alias": "stg_shopify__order_adjustment", "checksum": {"name": "sha256", "checksum": "b494a4c88cf235fb0b11c020d004bcf0904e9d1ae235144330d3d24b37ad4318"}, "tags": [], "refs": [["stg_shopify__order_adjustment_tmp"], ["stg_shopify__order_adjustment_tmp"]], "sources": [], "description": "Each record represents and adjustment to and order within Shopify.", "columns": {"order_adjustment_id": {"name": "order_adjustment_id", "description": "The unique numeric identifier for the order adjustment.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_id": {"name": "order_id", "description": "Reference to the order which the adjustment is associated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refund_id": {"name": "refund_id", "description": "Reference to the refund which the adjustment is associated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "amount": {"name": "amount", "description": "Amount of the adjustment.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tax_amount": {"name": "tax_amount", "description": "Tax amount applied to the order adjustment.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "kind": {"name": "kind", "description": "The kind of order adjustment (eg. refund, restock, etc.).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "reason": {"name": "reason", "description": "The reason for the order adjustment.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "amount_set": {"name": "amount_set", "description": "Amount set towards the order adjustment", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tax_amount_set": {"name": "tax_amount_set", "description": "Tax amount set towards the order adjustment.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify_source://models/stg_shopify.yml", "compiled_path": "target/compiled/shopify_source/models/stg_shopify__order_adjustment.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify_combo", "materialized": "table", "enabled": true}, "created_at": 1641410292.188066, "compiled_sql": "--To disable this model, set the shopify__using_order_adjustment variable within your dbt_project.yml file to False.\n\n\nwith source as (\n\n select * \n from `dbt-package-testing`.`dbt_transformations`.`stg_shopify__order_adjustment_tmp`\n\n),\n\nrenamed as (\n\n select\n \n \n \n id\n \n as order_adjustment_id , \n \n \n order_id\n \n as \n \n order_id\n \n, \n \n \n refund_id\n \n as \n \n refund_id\n \n, \n \n \n amount\n \n as \n \n amount\n \n, \n \n \n tax_amount\n \n as \n \n tax_amount\n \n, \n \n \n kind\n \n as \n \n kind\n \n, \n \n \n reason\n \n as \n \n reason\n \n, \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n\n\n\n\n \n\n\n, cast('' as \n string\n) as source_relation\n\n\n\n \n from source\n)\n\nselect * from renamed", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_transformations`.`stg_shopify__order_adjustment`"}, "model.shopify_source.stg_shopify__customer": {"raw_sql": "with source as (\n\n select * from {{ ref('stg_shopify__customer_tmp') }}\n\n),\n\nrenamed as (\n\n select\n \n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_shopify__customer_tmp')),\n staging_columns=get_customer_columns()\n )\n }}\n\n --The below script allows for pass through columns.\n {% if var('customer_pass_through_columns') %}\n ,\n {{ var('customer_pass_through_columns') | join (\", \")}}\n\n {% endif %}\n\n {{ fivetran_utils.source_relation(\n union_schema_variable='shopify_union_schemas', \n union_database_variable='shopify_union_databases') \n }}\n\n from source\n\n)\n\nselect * from renamed", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.shopify_source.get_customer_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.source_relation"], "nodes": ["model.shopify_source.stg_shopify__customer_tmp", "model.shopify_source.stg_shopify__customer_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify_combo", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_transformations", "fqn": ["shopify_source", "stg_shopify__customer"], "unique_id": "model.shopify_source.stg_shopify__customer", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify_source", "path": "stg_shopify__customer.sql", "original_file_path": "models/stg_shopify__customer.sql", "name": "stg_shopify__customer", "alias": "stg_shopify__customer", "checksum": {"name": "sha256", "checksum": "e43df3b376bae7b581cfb9514f59c82263bbba83447e9bd440a214e8c2dca709"}, "tags": [], "refs": [["stg_shopify__customer_tmp"], ["stg_shopify__customer_tmp"]], "sources": [], "description": "Each record represents a customer in Shopify.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "has_accepted_marketing": {"name": "has_accepted_marketing", "description": "Whether the customer has consented to receive marketing material via email.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_timestamp": {"name": "created_timestamp", "description": "The date and time when the customer was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "default_address_id": {"name": "default_address_id", "description": "The default address for the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email": {"name": "email", "description": "The unique email address of the customer. Attempting to assign the same email address to multiple customers returns an error.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_name": {"name": "first_name", "description": "The customer's first name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "customer_id": {"name": "customer_id", "description": "A unique identifier for the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_name": {"name": "last_name", "description": "The customer's last name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "orders_count": {"name": "orders_count", "description": "The number of orders associated with this customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "phone": {"name": "phone", "description": "The unique phone number (E.164 format) for this customer. Attempting to assign the same phone number to multiple customers returns an error.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "account_state": {"name": "account_state", "description": "The state of the customer's account with a shop.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_tax_exempt": {"name": "is_tax_exempt", "description": "Whether the customer is exempt from paying taxes on their order. If true, then taxes won't be applied to an order at checkout. If false, then taxes will be applied at checkout.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_spent": {"name": "total_spent", "description": "The total amount of money that the customer has spent across their order history.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_timestamp": {"name": "updated_timestamp", "description": "The date and time when the customer information was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_verified_email": {"name": "is_verified_email", "description": "Whether the customer has verified their email address.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify_source://models/stg_shopify.yml", "compiled_path": "target/compiled/shopify_source/models/stg_shopify__customer.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify_combo", "materialized": "table"}, "created_at": 1641410292.114378, "compiled_sql": "with source as (\n\n select * from `dbt-package-testing`.`dbt_transformations`.`stg_shopify__customer_tmp`\n\n),\n\nrenamed as (\n\n select\n \n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n accepts_marketing\n \n as has_accepted_marketing , \n \n \n created_at\n \n as created_timestamp , \n \n \n default_address_id\n \n as \n \n default_address_id\n \n, \n \n \n email\n \n as \n \n email\n \n, \n \n \n first_name\n \n as \n \n first_name\n \n, \n \n \n id\n \n as customer_id , \n \n \n last_name\n \n as \n \n last_name\n \n, \n \n \n orders_count\n \n as \n \n orders_count\n \n, \n \n \n phone\n \n as \n \n phone\n \n, \n \n \n state\n \n as account_state , \n \n \n tax_exempt\n \n as is_tax_exempt , \n \n \n total_spent\n \n as \n \n total_spent\n \n, \n \n \n updated_at\n \n as updated_timestamp , \n \n \n verified_email\n \n as is_verified_email \n\n\n\n --The below script allows for pass through columns.\n \n ,\n multipass_identifier\n\n \n\n \n\n\n, cast('' as \n string\n) as source_relation\n\n\n\n\n from source\n\n)\n\nselect * from renamed", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_transformations`.`stg_shopify__customer`"}, "model.shopify_source.stg_shopify__order_line_refund": {"raw_sql": "--To disable this model, set the shopify__using_order_line_refund variable within your dbt_project.yml file to False.\n{{ config(enabled=var('shopify__using_order_line_refund', True)) }}\n\nwith source as (\n\n select * from {{ ref('stg_shopify__order_line_refund_tmp') }}\n\n),\n\nrenamed as (\n\n select\n \n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_shopify__order_line_refund_tmp')),\n staging_columns=get_order_line_refund_columns()\n )\n }}\n\n --The below script allows for pass through columns.\n {% if var('order_line_refund_pass_through_columns') %}\n ,\n {{ var('order_line_refund_pass_through_columns') | join (\", \")}}\n\n {% endif %}\n\n {{ fivetran_utils.source_relation(\n union_schema_variable='shopify_union_schemas', \n union_database_variable='shopify_union_databases') \n }}\n\n from source\n\n)\n\nselect * from renamed", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.shopify_source.get_order_line_refund_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.source_relation"], "nodes": ["model.shopify_source.stg_shopify__order_line_refund_tmp", "model.shopify_source.stg_shopify__order_line_refund_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify_combo", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_transformations", "fqn": ["shopify_source", "stg_shopify__order_line_refund"], "unique_id": "model.shopify_source.stg_shopify__order_line_refund", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify_source", "path": "stg_shopify__order_line_refund.sql", "original_file_path": "models/stg_shopify__order_line_refund.sql", "name": "stg_shopify__order_line_refund", "alias": "stg_shopify__order_line_refund", "checksum": {"name": "sha256", "checksum": "0d7b02b07f95694dd5358ec919659f16bdccf708f906546b99f448355b1253cd"}, "tags": [], "refs": [["stg_shopify__order_line_refund_tmp"], ["stg_shopify__order_line_refund_tmp"]], "sources": [], "description": "Each record represents a line item from an order in Shopify.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_line_refund_id": {"name": "order_line_refund_id", "description": "The unique identifier of the line item in the refund.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "location_id": {"name": "location_id", "description": "TThe unique identifier of the location where the items will be restockedBD", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_line_id": {"name": "order_line_id", "description": "The ID of the related line item in the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "quantity": {"name": "quantity", "description": "The quantity of the associated line item that was returned.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refund_id": {"name": "refund_id", "description": "The ID of the related refund.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "restock_type": {"name": "restock_type", "description": "How this refund line item affects inventory levels.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "subtotal": {"name": "subtotal", "description": "Subtotal amount of the order line refund", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_tax": {"name": "total_tax", "description": "The total tax applied to the refund.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify_source://models/stg_shopify.yml", "compiled_path": "target/compiled/shopify_source/models/stg_shopify__order_line_refund.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify_combo", "materialized": "table", "enabled": true}, "created_at": 1641410292.118253, "compiled_sql": "--To disable this model, set the shopify__using_order_line_refund variable within your dbt_project.yml file to False.\n\n\nwith source as (\n\n select * from `dbt-package-testing`.`dbt_transformations`.`stg_shopify__order_line_refund_tmp`\n\n),\n\nrenamed as (\n\n select\n \n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n id\n \n as order_line_refund_id , \n \n \n location_id\n \n as \n \n location_id\n \n, \n \n \n order_line_id\n \n as \n \n order_line_id\n \n, \n \n \n subtotal\n \n as \n \n subtotal\n \n, \n \n \n total_tax\n \n as \n \n total_tax\n \n, \n \n \n quantity\n \n as \n \n quantity\n \n, \n \n \n refund_id\n \n as \n \n refund_id\n \n, \n \n \n restock_type\n \n as \n \n restock_type\n \n\n\n\n\n --The below script allows for pass through columns.\n \n\n \n\n\n, cast('' as \n string\n) as source_relation\n\n\n\n\n from source\n\n)\n\nselect * from renamed", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_transformations`.`stg_shopify__order_line_refund`"}, "model.shopify_source.stg_shopify__customer_tmp": {"raw_sql": "{{\n fivetran_utils.union_data(\n table_identifier='customer', \n database_variable='shopify_database', \n schema_variable='shopify_schema', \n default_database=target.database,\n default_schema='shopify',\n default_variable='customer_source',\n union_schema_variable='shopify_union_schemas',\n union_database_variable='shopify_union_databases'\n )\n}}", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.union_data"], "nodes": ["source.shopify_source.shopify.customer"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify_combo", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_transformations", "fqn": ["shopify_source", "tmp", "stg_shopify__customer_tmp"], "unique_id": "model.shopify_source.stg_shopify__customer_tmp", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify_source", "path": "tmp/stg_shopify__customer_tmp.sql", "original_file_path": "models/tmp/stg_shopify__customer_tmp.sql", "name": "stg_shopify__customer_tmp", "alias": "stg_shopify__customer_tmp", "checksum": {"name": "sha256", "checksum": "1f896e84164292f48db1c4eddfd6b3afef9ce4661ad2ab160c8721c8e620026c"}, "tags": [], "refs": [], "sources": [["shopify", "customer"]], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/tmp/stg_shopify__customer_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify_combo", "materialized": "view"}, "created_at": 1641410291.4451468, "compiled_sql": "\n\n\n\n select * \n from `fivetran-db`.`shopify`.`customer`\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_transformations`.`stg_shopify__customer_tmp`"}, "model.shopify_source.stg_shopify__order_line_tmp": {"raw_sql": "{{\n fivetran_utils.union_data(\n table_identifier='order_line', \n database_variable='shopify_database', \n schema_variable='shopify_schema', \n default_database=target.database,\n default_schema='shopify',\n default_variable='order_line_source',\n union_schema_variable='shopify_union_schemas',\n union_database_variable='shopify_union_databases'\n )\n}}", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.union_data"], "nodes": ["source.shopify_source.shopify.order_line"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify_combo", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_transformations", "fqn": ["shopify_source", "tmp", "stg_shopify__order_line_tmp"], "unique_id": "model.shopify_source.stg_shopify__order_line_tmp", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify_source", "path": "tmp/stg_shopify__order_line_tmp.sql", "original_file_path": "models/tmp/stg_shopify__order_line_tmp.sql", "name": "stg_shopify__order_line_tmp", "alias": "stg_shopify__order_line_tmp", "checksum": {"name": "sha256", "checksum": "778359b2c17590b95d7b5709bfdd28b50d323b905e4277c74203416f08ee458e"}, "tags": [], "refs": [], "sources": [["shopify", "order_line"]], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/tmp/stg_shopify__order_line_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify_combo", "materialized": "view"}, "created_at": 1641410291.465287, "compiled_sql": "\n\n\n\n select * \n from `fivetran-db`.`shopify`.`order_line`\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_transformations`.`stg_shopify__order_line_tmp`"}, "model.shopify_source.stg_shopify__refund_tmp": {"raw_sql": "--To disable this model, set the shopify__using_refund variable within your dbt_project.yml file to False.\n{{ config(enabled=var('shopify__using_refund', True)) }}\n\n{{\n fivetran_utils.union_data(\n table_identifier='refund', \n database_variable='shopify_database', \n schema_variable='shopify_schema', \n default_database=target.database,\n default_schema='shopify',\n default_variable='refund_source',\n union_schema_variable='shopify_union_schemas',\n union_database_variable='shopify_union_databases'\n )\n}}", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.union_data"], "nodes": ["source.shopify_source.shopify.refund"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify_combo", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_transformations", "fqn": ["shopify_source", "tmp", "stg_shopify__refund_tmp"], "unique_id": "model.shopify_source.stg_shopify__refund_tmp", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify_source", "path": "tmp/stg_shopify__refund_tmp.sql", "original_file_path": "models/tmp/stg_shopify__refund_tmp.sql", "name": "stg_shopify__refund_tmp", "alias": "stg_shopify__refund_tmp", "checksum": {"name": "sha256", "checksum": "2bcf1d64f126acc4d271984df2b6332286bf10a7345962f7037c391d8ecdbdbd"}, "tags": [], "refs": [], "sources": [["shopify", "refund"]], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/tmp/stg_shopify__refund_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify_combo", "materialized": "view", "enabled": true}, "created_at": 1641410291.471932, "compiled_sql": "--To disable this model, set the shopify__using_refund variable within your dbt_project.yml file to False.\n\n\n\n\n\n\n select * \n from `fivetran-db`.`shopify`.`refund`\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_transformations`.`stg_shopify__refund_tmp`"}, "model.shopify_source.stg_shopify__product_tmp": {"raw_sql": "{{\n fivetran_utils.union_data(\n table_identifier='product', \n database_variable='shopify_database', \n schema_variable='shopify_schema', \n default_database=target.database,\n default_schema='shopify',\n default_variable='product_source',\n union_schema_variable='shopify_union_schemas',\n union_database_variable='shopify_union_databases'\n )\n}}", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.union_data"], "nodes": ["source.shopify_source.shopify.product"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify_combo", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_transformations", "fqn": ["shopify_source", "tmp", "stg_shopify__product_tmp"], "unique_id": "model.shopify_source.stg_shopify__product_tmp", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify_source", "path": "tmp/stg_shopify__product_tmp.sql", "original_file_path": "models/tmp/stg_shopify__product_tmp.sql", "name": "stg_shopify__product_tmp", "alias": "stg_shopify__product_tmp", "checksum": {"name": "sha256", "checksum": "4c88fa0dabe17fa99b7509af7b3518c844df1747e28e6c7ac4f0a8262424e91a"}, "tags": [], "refs": [], "sources": [["shopify", "product"]], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/tmp/stg_shopify__product_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify_combo", "materialized": "view"}, "created_at": 1641410291.479158, "compiled_sql": "\n\n\n\n select * \n from `fivetran-db`.`shopify`.`product`\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_transformations`.`stg_shopify__product_tmp`"}, "model.shopify_source.stg_shopify__order_adjustment_tmp": {"raw_sql": "--To disable this model, set the shopify__using_order_adjustment variable within your dbt_project.yml file to False.\n{{ config(enabled=var('shopify__using_order_adjustment', True)) }}\n\n{{\n fivetran_utils.union_data(\n table_identifier='order_adjustment', \n database_variable='shopify_database', \n schema_variable='shopify_schema', \n default_database=target.database,\n default_schema='shopify',\n default_variable='order_adjustment_source',\n union_schema_variable='shopify_union_schemas',\n union_database_variable='shopify_union_databases'\n )\n}}", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.union_data"], "nodes": ["source.shopify_source.shopify.order_adjustment"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify_combo", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_transformations", "fqn": ["shopify_source", "tmp", "stg_shopify__order_adjustment_tmp"], "unique_id": "model.shopify_source.stg_shopify__order_adjustment_tmp", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify_source", "path": "tmp/stg_shopify__order_adjustment_tmp.sql", "original_file_path": "models/tmp/stg_shopify__order_adjustment_tmp.sql", "name": "stg_shopify__order_adjustment_tmp", "alias": "stg_shopify__order_adjustment_tmp", "checksum": {"name": "sha256", "checksum": "e3d5e7ba5a680437560ef21796b014718c45d20c52fbf4ac950d8eb687348d96"}, "tags": [], "refs": [], "sources": [["shopify", "order_adjustment"]], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/tmp/stg_shopify__order_adjustment_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify_combo", "materialized": "view", "enabled": true}, "created_at": 1641410291.48568, "compiled_sql": "--To disable this model, set the shopify__using_order_adjustment variable within your dbt_project.yml file to False.\n\n\n\n\n\n\n select * \n from `fivetran-db`.`shopify`.`order_adjustment`\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_transformations`.`stg_shopify__order_adjustment_tmp`"}, "model.shopify_source.stg_shopify__order_line_refund_tmp": {"raw_sql": "--To disable this model, set the shopify__using_order_line_refund variable within your dbt_project.yml file to False.\n{{ config(enabled=var('shopify__using_order_line_refund', True)) }}\n\n{{\n fivetran_utils.union_data(\n table_identifier='order_line_refund', \n database_variable='shopify_database', \n schema_variable='shopify_schema', \n default_database=target.database,\n default_schema='shopify',\n default_variable='order_line_refund_source',\n union_schema_variable='shopify_union_schemas',\n union_database_variable='shopify_union_databases'\n )\n}}", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.union_data"], "nodes": ["source.shopify_source.shopify.order_line_refund"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify_combo", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_transformations", "fqn": ["shopify_source", "tmp", "stg_shopify__order_line_refund_tmp"], "unique_id": "model.shopify_source.stg_shopify__order_line_refund_tmp", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify_source", "path": "tmp/stg_shopify__order_line_refund_tmp.sql", "original_file_path": "models/tmp/stg_shopify__order_line_refund_tmp.sql", "name": "stg_shopify__order_line_refund_tmp", "alias": "stg_shopify__order_line_refund_tmp", "checksum": {"name": "sha256", "checksum": "33bb981405f33c32bbe9c2107a9ba93fd70b9e59578befc3c9e7f78a68c27eb2"}, "tags": [], "refs": [], "sources": [["shopify", "order_line_refund"]], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/tmp/stg_shopify__order_line_refund_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify_combo", "materialized": "view", "enabled": true}, "created_at": 1641410291.495389, "compiled_sql": "--To disable this model, set the shopify__using_order_line_refund variable within your dbt_project.yml file to False.\n\n\n\n\n\n\n select * \n from `fivetran-db`.`shopify`.`order_line_refund`\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_transformations`.`stg_shopify__order_line_refund_tmp`"}, "model.shopify_source.stg_shopify__transaction_tmp": {"raw_sql": "{{\n fivetran_utils.union_data(\n table_identifier='transaction', \n database_variable='shopify_database', \n schema_variable='shopify_schema', \n default_database=target.database,\n default_schema='shopify',\n default_variable='transaction_source',\n union_schema_variable='shopify_union_schemas',\n union_database_variable='shopify_union_databases'\n )\n}}", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.union_data"], "nodes": ["source.shopify_source.shopify.transaction"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify_combo", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_transformations", "fqn": ["shopify_source", "tmp", "stg_shopify__transaction_tmp"], "unique_id": "model.shopify_source.stg_shopify__transaction_tmp", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify_source", "path": "tmp/stg_shopify__transaction_tmp.sql", "original_file_path": "models/tmp/stg_shopify__transaction_tmp.sql", "name": "stg_shopify__transaction_tmp", "alias": "stg_shopify__transaction_tmp", "checksum": {"name": "sha256", "checksum": "9a4cf0c7a2495c01fd10f0d88655aaffe63ef8b3cc94883e10507b034285f978"}, "tags": [], "refs": [], "sources": [["shopify", "transaction"]], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/tmp/stg_shopify__transaction_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify_combo", "materialized": "view"}, "created_at": 1641410291.503662, "compiled_sql": "\n\n\n\n select * \n from `fivetran-db`.`shopify`.`transaction`\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_transformations`.`stg_shopify__transaction_tmp`"}, "model.shopify_source.stg_shopify__product_variant_tmp": {"raw_sql": "{{\n fivetran_utils.union_data(\n table_identifier='product_variant', \n database_variable='shopify_database', \n schema_variable='shopify_schema', \n default_database=target.database,\n default_schema='shopify',\n default_variable='product_variant_source',\n union_schema_variable='shopify_union_schemas',\n union_database_variable='shopify_union_databases'\n )\n}}", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.union_data"], "nodes": ["source.shopify_source.shopify.product_variant"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify_combo", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_transformations", "fqn": ["shopify_source", "tmp", "stg_shopify__product_variant_tmp"], "unique_id": "model.shopify_source.stg_shopify__product_variant_tmp", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify_source", "path": "tmp/stg_shopify__product_variant_tmp.sql", "original_file_path": "models/tmp/stg_shopify__product_variant_tmp.sql", "name": "stg_shopify__product_variant_tmp", "alias": "stg_shopify__product_variant_tmp", "checksum": {"name": "sha256", "checksum": "cbb9a84c332f17d90ad953536a449714fac6f77f871da604d43ffb846f6d5621"}, "tags": [], "refs": [], "sources": [["shopify", "product_variant"]], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/tmp/stg_shopify__product_variant_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify_combo", "materialized": "view"}, "created_at": 1641410291.5115032, "compiled_sql": "\n\n\n\n select * \n from `fivetran-db`.`shopify`.`product_variant`\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_transformations`.`stg_shopify__product_variant_tmp`"}, "model.shopify_source.stg_shopify__order_tmp": {"raw_sql": "{{\n fivetran_utils.union_data(\n table_identifier='order', \n database_variable='shopify_database', \n schema_variable='shopify_schema', \n default_database=target.database,\n default_schema='shopify',\n default_variable='order_source',\n union_schema_variable='shopify_union_schemas',\n union_database_variable='shopify_union_databases'\n )\n}}", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.union_data"], "nodes": ["source.shopify_source.shopify.order"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify_combo", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_transformations", "fqn": ["shopify_source", "tmp", "stg_shopify__order_tmp"], "unique_id": "model.shopify_source.stg_shopify__order_tmp", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify_source", "path": "tmp/stg_shopify__order_tmp.sql", "original_file_path": "models/tmp/stg_shopify__order_tmp.sql", "name": "stg_shopify__order_tmp", "alias": "stg_shopify__order_tmp", "checksum": {"name": "sha256", "checksum": "f4fd2563557b13c2b54531a7fa9995e496aa1b39432d729a010ddcb7e10001ae"}, "tags": [], "refs": [], "sources": [["shopify", "order"]], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/tmp/stg_shopify__order_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify_combo", "materialized": "view"}, "created_at": 1641410291.5181289, "compiled_sql": "\n\n\n\n select * \n from `fivetran-db`.`shopify`.`order`\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_transformations`.`stg_shopify__order_tmp`"}, "model.klaviyo_source.stg_klaviyo__person": {"raw_sql": "with base as (\n\n select * \n from {{ ref('stg_klaviyo__person_tmp') }}\n\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_klaviyo__person_tmp')),\n staging_columns=get_person_columns()\n )\n }}\n {{ fivetran_utils.source_relation(\n union_schema_variable='klaviyo_union_schemas', \n union_database_variable='klaviyo_union_databases') \n }}\n from base\n),\n\nfinal as (\n \n select \n id as person_id,\n address_1,\n address_2,\n city,\n country,\n zip,\n created as created_at,\n email,\n first_name || ' ' || last_name as full_name,\n latitude,\n longitude,\n organization,\n phone_number,\n region, -- state in USA\n timezone,\n title,\n updated as updated_at,\n source_relation\n \n {{ fivetran_utils.fill_pass_through_columns('klaviyo__person_pass_through_columns') }}\n\n from fields\n where not coalesce(_fivetran_deleted, false)\n)\n\nselect * from final", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.klaviyo_source.get_person_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.source_relation", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["model.klaviyo_source.stg_klaviyo__person_tmp", "model.klaviyo_source.stg_klaviyo__person_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_klaviyo_combo", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_transformations", "fqn": ["klaviyo_source", "stg_klaviyo__person"], "unique_id": "model.klaviyo_source.stg_klaviyo__person", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/klaviyo_source", "path": "stg_klaviyo__person.sql", "original_file_path": "models/stg_klaviyo__person.sql", "name": "stg_klaviyo__person", "alias": "stg_klaviyo__person", "checksum": {"name": "sha256", "checksum": "0c4d31fb3c257dff6d4c5123f3352ee790db81b766ac4f3be3b1cdb06d19b45f"}, "tags": [], "refs": [["stg_klaviyo__person_tmp"], ["stg_klaviyo__person_tmp"]], "sources": [], "description": "Table storing the profiles of all people/users interacted with. Custom columns can be passed through to downstream models via the `klaviyo__person_pass_through_columns` variable (see README for details).\n", "columns": {"person_id": {"name": "person_id", "description": "Unique ID of the user if you use your own unique identifier. Otherwise, Klaviyo recommends using the email as the primary key. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "address_1": {"name": "address_1", "description": "First line of the person's address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "address_2": {"name": "address_2", "description": "Second line of the person's address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "city": {"name": "city", "description": "City they live in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "country": {"name": "country", "description": "Country they live in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "zip": {"name": "zip", "description": "Postal code where they live.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "Timestamp of when the person's profile was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email": {"name": "email", "description": "The email address and the unique identifier for a profile.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "full_name": {"name": "full_name", "description": "Person's full name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "latitude": {"name": "latitude", "description": "Latitude of the person's location.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "longitude": {"name": "longitude", "description": "Longitude of the person's location.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization": {"name": "organization", "description": "Business organization they belong to.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "phone_number": {"name": "phone_number", "description": "Associated phone number.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "region": {"name": "region", "description": "Region or state they live in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "timezone": {"name": "timezone", "description": "Timezone they are situated in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "title": {"name": "title", "description": "Title at their business or organization.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the person profile was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_relation": {"name": "source_relation", "description": "The source where this data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioining together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "klaviyo_source://models/stg_klaviyo.yml", "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo__person.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "stg_klaviyo_combo"}, "created_at": 1641410292.377859, "compiled_sql": "with base as (\n\n select * \n from `dbt-package-testing`.`dbt_transformations`.`stg_klaviyo__person_tmp`\n\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_deleted\n \n as \n \n _fivetran_deleted\n \n, \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n address_1\n \n as \n \n address_1\n \n, \n \n \n address_2\n \n as \n \n address_2\n \n, \n \n \n city\n \n as \n \n city\n \n, \n \n \n country\n \n as \n \n country\n \n, \n \n \n created\n \n as \n \n created\n \n, \n \n \n email\n \n as \n \n email\n \n, \n \n \n first_name\n \n as \n \n first_name\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n last_name\n \n as \n \n last_name\n \n, \n \n \n latitude\n \n as \n \n latitude\n \n, \n \n \n longitude\n \n as \n \n longitude\n \n, \n \n \n organization\n \n as \n \n organization\n \n, \n \n \n phone_number\n \n as \n \n phone_number\n \n, \n \n \n region\n \n as \n \n region\n \n, \n \n \n timezone\n \n as \n \n timezone\n \n, \n \n \n title\n \n as \n \n title\n \n, \n \n \n updated\n \n as \n \n updated\n \n, \n \n \n zip\n \n as \n \n zip\n \n\n\n\n \n\n\n, cast('' as \n string\n) as source_relation\n\n\n\n from base\n),\n\nfinal as (\n \n select \n id as person_id,\n address_1,\n address_2,\n city,\n country,\n zip,\n created as created_at,\n email,\n first_name || ' ' || last_name as full_name,\n latitude,\n longitude,\n organization,\n phone_number,\n region, -- state in USA\n timezone,\n title,\n updated as updated_at,\n source_relation\n \n \n\n\n\n\n\n from fields\n where not coalesce(_fivetran_deleted, false)\n)\n\nselect * from final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_transformations`.`stg_klaviyo__person`"}, "model.klaviyo_source.stg_klaviyo__campaign": {"raw_sql": "with base as (\n\n select * \n from {{ ref('stg_klaviyo__campaign_tmp') }}\n\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_klaviyo__campaign_tmp')),\n staging_columns=get_campaign_columns()\n )\n }}\n {{ fivetran_utils.source_relation(\n union_schema_variable='klaviyo_union_schemas', \n union_database_variable='klaviyo_union_databases') \n }}\n from base\n),\n\nfinal as (\n \n select\n campaign_type,\n created as created_at,\n email_template_id,\n from_email,\n from_name,\n id as campaign_id,\n is_segmented,\n name as campaign_name,\n send_time as scheduled_to_send_at,\n sent_at,\n coalesce(status, lower(status_label)) as status,\n status_id,\n subject,\n updated as updated_at,\n source_relation\n\n from fields\n\n where not coalesce(_fivetran_deleted, false)\n)\n\nselect * from final", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.klaviyo_source.get_campaign_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.source_relation"], "nodes": ["model.klaviyo_source.stg_klaviyo__campaign_tmp", "model.klaviyo_source.stg_klaviyo__campaign_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_klaviyo_combo", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_transformations", "fqn": ["klaviyo_source", "stg_klaviyo__campaign"], "unique_id": "model.klaviyo_source.stg_klaviyo__campaign", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/klaviyo_source", "path": "stg_klaviyo__campaign.sql", "original_file_path": "models/stg_klaviyo__campaign.sql", "name": "stg_klaviyo__campaign", "alias": "stg_klaviyo__campaign", "checksum": {"name": "sha256", "checksum": "3bb055bc8484630176011790a666821ae220126184e05eaff411aa44406048e2"}, "tags": [], "refs": [["stg_klaviyo__campaign_tmp"], ["stg_klaviyo__campaign_tmp"]], "sources": [], "description": "Table capturing email campaigns in Klaviyo.\n", "columns": {"campaign_type": {"name": "campaign_type", "description": "Type of campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "Timestamp of when the campaign was created, in UTC.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email_template_id": {"name": "email_template_id", "description": "Foreign key referencing the ID of the `email_template` object that will be the content of this campaign. Note the Email Template is copied when creating this campaign, so future changes to that Email Template will not alter the content of this campaign.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "from_email": {"name": "from_email", "description": "The email address your email will be sent from and will be used in the reply-to header.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "from_name": {"name": "from_name", "description": "The name or label associated with the email address you're sending from.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Unique ID of the campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_segmented": {"name": "is_segmented", "description": "Boolean that is true if the campaign is directed at a Klaviyo segment (not a list).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_name": {"name": "campaign_name", "description": "A name for this campaign. If not specified, this will default to the subject of the campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "scheduled_to_send_at": {"name": "scheduled_to_send_at", "description": "Timestamp of when the campaign is scheduled to be sent in the future, if [\"smart send time\"](https://help.klaviyo.com/hc/en-us/articles/360029794371-Smart-Send-Time-in-Klaviyo#how-to-utilize-smart-send-time3) is used. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "sent_at": {"name": "sent_at", "description": "Timestamp of when the campaign was first sent out to users.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status": {"name": "status", "description": "Current status of the campaign. Either \"draft\", \"scheduled\", \"sent\", or \"cancelled\".", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status_id": {"name": "status_id", "description": "Corresponding ID to the current status.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "subject": {"name": "subject", "description": "The subject line of the campaign's email.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the campaign was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_relation": {"name": "source_relation", "description": "The source where this data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioining together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "klaviyo_source://models/stg_klaviyo.yml", "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo__campaign.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "stg_klaviyo_combo"}, "created_at": 1641410292.3592598, "compiled_sql": "with base as (\n\n select * \n from `dbt-package-testing`.`dbt_transformations`.`stg_klaviyo__campaign_tmp`\n\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_deleted\n \n as \n \n _fivetran_deleted\n \n, \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n campaign_type\n \n as \n \n campaign_type\n \n, \n \n \n created\n \n as \n \n created\n \n, \n \n \n email_template_id\n \n as \n \n email_template_id\n \n, \n \n \n from_email\n \n as \n \n from_email\n \n, \n \n \n from_name\n \n as \n \n from_name\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n is_segmented\n \n as \n \n is_segmented\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n send_time\n \n as \n \n send_time\n \n, \n \n \n sent_at\n \n as \n \n sent_at\n \n, \n \n \n status\n \n as \n \n status\n \n, \n \n \n status_id\n \n as \n \n status_id\n \n, \n \n \n status_label\n \n as \n \n status_label\n \n, \n \n \n subject\n \n as \n \n subject\n \n, \n \n \n updated\n \n as \n \n updated\n \n\n\n\n \n\n\n, cast('' as \n string\n) as source_relation\n\n\n\n from base\n),\n\nfinal as (\n \n select\n campaign_type,\n created as created_at,\n email_template_id,\n from_email,\n from_name,\n id as campaign_id,\n is_segmented,\n name as campaign_name,\n send_time as scheduled_to_send_at,\n sent_at,\n coalesce(status, lower(status_label)) as status,\n status_id,\n subject,\n updated as updated_at,\n source_relation\n\n from fields\n\n where not coalesce(_fivetran_deleted, false)\n)\n\nselect * from final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_transformations`.`stg_klaviyo__campaign`"}, "model.klaviyo_source.stg_klaviyo__metric": {"raw_sql": "with base as (\n\n select * \n from {{ ref('stg_klaviyo__metric_tmp') }}\n\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_klaviyo__metric_tmp')),\n staging_columns=get_metric_columns()\n )\n }}\n {{ fivetran_utils.source_relation(\n union_schema_variable='klaviyo_union_schemas', \n union_database_variable='klaviyo_union_databases') \n }}\n from base\n),\n\nfinal as (\n \n select \n created as created_at,\n id as metric_id,\n integration_id,\n name as metric_name,\n updated as updated_at,\n source_relation\n\n from fields\n\n where not coalesce(_fivetran_deleted, false)\n)\n\nselect * from final", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.klaviyo_source.get_metric_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.source_relation"], "nodes": ["model.klaviyo_source.stg_klaviyo__metric_tmp", "model.klaviyo_source.stg_klaviyo__metric_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_klaviyo_combo", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_transformations", "fqn": ["klaviyo_source", "stg_klaviyo__metric"], "unique_id": "model.klaviyo_source.stg_klaviyo__metric", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/klaviyo_source", "path": "stg_klaviyo__metric.sql", "original_file_path": "models/stg_klaviyo__metric.sql", "name": "stg_klaviyo__metric", "alias": "stg_klaviyo__metric", "checksum": {"name": "sha256", "checksum": "d131ba8b5c6b489c12dc687514ef82b359aecaa82175b66d77fa44344b4eb58f"}, "tags": [], "refs": [["stg_klaviyo__metric_tmp"], ["stg_klaviyo__metric_tmp"]], "sources": [], "description": "Table of tracked metrics across integrations in Klaviyo.", "columns": {"created_at": {"name": "created_at", "description": "Timestamp of when the metric was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "metric_id": {"name": "metric_id", "description": "Unique ID of the metric being tracked.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "integration_id": {"name": "integration_id", "description": "Foreign key referencing the INTEGRATION that the metric is being pulled from.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "metric_name": {"name": "metric_name", "description": "Name of the metric (same as `EVENT.type`)", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the metric was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_relation": {"name": "source_relation", "description": "The source where this data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioining together multiple sources, this will be an empty string.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "klaviyo_source://models/stg_klaviyo.yml", "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo__metric.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "stg_klaviyo_combo"}, "created_at": 1641410292.3805802, "compiled_sql": "with base as (\n\n select * \n from `dbt-package-testing`.`dbt_transformations`.`stg_klaviyo__metric_tmp`\n\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_deleted\n \n as \n \n _fivetran_deleted\n \n, \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n created\n \n as \n \n created\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n integration_id\n \n as \n \n integration_id\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n updated\n \n as \n \n updated\n \n\n\n\n \n\n\n, cast('' as \n string\n) as source_relation\n\n\n\n from base\n),\n\nfinal as (\n \n select \n created as created_at,\n id as metric_id,\n integration_id,\n name as metric_name,\n updated as updated_at,\n source_relation\n\n from fields\n\n where not coalesce(_fivetran_deleted, false)\n)\n\nselect * from final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_transformations`.`stg_klaviyo__metric`"}, "model.klaviyo_source.stg_klaviyo__integration": {"raw_sql": "with base as (\n\n select * \n from {{ ref('stg_klaviyo__integration_tmp') }}\n\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_klaviyo__integration_tmp')),\n staging_columns=get_integration_columns()\n )\n }}\n {{ fivetran_utils.source_relation(\n union_schema_variable='klaviyo_union_schemas', \n union_database_variable='klaviyo_union_databases') \n }}\n from base\n),\n\nfinal as (\n \n select \n category,\n id as integration_id,\n name as integration_name,\n source_relation\n\n from fields\n where not coalesce(_fivetran_deleted, false)\n)\n\nselect * from final", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.klaviyo_source.get_integration_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.source_relation"], "nodes": ["model.klaviyo_source.stg_klaviyo__integration_tmp", "model.klaviyo_source.stg_klaviyo__integration_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_klaviyo_combo", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_transformations", "fqn": ["klaviyo_source", "stg_klaviyo__integration"], "unique_id": "model.klaviyo_source.stg_klaviyo__integration", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/klaviyo_source", "path": "stg_klaviyo__integration.sql", "original_file_path": "models/stg_klaviyo__integration.sql", "name": "stg_klaviyo__integration", "alias": "stg_klaviyo__integration", "checksum": {"name": "sha256", "checksum": "cf1d2569260342f615850f5d782fb0e166d1b70ea3a703fb2248d6f457023cf8"}, "tags": [], "refs": [["stg_klaviyo__integration_tmp"], ["stg_klaviyo__integration_tmp"]], "sources": [], "description": "Table storing third-party platforms integrated into Klaviyo.", "columns": {"category": {"name": "category", "description": "Use-case category of the integrated platform.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "integration_id": {"name": "integration_id", "description": "Unique ID of the integration.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "integration_name": {"name": "integration_name", "description": "Name of the integrated platform.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_relation": {"name": "source_relation", "description": "The source where this data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioining together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "klaviyo_source://models/stg_klaviyo.yml", "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo__integration.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "stg_klaviyo_combo"}, "created_at": 1641410292.370476, "compiled_sql": "with base as (\n\n select * \n from `dbt-package-testing`.`dbt_transformations`.`stg_klaviyo__integration_tmp`\n\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_deleted\n \n as \n \n _fivetran_deleted\n \n, \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n category\n \n as \n \n category\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 \n\n\n, cast('' as \n string\n) as source_relation\n\n\n\n from base\n),\n\nfinal as (\n \n select \n category,\n id as integration_id,\n name as integration_name,\n source_relation\n\n from fields\n where not coalesce(_fivetran_deleted, false)\n)\n\nselect * from final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_transformations`.`stg_klaviyo__integration`"}, "model.klaviyo_source.stg_klaviyo__flow": {"raw_sql": "with base as (\n\n select * \n from {{ ref('stg_klaviyo__flow_tmp') }}\n\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_klaviyo__flow_tmp')),\n staging_columns=get_flow_columns()\n )\n }}\n {{ fivetran_utils.source_relation(\n union_schema_variable='klaviyo_union_schemas', \n union_database_variable='klaviyo_union_databases') \n }}\n from base\n),\n\nfinal as (\n \n select \n created as created_at,\n id as flow_id,\n name as flow_name,\n status,\n {% if target.type == 'snowflake'%}\n \"TRIGGER\" \n {% else %}\n trigger\n {% endif %}\n as flow_trigger,\n updated as updated_at,\n customer_filter as person_filter,\n source_relation\n\n from fields\n where not coalesce(_fivetran_deleted, false)\n)\n\nselect * from final", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.klaviyo_source.get_flow_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.source_relation"], "nodes": ["model.klaviyo_source.stg_klaviyo__flow_tmp", "model.klaviyo_source.stg_klaviyo__flow_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_klaviyo_combo", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_transformations", "fqn": ["klaviyo_source", "stg_klaviyo__flow"], "unique_id": "model.klaviyo_source.stg_klaviyo__flow", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/klaviyo_source", "path": "stg_klaviyo__flow.sql", "original_file_path": "models/stg_klaviyo__flow.sql", "name": "stg_klaviyo__flow", "alias": "stg_klaviyo__flow", "checksum": {"name": "sha256", "checksum": "a74ad01e8fbca823f7ec229f1d0c59171c4a1200e314cb06e0ac75da0bc72792"}, "tags": [], "refs": [["stg_klaviyo__flow_tmp"], ["stg_klaviyo__flow_tmp"]], "sources": [], "description": "Table of automated, triggered flow sequences in Klaviyo.", "columns": {"created_at": {"name": "created_at", "description": "Timestamp of when the flow was first created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_id": {"name": "flow_id", "description": "Unique ID of the flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_name": {"name": "flow_name", "description": "Name of the flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status": {"name": "status", "description": "Current status of the flow. Either 'manual', 'live', or 'draft'. Read more [here](https://help.klaviyo.com/hc/en-us/articles/115002774932-Getting-Started-with-Flows#the-flow-action-status9).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_trigger": {"name": "flow_trigger", "description": "JSON of metric, segment, list, and/or date-property filters that will trigger this flow. These are applied to the **event level**.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the flow was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "person_filter": {"name": "person_filter", "description": "JSON of flow filters placed on the **person level** that will trigger this flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_relation": {"name": "source_relation", "description": "The source where this data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioining together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "klaviyo_source://models/stg_klaviyo.yml", "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo__flow.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "stg_klaviyo_combo"}, "created_at": 1641410292.368374, "compiled_sql": "with base as (\n\n select * \n from `dbt-package-testing`.`dbt_transformations`.`stg_klaviyo__flow_tmp`\n\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_deleted\n \n as \n \n _fivetran_deleted\n \n, \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n created\n \n as \n \n created\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 status\n \n as \n \n status\n \n, \n \n \n \n \n `trigger`\n \n \n \n as \n \n \n \n `trigger`\n \n \n \n, \n \n \n updated\n \n as \n \n updated\n \n, \n \n \n customer_filter\n \n as \n \n customer_filter\n \n\n\n\n \n\n\n, cast('' as \n string\n) as source_relation\n\n\n\n from base\n),\n\nfinal as (\n \n select \n created as created_at,\n id as flow_id,\n name as flow_name,\n status,\n \n trigger\n \n as flow_trigger,\n updated as updated_at,\n customer_filter as person_filter,\n source_relation\n\n from fields\n where not coalesce(_fivetran_deleted, false)\n)\n\nselect * from final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_transformations`.`stg_klaviyo__flow`"}, "model.klaviyo_source.stg_klaviyo__event": {"raw_sql": "with base as (\n\n select * \n from {{ ref('stg_klaviyo__event_tmp') }}\n\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_klaviyo__event_tmp')),\n staging_columns=get_event_columns()\n )\n }}\n {{ fivetran_utils.source_relation(\n union_schema_variable='klaviyo_union_schemas', \n union_database_variable='klaviyo_union_databases') \n }}\n from base\n),\n\nrename as (\n \n select \n _variation as variation_id,\n campaign_id,\n cast(timestamp as {{ dbt_utils.type_timestamp() }} ) as occurred_at,\n flow_id,\n flow_message_id,\n id as event_id,\n metric_id,\n person_id,\n type,\n uuid,\n property_value as numeric_value,\n _fivetran_synced,\n source_relation\n\n {{ fivetran_utils.fill_pass_through_columns('klaviyo__event_pass_through_columns') }}\n\n from fields\n where not coalesce(_fivetran_deleted, false)\n),\n\nfinal as (\n \n select \n *,\n cast( {{ dbt_utils.date_trunc('day', 'occurred_at') }} as date) as occurred_on,\n {{ dbt_utils.surrogate_key(['event_id', 'source_relation']) }} as unique_event_id\n\n from rename\n\n)\n\nselect * from final", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.klaviyo_source.get_event_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.source_relation", "macro.dbt_utils.type_timestamp", "macro.fivetran_utils.fill_pass_through_columns", "macro.dbt_utils.date_trunc", "macro.dbt_utils.surrogate_key"], "nodes": ["model.klaviyo_source.stg_klaviyo__event_tmp", "model.klaviyo_source.stg_klaviyo__event_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_klaviyo_combo", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_transformations", "fqn": ["klaviyo_source", "stg_klaviyo__event"], "unique_id": "model.klaviyo_source.stg_klaviyo__event", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/klaviyo_source", "path": "stg_klaviyo__event.sql", "original_file_path": "models/stg_klaviyo__event.sql", "name": "stg_klaviyo__event", "alias": "stg_klaviyo__event", "checksum": {"name": "sha256", "checksum": "3f6b83c7355226d28545f2ef688933906d57e1acdd0b840bb6a504cae3b3bba5"}, "tags": [], "refs": [["stg_klaviyo__event_tmp"], ["stg_klaviyo__event_tmp"]], "sources": [], "description": "Table of events (and metrics) triggered in Klaviyo or via its integrations. Custom columns can be passed through to downstream models via the `klaviyo__event_pass_through_columns` variable (see README for details).\n", "columns": {"variation_id": {"name": "variation_id", "description": "Unique ID of the attributed flow or campaign variation group. This does not map onto another table. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Foreign key referencing the CAMPAIGN that the event is attributed to.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "occurred_at": {"name": "occurred_at", "description": "Timestamp of when the event was triggered.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_id": {"name": "flow_id", "description": "Foreign key referencing the FLOW that the event is attributed to.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_message_id": {"name": "flow_message_id", "description": "Unique ID of the FLOW_MESSAGE that the event is attributed to. This does not map onto another table.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "event_id": {"name": "event_id", "description": "Unique ID of the event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "metric_id": {"name": "metric_id", "description": "Foreign key referencing the metric being captured.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "person_id": {"name": "person_id", "description": "Foreign key referencing the PERSON who triggered the event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "type": {"name": "type", "description": "Type of event that was triggered. This is the same as the METRIC name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "uuid": {"name": "uuid", "description": "Universally Unique Identifier of the event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "numeric_value": {"name": "numeric_value", "description": "Numeric value associated with the event (ie the dollars associated with a purchase).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "occurred_on": {"name": "occurred_on", "description": "Calendar date (UTC) on which the event occurred.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_relation": {"name": "source_relation", "description": "The source where this data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioining together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "unique_event_id": {"name": "unique_event_id", "description": "The unique identifier for the combination of event_id and source_relation columns.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "klaviyo_source://models/stg_klaviyo.yml", "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo__event.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "stg_klaviyo_combo"}, "created_at": 1641410292.3649979, "compiled_sql": "with base as (\n\n select * \n from `dbt-package-testing`.`dbt_transformations`.`stg_klaviyo__event_tmp`\n\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_deleted\n \n as \n \n _fivetran_deleted\n \n, \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n _variation\n \n as \n \n _variation\n \n, \n \n \n campaign_id\n \n as \n \n campaign_id\n \n, \n \n \n datetime\n \n as \n \n datetime\n \n, \n \n \n flow_id\n \n as \n \n flow_id\n \n, \n \n \n flow_message_id\n \n as \n \n flow_message_id\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n metric_id\n \n as \n \n metric_id\n \n, \n \n \n person_id\n \n as \n \n person_id\n \n, \n \n \n timestamp\n \n as \n \n timestamp\n \n, \n \n \n type\n \n as \n \n type\n \n, \n \n \n uuid\n \n as \n \n uuid\n \n, \n \n \n property_value\n \n as \n \n property_value\n \n\n\n\n \n\n\n, cast('' as \n string\n) as source_relation\n\n\n\n from base\n),\n\nrename as (\n \n select \n _variation as variation_id,\n campaign_id,\n cast(timestamp as \n timestamp\n ) as occurred_at,\n flow_id,\n flow_message_id,\n id as event_id,\n metric_id,\n person_id,\n type,\n uuid,\n property_value as numeric_value,\n _fivetran_synced,\n source_relation\n\n \n\n\n\n\n\n from fields\n where not coalesce(_fivetran_deleted, false)\n),\n\nfinal as (\n \n select \n *,\n cast( \n timestamp_trunc(\n cast(occurred_at as timestamp),\n day\n )\n\n as date) as occurred_on,\n to_hex(md5(cast(coalesce(cast(event_id as \n string\n), '') || '-' || coalesce(cast(source_relation as \n string\n), '') as \n string\n))) as unique_event_id\n\n from rename\n\n)\n\nselect * from final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_transformations`.`stg_klaviyo__event`"}, "model.klaviyo_source.stg_klaviyo__event_tmp": {"raw_sql": "{{\n fivetran_utils.union_data(\n table_identifier='event', \n database_variable='klaviyo_database', \n schema_variable='klaviyo_schema', \n default_database=target.database,\n default_schema='klaviyo',\n default_variable='event_table',\n union_schema_variable='klaviyo_union_schemas',\n union_database_variable='klaviyo_union_databases'\n )\n}}", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.union_data"], "nodes": ["source.klaviyo_source.klaviyo.event"]}, "config": {"enabled": true, "alias": null, "schema": "stg_klaviyo_combo", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_transformations", "fqn": ["klaviyo_source", "tmp", "stg_klaviyo__event_tmp"], "unique_id": "model.klaviyo_source.stg_klaviyo__event_tmp", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/klaviyo_source", "path": "tmp/stg_klaviyo__event_tmp.sql", "original_file_path": "models/tmp/stg_klaviyo__event_tmp.sql", "name": "stg_klaviyo__event_tmp", "alias": "stg_klaviyo__event_tmp", "checksum": {"name": "sha256", "checksum": "0aa5096828da6b1f75fb7a93d5f7621f024adb2ef241014a075abae8511fb337"}, "tags": [], "refs": [], "sources": [["klaviyo", "event"]], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/tmp/stg_klaviyo__event_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "stg_klaviyo_combo"}, "created_at": 1641410291.668515, "compiled_sql": "\n\n\n\n select * \n from `fivetran-db`.`klaviyo`.`event`\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_transformations`.`stg_klaviyo__event_tmp`"}, "model.klaviyo_source.stg_klaviyo__metric_tmp": {"raw_sql": "{{\n fivetran_utils.union_data(\n table_identifier='metric', \n database_variable='klaviyo_database', \n schema_variable='klaviyo_schema', \n default_database=target.database,\n default_schema='klaviyo',\n default_variable='metric',\n union_schema_variable='klaviyo_union_schemas',\n union_database_variable='klaviyo_union_databases'\n )\n}}", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.union_data"], "nodes": ["source.klaviyo_source.klaviyo.metric"]}, "config": {"enabled": true, "alias": null, "schema": "stg_klaviyo_combo", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_transformations", "fqn": ["klaviyo_source", "tmp", "stg_klaviyo__metric_tmp"], "unique_id": "model.klaviyo_source.stg_klaviyo__metric_tmp", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/klaviyo_source", "path": "tmp/stg_klaviyo__metric_tmp.sql", "original_file_path": "models/tmp/stg_klaviyo__metric_tmp.sql", "name": "stg_klaviyo__metric_tmp", "alias": "stg_klaviyo__metric_tmp", "checksum": {"name": "sha256", "checksum": "1f887542c817cae88b22c9632e93da3ae5fa6c02dadc22e8901484b55e4c5f2d"}, "tags": [], "refs": [], "sources": [["klaviyo", "metric"]], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/tmp/stg_klaviyo__metric_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "stg_klaviyo_combo"}, "created_at": 1641410291.675343, "compiled_sql": "\n\n\n\n select * \n from `fivetran-db`.`klaviyo`.`metric`\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_transformations`.`stg_klaviyo__metric_tmp`"}, "model.klaviyo_source.stg_klaviyo__campaign_tmp": {"raw_sql": "{{\n fivetran_utils.union_data(\n table_identifier='campaign', \n database_variable='klaviyo_database', \n schema_variable='klaviyo_schema', \n default_database=target.database,\n default_schema='klaviyo',\n default_variable='campaign',\n union_schema_variable='klaviyo_union_schemas',\n union_database_variable='klaviyo_union_databases'\n )\n}}", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.union_data"], "nodes": ["source.klaviyo_source.klaviyo.campaign"]}, "config": {"enabled": true, "alias": null, "schema": "stg_klaviyo_combo", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_transformations", "fqn": ["klaviyo_source", "tmp", "stg_klaviyo__campaign_tmp"], "unique_id": "model.klaviyo_source.stg_klaviyo__campaign_tmp", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/klaviyo_source", "path": "tmp/stg_klaviyo__campaign_tmp.sql", "original_file_path": "models/tmp/stg_klaviyo__campaign_tmp.sql", "name": "stg_klaviyo__campaign_tmp", "alias": "stg_klaviyo__campaign_tmp", "checksum": {"name": "sha256", "checksum": "f494e0b1c1093180196545a7c05c0f8f7f8ed074e63328057021091c1d776530"}, "tags": [], "refs": [], "sources": [["klaviyo", "campaign"]], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/tmp/stg_klaviyo__campaign_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "stg_klaviyo_combo"}, "created_at": 1641410291.682503, "compiled_sql": "\n\n\n\n select * \n from `fivetran-db`.`klaviyo`.`campaign`\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_transformations`.`stg_klaviyo__campaign_tmp`"}, "model.klaviyo_source.stg_klaviyo__integration_tmp": {"raw_sql": "{{\n fivetran_utils.union_data(\n table_identifier='integration', \n database_variable='klaviyo_database', \n schema_variable='klaviyo_schema', \n default_database=target.database,\n default_schema='klaviyo',\n default_variable='integration',\n union_schema_variable='klaviyo_union_schemas',\n union_database_variable='klaviyo_union_databases'\n )\n}}", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.union_data"], "nodes": ["source.klaviyo_source.klaviyo.integration"]}, "config": {"enabled": true, "alias": null, "schema": "stg_klaviyo_combo", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_transformations", "fqn": ["klaviyo_source", "tmp", "stg_klaviyo__integration_tmp"], "unique_id": "model.klaviyo_source.stg_klaviyo__integration_tmp", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/klaviyo_source", "path": "tmp/stg_klaviyo__integration_tmp.sql", "original_file_path": "models/tmp/stg_klaviyo__integration_tmp.sql", "name": "stg_klaviyo__integration_tmp", "alias": "stg_klaviyo__integration_tmp", "checksum": {"name": "sha256", "checksum": "174b16d87563e123fb0d813d3749c31fb80fc08df48143729e28f34bce0a2e04"}, "tags": [], "refs": [], "sources": [["klaviyo", "integration"]], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/tmp/stg_klaviyo__integration_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "stg_klaviyo_combo"}, "created_at": 1641410291.6898901, "compiled_sql": "\n\n\n\n select * \n from `fivetran-db`.`klaviyo`.`integration`\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_transformations`.`stg_klaviyo__integration_tmp`"}, "model.klaviyo_source.stg_klaviyo__flow_tmp": {"raw_sql": "{{\n fivetran_utils.union_data(\n table_identifier='flow', \n database_variable='klaviyo_database', \n schema_variable='klaviyo_schema', \n default_database=target.database,\n default_schema='klaviyo',\n default_variable='flow',\n union_schema_variable='klaviyo_union_schemas',\n union_database_variable='klaviyo_union_databases'\n )\n}}", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.union_data"], "nodes": ["source.klaviyo_source.klaviyo.flow"]}, "config": {"enabled": true, "alias": null, "schema": "stg_klaviyo_combo", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_transformations", "fqn": ["klaviyo_source", "tmp", "stg_klaviyo__flow_tmp"], "unique_id": "model.klaviyo_source.stg_klaviyo__flow_tmp", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/klaviyo_source", "path": "tmp/stg_klaviyo__flow_tmp.sql", "original_file_path": "models/tmp/stg_klaviyo__flow_tmp.sql", "name": "stg_klaviyo__flow_tmp", "alias": "stg_klaviyo__flow_tmp", "checksum": {"name": "sha256", "checksum": "4437a7971622b8cd114313ee2b1a59b992ba862c49f0086851d5d60082617b0c"}, "tags": [], "refs": [], "sources": [["klaviyo", "flow"]], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/tmp/stg_klaviyo__flow_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "stg_klaviyo_combo"}, "created_at": 1641410291.6976, "compiled_sql": "\n\n\n\n select * \n from `fivetran-db`.`klaviyo`.`flow`\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_transformations`.`stg_klaviyo__flow_tmp`"}, "model.klaviyo_source.stg_klaviyo__person_tmp": {"raw_sql": "{{\n fivetran_utils.union_data(\n table_identifier='person', \n database_variable='klaviyo_database', \n schema_variable='klaviyo_schema', \n default_database=target.database,\n default_schema='klaviyo',\n default_variable='person',\n union_schema_variable='klaviyo_union_schemas',\n union_database_variable='klaviyo_union_databases'\n )\n}}", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.union_data"], "nodes": ["source.klaviyo_source.klaviyo.person"]}, "config": {"enabled": true, "alias": null, "schema": "stg_klaviyo_combo", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_transformations", "fqn": ["klaviyo_source", "tmp", "stg_klaviyo__person_tmp"], "unique_id": "model.klaviyo_source.stg_klaviyo__person_tmp", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/klaviyo_source", "path": "tmp/stg_klaviyo__person_tmp.sql", "original_file_path": "models/tmp/stg_klaviyo__person_tmp.sql", "name": "stg_klaviyo__person_tmp", "alias": "stg_klaviyo__person_tmp", "checksum": {"name": "sha256", "checksum": "ec768db1c8d1d5eb47e967bf23bb95726133d2a298373f757930302de96e2910"}, "tags": [], "refs": [], "sources": [["klaviyo", "person"]], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/tmp/stg_klaviyo__person_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "stg_klaviyo_combo"}, "created_at": 1641410291.7044191, "compiled_sql": "\n\n\n\n select * \n from `fivetran-db`.`klaviyo`.`person`\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_transformations`.`stg_klaviyo__person_tmp`"}, "model.klaviyo.klaviyo__person_campaign_flow": {"raw_sql": "with events as (\n select *\n from {{ ref('klaviyo__events') }}\n),\n\npivot_out_events as (\n \n select \n person_id,\n last_touch_campaign_id,\n last_touch_flow_id,\n campaign_name,\n flow_name,\n variation_id,\n source_relation,\n min(occurred_at) as first_event_at,\n max(occurred_at) as last_event_at\n\n -- sum up the numeric value associated with events (most likely will mean revenue)\n {% for rm in var('klaviyo__sum_revenue_metrics') %}\n , sum(case when lower(type) = '{{ rm | lower }}' then numeric_value else 0 end) \n as {{ 'sum_revenue_' ~ rm | replace(' ', '_') | replace('(', '') | replace(')', '') | lower }} -- removing special characters that I have seen in different integration events\n {% endfor %}\n\n -- count up the number of instances of each metric\n {% for cm in var('klaviyo__count_metrics') %}\n , sum(case when lower(type) = '{{ cm | lower }}' then 1 else 0 end) \n as {{ 'count_' ~ cm | replace(' ', '_') | replace('(', '') | replace(')', '') | lower }} -- removing special characters that I have seen in different integration events\n {% endfor %}\n\n from events\n {{ dbt_utils.group_by(n=7) }}\n)\n\nselect *\nfrom pivot_out_events", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt_utils.group_by"], "nodes": ["model.klaviyo.klaviyo__events"]}, "config": {"enabled": true, "alias": null, "schema": "klaviyo_combo", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_transformations", "fqn": ["klaviyo", "klaviyo__person_campaign_flow"], "unique_id": "model.klaviyo.klaviyo__person_campaign_flow", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/klaviyo", "path": "klaviyo__person_campaign_flow.sql", "original_file_path": "models/klaviyo__person_campaign_flow.sql", "name": "klaviyo__person_campaign_flow", "alias": "klaviyo__person_campaign_flow", "checksum": {"name": "sha256", "checksum": "6ef3f4e9610babaeb6eb4147c2c28d0ab04c02af569f2c706441f3deade18e60"}, "tags": [], "refs": [["klaviyo__events"]], "sources": [], "description": "Table that aggregates event metrics to the person-campaign or -flow grain (but note that if a user interacts with 2 different variations of a flow/campaign somehow, they will have 2 records). Also note that organic interactions (someone with null campaign_id/flow_id) are included in this table. \n**Counts** of the instances of the events, as well as **sums** of the numeric value associated with events (i.e. revenue) will be pivoted out into columns, as configured by the `klaviyo__count_metrics` and `klaviyo__sum_revenue_metrics` variables, respectively. See the dbt_project.yml file for the default metrics used. These columns will be prefixed with `count_` and `sum_revenue_`.\n", "columns": {"person_id": {"name": "person_id", "description": "Foreign key referencing the PERSON who interacted with the flow/message.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_campaign_id": {"name": "last_touch_campaign_id", "description": "Foreign key referencing the CAMPAIGN attributed with these metrics (by the package's attribution model).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_flow_id": {"name": "last_touch_flow_id", "description": "Foreign key referencing the FLOW attributed with these metrics (by the package's attribution model).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_name": {"name": "campaign_name", "description": "A name for this campaign. If not specified, this will default to the subject of the campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_name": {"name": "flow_name", "description": "Name of the flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variation_id": {"name": "variation_id", "description": "Unique ID of the attributed flow or campaign variation group. This does not map onto another table. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_event_at": {"name": "first_event_at", "description": "Timestamp of the first ever interaction between this campaign/flow and a person. In other words, the first event trigger attributed to the campaign/flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_event_at": {"name": "last_event_at", "description": "Timestamp of the most recent interaction between this campaign/flow and a person. In other words, the last event trigger attributed to the campaign/flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_relation": {"name": "source_relation", "description": "The source where this data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioining together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "klaviyo://models/klaviyo.yml", "compiled_path": "target/compiled/klaviyo/models/klaviyo__person_campaign_flow.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "klaviyo_combo"}, "created_at": 1641410292.4848058, "compiled_sql": "with events as (\n select *\n from `dbt-package-testing`.`dbt_transformations`.`klaviyo__events`\n),\n\npivot_out_events as (\n \n select \n person_id,\n last_touch_campaign_id,\n last_touch_flow_id,\n campaign_name,\n flow_name,\n variation_id,\n source_relation,\n min(occurred_at) as first_event_at,\n max(occurred_at) as last_event_at\n\n -- sum up the numeric value associated with events (most likely will mean revenue)\n \n , sum(case when lower(type) = 'refunded order' then numeric_value else 0 end) \n as sum_revenue_refunded_order -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'placed order' then numeric_value else 0 end) \n as sum_revenue_placed_order -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'ordered product' then numeric_value else 0 end) \n as sum_revenue_ordered_product -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'checkout started' then numeric_value else 0 end) \n as sum_revenue_checkout_started -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'cancelled order' then numeric_value else 0 end) \n as sum_revenue_cancelled_order -- removing special characters that I have seen in different integration events\n \n\n -- count up the number of instances of each metric\n \n , sum(case when lower(type) = 'active on site' then 1 else 0 end) \n as count_active_on_site -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'viewed product' then 1 else 0 end) \n as count_viewed_product -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'ordered product' then 1 else 0 end) \n as count_ordered_product -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'placed order' then 1 else 0 end) \n as count_placed_order -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'refunded order' then 1 else 0 end) \n as count_refunded_order -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'received email' then 1 else 0 end) \n as count_received_email -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'clicked email' then 1 else 0 end) \n as count_clicked_email -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'opened email' then 1 else 0 end) \n as count_opened_email -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'marked email as spam' then 1 else 0 end) \n as count_marked_email_as_spam -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'unsubscribed' then 1 else 0 end) \n as count_unsubscribed -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'received sms' then 1 else 0 end) \n as count_received_sms -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'clicked sms' then 1 else 0 end) \n as count_clicked_sms -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'sent sms' then 1 else 0 end) \n as count_sent_sms -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'unsubscribed from sms' then 1 else 0 end) \n as count_unsubscribed_from_sms -- removing special characters that I have seen in different integration events\n \n\n from events\n group by 1,2,3,4,5,6,7\n)\n\nselect *\nfrom pivot_out_events", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_transformations`.`klaviyo__person_campaign_flow`"}, "model.klaviyo.klaviyo__persons": {"raw_sql": "with person as (\n\n select *\n from {{ var('person') }}\n),\n\nperson_metrics as (\n\n select *\n from {{ ref('int_klaviyo__person_metrics') }}\n),\n\nperson_join as (\n\n select\n person.*,\n {{ dbt_utils.star(from=ref('int_klaviyo__person_metrics'), except=[\"person_id\", \"source_relation\"]) }}\n\n from person\n left join person_metrics on (\n person.person_id = person_metrics.person_id\n and person.source_relation = person_metrics.source_relation\n )\n\n)\n\nselect *\nfrom person_join", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": ["model.klaviyo_source.stg_klaviyo__person", "model.klaviyo.int_klaviyo__person_metrics", "model.klaviyo.int_klaviyo__person_metrics"]}, "config": {"enabled": true, "alias": null, "schema": "klaviyo_combo", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_transformations", "fqn": ["klaviyo", "klaviyo__persons"], "unique_id": "model.klaviyo.klaviyo__persons", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/klaviyo", "path": "klaviyo__persons.sql", "original_file_path": "models/klaviyo__persons.sql", "name": "klaviyo__persons", "alias": "klaviyo__persons", "checksum": {"name": "sha256", "checksum": "4228e8c8280040f57997ecd7d0cd1c726cee6789721533903c2f75ad6cefc473"}, "tags": [], "refs": [["stg_klaviyo__person"], ["int_klaviyo__person_metrics"], ["int_klaviyo__person_metrics"]], "sources": [], "description": "Table of unique person profiles, enhanced with event, campaign, flow, and revenue metrics. \n**Counts** of instances of triggered events and **sums** of the numeric value (i.e. revenue) associated with events (total vs organic/not attributed to flows or campaigns) will be pivoted out into columns, as configured by the `klaviyo__count_metrics` and `klaviyo__sum_revenue_metrics`variables, respectively. See the dbt_project.yml file for the default metrics used. These columns will be prefixed with `total_count_`, `total_sum_revenue_` (organic + attributed), and `organic_sum_revenue_` (not attributed to a campaign or flow). \n", "columns": {"person_id": {"name": "person_id", "description": "Unique ID of the user if you use your own unique identifier. Otherwise, Klaviyo recommends using the email as the primary key. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "address_1": {"name": "address_1", "description": "First line of the person's address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "address_2": {"name": "address_2", "description": "Second line of the person's address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "city": {"name": "city", "description": "City they live in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "country": {"name": "country", "description": "Country they live in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "zip": {"name": "zip", "description": "Postal code where they live.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "Timestamp of when the person's profile was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email": {"name": "email", "description": "The email address and the unique identifier for a profile.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "full_name": {"name": "full_name", "description": "Person's full name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "latitude": {"name": "latitude", "description": "Latitude of the person's location.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "longitude": {"name": "longitude", "description": "Longitude of the person's location.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization": {"name": "organization", "description": "Business organization they belong to.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "phone_number": {"name": "phone_number", "description": "Associated phone number.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "region": {"name": "region", "description": "Region or state they live in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "timezone": {"name": "timezone", "description": "Timezone they are situated in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "title": {"name": "title", "description": "Title at their business or organization.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the person profile was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "count_total_campaigns": {"name": "count_total_campaigns", "description": "Count of the number of campaigns this person has interacted with.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "count_total_flows": {"name": "count_total_flows", "description": "Count of the number of flows this person has interacted with.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_event_at": {"name": "first_event_at", "description": "Timestamp of when the user first triggered an event (not limited to campaign and flow interactions).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_event_at": {"name": "last_event_at", "description": "Timestamp of when the user last triggered an event (not limited to campaign and flow interactions).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_campaign_touch_at": {"name": "first_campaign_touch_at", "description": "Timestamp of when the user first interacted with a campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_campaign_touch_at": {"name": "last_campaign_touch_at", "description": "Timestamp of when the user last interacted with a campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_flow_touch_at": {"name": "first_flow_touch_at", "description": "Timestamp of when the user first interacted with a flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_flow_touch_at": {"name": "last_flow_touch_at", "description": "Timestamp of when the user last interacted with a flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_relation": {"name": "source_relation", "description": "The source where this data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioining together multiple sources, this will be an empty string.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "klaviyo://models/klaviyo.yml", "compiled_path": "target/compiled/klaviyo/models/klaviyo__persons.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "klaviyo_combo"}, "created_at": 1641410292.5097878, "compiled_sql": "with person as (\n\n select *\n from `dbt-package-testing`.`dbt_transformations`.`stg_klaviyo__person`\n),\n\nperson_metrics as (\n\n select *\n from `dbt-package-testing`.`dbt_transformations`.`int_klaviyo__person_metrics`\n),\n\nperson_join as (\n\n select\n person.*,\n `count_total_campaigns` as `count_total_campaigns`,\n `count_total_flows` as `count_total_flows`,\n `first_event_at` as `first_event_at`,\n `last_event_at` as `last_event_at`,\n `first_campaign_touch_at` as `first_campaign_touch_at`,\n `last_campaign_touch_at` as `last_campaign_touch_at`,\n `first_flow_touch_at` as `first_flow_touch_at`,\n `last_flow_touch_at` as `last_flow_touch_at`,\n `total_sum_revenue_refunded_order` as `total_sum_revenue_refunded_order`,\n `organic_sum_revenue_refunded_order` as `organic_sum_revenue_refunded_order`,\n `total_sum_revenue_placed_order` as `total_sum_revenue_placed_order`,\n `organic_sum_revenue_placed_order` as `organic_sum_revenue_placed_order`,\n `total_sum_revenue_ordered_product` as `total_sum_revenue_ordered_product`,\n `organic_sum_revenue_ordered_product` as `organic_sum_revenue_ordered_product`,\n `total_sum_revenue_checkout_started` as `total_sum_revenue_checkout_started`,\n `organic_sum_revenue_checkout_started` as `organic_sum_revenue_checkout_started`,\n `total_sum_revenue_cancelled_order` as `total_sum_revenue_cancelled_order`,\n `organic_sum_revenue_cancelled_order` as `organic_sum_revenue_cancelled_order`,\n `total_count_active_on_site` as `total_count_active_on_site`,\n `total_count_viewed_product` as `total_count_viewed_product`,\n `total_count_ordered_product` as `total_count_ordered_product`,\n `total_count_placed_order` as `total_count_placed_order`,\n `total_count_refunded_order` as `total_count_refunded_order`,\n `total_count_received_email` as `total_count_received_email`,\n `total_count_clicked_email` as `total_count_clicked_email`,\n `total_count_opened_email` as `total_count_opened_email`,\n `total_count_marked_email_as_spam` as `total_count_marked_email_as_spam`,\n `total_count_unsubscribed` as `total_count_unsubscribed`,\n `total_count_received_sms` as `total_count_received_sms`,\n `total_count_clicked_sms` as `total_count_clicked_sms`,\n `total_count_sent_sms` as `total_count_sent_sms`,\n `total_count_unsubscribed_from_sms` as `total_count_unsubscribed_from_sms`\n\n from person\n left join person_metrics on (\n person.person_id = person_metrics.person_id\n and person.source_relation = person_metrics.source_relation\n )\n\n)\n\nselect *\nfrom person_join", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_transformations`.`klaviyo__persons`"}, "model.klaviyo.klaviyo__flows": {"raw_sql": "with flow as (\n\n select *\n from {{ var('flow') }}\n),\n\nflow_metrics as (\n\n select *\n from {{ ref('int_klaviyo__campaign_flow_metrics') }}\n),\n\nflow_join as (\n \n {% set exclude_fields = ['last_touch_campaign_id', 'last_touch_flow_id', 'source_relation'] %}\n\n select\n flow.*, -- has flow_id and source_relation\n {{ dbt_utils.star(from=ref('int_klaviyo__campaign_flow_metrics'), except=exclude_fields) }}\n\n from flow\n left join flow_metrics on (\n flow.flow_id = flow_metrics.last_touch_flow_id\n and\n flow.source_relation = flow_metrics.source_relation\n )\n),\n\nfinal as (\n\n select \n *,\n {{ dbt_utils.surrogate_key(['flow_id','variation_id']) }} as flow_variation_key\n\n from flow_join\n)\n\nselect *\nfrom final", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt_utils.star", "macro.dbt_utils.surrogate_key"], "nodes": ["model.klaviyo_source.stg_klaviyo__flow", "model.klaviyo.int_klaviyo__campaign_flow_metrics", "model.klaviyo.int_klaviyo__campaign_flow_metrics"]}, "config": {"enabled": true, "alias": null, "schema": "klaviyo_combo", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_transformations", "fqn": ["klaviyo", "klaviyo__flows"], "unique_id": "model.klaviyo.klaviyo__flows", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/klaviyo", "path": "klaviyo__flows.sql", "original_file_path": "models/klaviyo__flows.sql", "name": "klaviyo__flows", "alias": "klaviyo__flows", "checksum": {"name": "sha256", "checksum": "e51636d4194dd04fc1bd023c6aa0a982fa517a29f6734d611756bda94c123e0e"}, "tags": [], "refs": [["stg_klaviyo__flow"], ["int_klaviyo__campaign_flow_metrics"], ["int_klaviyo__campaign_flow_metrics"]], "sources": [], "description": "Table of unique flow versions. A flow with 2 variations will have 2 distinct rows. **Counts** of the unique users and instances of the events, as well as **sums** of the numeric value associated with events (i.e. revenue) will be pivoted out into columns, as configured by the `klaviyo__count_metrics` and `klaviyo__sum_revenue_metrics` variables, respectively. See the dbt_project.yml file for the default metrics used. These columns will be prefixed with `count_`, `unique_count_`, and `sum_revenue_`.\n", "columns": {"flow_variation_key": {"name": "flow_variation_key", "description": "Unique key hashed on the flow and variation IDs.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "Timestamp of when the flow was first created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_id": {"name": "flow_id", "description": "Unique ID of the flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_name": {"name": "flow_name", "description": "Name of the flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status": {"name": "status", "description": "Current status of the flow. Either 'manual', 'live', or 'draft'. Read more [here](https://help.klaviyo.com/hc/en-us/articles/115002774932-Getting-Started-with-Flows#the-flow-action-status9).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_trigger": {"name": "flow_trigger", "description": "JSON of metric, segment, list, and/or date-property filters that will trigger this flow. These are applied to the **event level**.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the flow was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "person_filter": {"name": "person_filter", "description": "JSON of flow filters placed on the **person level** that will trigger this flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variation_id": {"name": "variation_id", "description": "Unique ID of the attributed flow variation group. This does not map onto another table. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_count_unique_people": {"name": "total_count_unique_people", "description": "The count of the distinct people that have interacted with this flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_event_at": {"name": "first_event_at", "description": "Timestamp of the first ever interaction between this flow and a person.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_event_at": {"name": "last_event_at", "description": "Timestamp of the most recent interaction between this flow and a person.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_relation": {"name": "source_relation", "description": "The source where this data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioining together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "klaviyo://models/klaviyo.yml", "compiled_path": "target/compiled/klaviyo/models/klaviyo__flows.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "klaviyo_combo"}, "created_at": 1641410292.498223, "compiled_sql": "with flow as (\n\n select *\n from `dbt-package-testing`.`dbt_transformations`.`stg_klaviyo__flow`\n),\n\nflow_metrics as (\n\n select *\n from `dbt-package-testing`.`dbt_transformations`.`int_klaviyo__campaign_flow_metrics`\n),\n\nflow_join as (\n \n \n\n select\n flow.*, -- has flow_id and source_relation\n `variation_id` as `variation_id`,\n `total_count_unique_people` as `total_count_unique_people`,\n `first_event_at` as `first_event_at`,\n `last_event_at` as `last_event_at`,\n `sum_revenue_refunded_order` as `sum_revenue_refunded_order`,\n `sum_revenue_placed_order` as `sum_revenue_placed_order`,\n `sum_revenue_ordered_product` as `sum_revenue_ordered_product`,\n `sum_revenue_checkout_started` as `sum_revenue_checkout_started`,\n `sum_revenue_cancelled_order` as `sum_revenue_cancelled_order`,\n `count_active_on_site` as `count_active_on_site`,\n `unique_count_active_on_site` as `unique_count_active_on_site`,\n `count_viewed_product` as `count_viewed_product`,\n `unique_count_viewed_product` as `unique_count_viewed_product`,\n `count_ordered_product` as `count_ordered_product`,\n `unique_count_ordered_product` as `unique_count_ordered_product`,\n `count_placed_order` as `count_placed_order`,\n `unique_count_placed_order` as `unique_count_placed_order`,\n `count_refunded_order` as `count_refunded_order`,\n `unique_count_refunded_order` as `unique_count_refunded_order`,\n `count_received_email` as `count_received_email`,\n `unique_count_received_email` as `unique_count_received_email`,\n `count_clicked_email` as `count_clicked_email`,\n `unique_count_clicked_email` as `unique_count_clicked_email`,\n `count_opened_email` as `count_opened_email`,\n `unique_count_opened_email` as `unique_count_opened_email`,\n `count_marked_email_as_spam` as `count_marked_email_as_spam`,\n `unique_count_marked_email_as_spam` as `unique_count_marked_email_as_spam`,\n `count_unsubscribed` as `count_unsubscribed`,\n `unique_count_unsubscribed` as `unique_count_unsubscribed`,\n `count_received_sms` as `count_received_sms`,\n `unique_count_received_sms` as `unique_count_received_sms`,\n `count_clicked_sms` as `count_clicked_sms`,\n `unique_count_clicked_sms` as `unique_count_clicked_sms`,\n `count_sent_sms` as `count_sent_sms`,\n `unique_count_sent_sms` as `unique_count_sent_sms`,\n `count_unsubscribed_from_sms` as `count_unsubscribed_from_sms`,\n `unique_count_unsubscribed_from_sms` as `unique_count_unsubscribed_from_sms`\n\n from flow\n left join flow_metrics on (\n flow.flow_id = flow_metrics.last_touch_flow_id\n and\n flow.source_relation = flow_metrics.source_relation\n )\n),\n\nfinal as (\n\n select \n *,\n to_hex(md5(cast(coalesce(cast(flow_id as \n string\n), '') || '-' || coalesce(cast(variation_id as \n string\n), '') as \n string\n))) as flow_variation_key\n\n from flow_join\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_transformations`.`klaviyo__flows`"}, "model.klaviyo.klaviyo__campaigns": {"raw_sql": "with campaign as (\n\n select *\n from {{ var('campaign') }}\n),\n\ncampaign_metrics as (\n\n select *\n from {{ ref('int_klaviyo__campaign_flow_metrics') }}\n),\n\ncampaign_join as (\n \n {% set exclude_fields = [ 'last_touch_campaign_id', 'last_touch_flow_id', 'source_relation'] %}\n\n select\n campaign.*, -- has campaign_id and source_relation\n {{ dbt_utils.star(from=ref('int_klaviyo__campaign_flow_metrics'), except=exclude_fields) }}\n\n from campaign\n left join campaign_metrics on (\n campaign.campaign_id = campaign_metrics.last_touch_campaign_id\n and\n campaign.source_relation = campaign_metrics.source_relation\n )\n),\n\nfinal as (\n\n select \n *,\n {{ dbt_utils.surrogate_key(['campaign_id','variation_id']) }} as campaign_variation_key\n\n from campaign_join\n)\n\nselect *\nfrom final", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt_utils.star", "macro.dbt_utils.surrogate_key"], "nodes": ["model.klaviyo_source.stg_klaviyo__campaign", "model.klaviyo.int_klaviyo__campaign_flow_metrics", "model.klaviyo.int_klaviyo__campaign_flow_metrics"]}, "config": {"enabled": true, "alias": null, "schema": "klaviyo_combo", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_transformations", "fqn": ["klaviyo", "klaviyo__campaigns"], "unique_id": "model.klaviyo.klaviyo__campaigns", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/klaviyo", "path": "klaviyo__campaigns.sql", "original_file_path": "models/klaviyo__campaigns.sql", "name": "klaviyo__campaigns", "alias": "klaviyo__campaigns", "checksum": {"name": "sha256", "checksum": "3f86c2f589802530165ac6e6244681db0f42091784c29a6ae17b752f5ed4cd6f"}, "tags": [], "refs": [["stg_klaviyo__campaign"], ["int_klaviyo__campaign_flow_metrics"], ["int_klaviyo__campaign_flow_metrics"]], "sources": [], "description": "Table of unique campaign versions. A campaign with 2 variations will have 2 distinct rows. **Counts** of the unique users and instances of the events, as well as **sums** of the numeric value associated with events (i.e. revenue) will be pivoted out into columns, as configured by the `klaviyo__count_metrics` and `klaviyo__sum_revenue_metrics` variables, respectively. See the dbt_project.yml file for the default metrics used. These columns will be prefixed with `count_`, `unique_count_`, and `sum_revenue_`.\n", "columns": {"campaign_variation_key": {"name": "campaign_variation_key", "description": "Unique key hashed on the campaign and variation IDs.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_type": {"name": "campaign_type", "description": "Type of campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "Timestamp of when the campaign was created, in UTC.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email_template_id": {"name": "email_template_id", "description": "Foreign key referencing the ID of the `email_template` object that will be the content of this campaign. Note the Email Template is copied when creating this campaign, so future changes to that Email Template will not alter the content of this campaign.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "from_email": {"name": "from_email", "description": "The email address your email will be sent from and will be used in the reply-to header.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "from_name": {"name": "from_name", "description": "The name or label associated with the email address you're sending from.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Unique ID of the campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_segmented": {"name": "is_segmented", "description": "Boolean that is true if the campaign is directed at a Klaviyo segment (not a list).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_name": {"name": "campaign_name", "description": "A name for this campaign. If not specified, this will default to the subject of the campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "scheduled_to_send_at": {"name": "scheduled_to_send_at", "description": "Timestamp of when the campaign is scheduled to be sent in the future, if [\"smart send time\"](https://help.klaviyo.com/hc/en-us/articles/360029794371-Smart-Send-Time-in-Klaviyo#how-to-utilize-smart-send-time3) is used. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "sent_at": {"name": "sent_at", "description": "Timestamp of when the campaign was first sent out to users.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status": {"name": "status", "description": "Current status of the campaign. Either \"draft\", \"scheduled\", \"sent\", or \"cancelled\".", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status_id": {"name": "status_id", "description": "Corresponding ID to the current status.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "subject": {"name": "subject", "description": "The subject line of the campaign's email.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the campaign was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variation_id": {"name": "variation_id", "description": "Unique ID of the attributed campaign variation group. This does not map onto another table. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_count_unique_people": {"name": "total_count_unique_people", "description": "The count of the distinct people that have interacted with this campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_event_at": {"name": "first_event_at", "description": "Timestamp of the first ever interaction between this campaign and a person.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_event_at": {"name": "last_event_at", "description": "Timestamp of the most recent interaction between this campaign and a person.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_relation": {"name": "source_relation", "description": "The source where this data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioining together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "klaviyo://models/klaviyo.yml", "compiled_path": "target/compiled/klaviyo/models/klaviyo__campaigns.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "klaviyo_combo"}, "created_at": 1641410292.493221, "compiled_sql": "with campaign as (\n\n select *\n from `dbt-package-testing`.`dbt_transformations`.`stg_klaviyo__campaign`\n),\n\ncampaign_metrics as (\n\n select *\n from `dbt-package-testing`.`dbt_transformations`.`int_klaviyo__campaign_flow_metrics`\n),\n\ncampaign_join as (\n \n \n\n select\n campaign.*, -- has campaign_id and source_relation\n `variation_id` as `variation_id`,\n `total_count_unique_people` as `total_count_unique_people`,\n `first_event_at` as `first_event_at`,\n `last_event_at` as `last_event_at`,\n `sum_revenue_refunded_order` as `sum_revenue_refunded_order`,\n `sum_revenue_placed_order` as `sum_revenue_placed_order`,\n `sum_revenue_ordered_product` as `sum_revenue_ordered_product`,\n `sum_revenue_checkout_started` as `sum_revenue_checkout_started`,\n `sum_revenue_cancelled_order` as `sum_revenue_cancelled_order`,\n `count_active_on_site` as `count_active_on_site`,\n `unique_count_active_on_site` as `unique_count_active_on_site`,\n `count_viewed_product` as `count_viewed_product`,\n `unique_count_viewed_product` as `unique_count_viewed_product`,\n `count_ordered_product` as `count_ordered_product`,\n `unique_count_ordered_product` as `unique_count_ordered_product`,\n `count_placed_order` as `count_placed_order`,\n `unique_count_placed_order` as `unique_count_placed_order`,\n `count_refunded_order` as `count_refunded_order`,\n `unique_count_refunded_order` as `unique_count_refunded_order`,\n `count_received_email` as `count_received_email`,\n `unique_count_received_email` as `unique_count_received_email`,\n `count_clicked_email` as `count_clicked_email`,\n `unique_count_clicked_email` as `unique_count_clicked_email`,\n `count_opened_email` as `count_opened_email`,\n `unique_count_opened_email` as `unique_count_opened_email`,\n `count_marked_email_as_spam` as `count_marked_email_as_spam`,\n `unique_count_marked_email_as_spam` as `unique_count_marked_email_as_spam`,\n `count_unsubscribed` as `count_unsubscribed`,\n `unique_count_unsubscribed` as `unique_count_unsubscribed`,\n `count_received_sms` as `count_received_sms`,\n `unique_count_received_sms` as `unique_count_received_sms`,\n `count_clicked_sms` as `count_clicked_sms`,\n `unique_count_clicked_sms` as `unique_count_clicked_sms`,\n `count_sent_sms` as `count_sent_sms`,\n `unique_count_sent_sms` as `unique_count_sent_sms`,\n `count_unsubscribed_from_sms` as `count_unsubscribed_from_sms`,\n `unique_count_unsubscribed_from_sms` as `unique_count_unsubscribed_from_sms`\n\n from campaign\n left join campaign_metrics on (\n campaign.campaign_id = campaign_metrics.last_touch_campaign_id\n and\n campaign.source_relation = campaign_metrics.source_relation\n )\n),\n\nfinal as (\n\n select \n *,\n to_hex(md5(cast(coalesce(cast(campaign_id as \n string\n), '') || '-' || coalesce(cast(variation_id as \n string\n), '') as \n string\n))) as campaign_variation_key\n\n from campaign_join\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_transformations`.`klaviyo__campaigns`"}, "model.klaviyo.klaviyo__events": {"raw_sql": "{{\n config(\n materialized='incremental',\n unique_key='unique_event_id',\n partition_by={\n \"field\": \"occurred_on\",\n \"data_type\": \"date\"\n } if target.type == 'bigquery' else none,\n incremental_strategy = 'merge' if target.type != 'snowflake' else 'delete+insert',\n file_format = 'delta'\n )\n}}\n-- ^ the incremental strategy is split into delete+insert for snowflake since there is a bit of\n-- overlap in transformed data blocks for incremental runs (we look back an extra hour, see lines 23 - 30)\n-- this configuration solution was taken from https://docs.getdbt.com/reference/resource-configs/snowflake-configs#merge-behavior-incremental-models\n\nwith events as (\n\n select *\n from {{ ref('int_klaviyo__event_attribution') }}\n\n {% if is_incremental() %}\n\n -- most events (from all kinds of integrations) at least once every hour\n where _fivetran_synced >= cast(coalesce( \n (\n select {{ dbt_utils.dateadd(datepart = 'hour', \n interval = -1,\n from_date_or_timestamp = 'max(_fivetran_synced)' ) }} \n from {{ this }}\n ), '2012-01-01') as {{ dbt_utils.type_timestamp() }} ) -- klaviyo was founded in 2012, so let's default the min date to then\n {% endif %}\n),\n\nevent_fields as (\n\n -- excluding some fields to rename them and/or make them null if needed\n {% set exclude_fields = ['touch_session', 'last_touch_id', 'session_start_at', 'session_event_type', 'type', 'session_touch_type'] %}\n -- as of the patch release of dbt-utils v0.7.3, the snowflake uppercasing is not needed anymore so we have deleted the snowflake conditional in the exclusion\n\n select \n {{ dbt_utils.star(from=ref('int_klaviyo__event_attribution'), except=exclude_fields) }},\n\n type, -- need to pull this out because it gets removed by dbt_utils.star, due to being a substring of 'session_event_type' and 'session_touch_type'\n\n -- split out campaign and flow IDs\n case \n when session_touch_type = 'campaign' then last_touch_id \n else null end as last_touch_campaign_id,\n case \n when session_touch_type = 'flow' then last_touch_id \n else null end as last_touch_flow_id,\n\n -- only make these non-null if the event indeed qualified for attribution\n case \n when last_touch_id is not null then session_start_at \n else null end as last_touch_at,\n case \n when last_touch_id is not null then session_event_type \n else null end as last_touch_event_type,\n case \n when last_touch_id is not null then session_touch_type \n else null end as last_touch_type -- flow vs campaign\n\n \n from events\n),\n\ncampaign as (\n\n select *\n from {{ var('campaign') }}\n),\n\nflow as (\n\n select *\n from {{ var('flow') }}\n),\n\nperson as (\n\n select *\n from {{ var('person') }}\n),\n\n-- just pulling this to join with INTEGRATION\nmetric as (\n\n select *\n from {{ var('metric') }}\n),\n\nintegration as (\n\n select *\n from {{ var('integration') }}\n),\n\njoin_fields as (\n\n select\n event_fields.*,\n campaign.campaign_name,\n campaign.campaign_type,\n campaign.subject as campaign_subject_line,\n flow.flow_name, \n person.city as person_city,\n person.country as person_country,\n person.region as person_region,\n person.email as person_email,\n person.timezone as person_timezone,\n integration.integration_name,\n integration.category as integration_category\n\n from event_fields\n left join campaign on (\n event_fields.last_touch_campaign_id = campaign.campaign_id\n and\n event_fields.source_relation = campaign.source_relation\n )\n left join flow on (\n event_fields.last_touch_flow_id = flow.flow_id\n and\n event_fields.source_relation = flow.source_relation \n )\n left join person on (\n event_fields.person_id = person.person_id\n and\n event_fields.source_relation = person.source_relation\n )\n left join metric on (\n event_fields.metric_id = metric.metric_id\n and\n event_fields.source_relation = metric.source_relation\n )\n left join integration on (\n metric.integration_id = integration.integration_id\n and\n metric.source_relation = integration.source_relation\n )\n)\n\nselect * from join_fields", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt.is_incremental", "macro.dbt_utils.star", "macro.dbt_utils.dateadd", "macro.dbt_utils.type_timestamp"], "nodes": ["model.klaviyo.int_klaviyo__event_attribution", "model.klaviyo.int_klaviyo__event_attribution", "model.klaviyo_source.stg_klaviyo__campaign", "model.klaviyo_source.stg_klaviyo__flow", "model.klaviyo_source.stg_klaviyo__person", "model.klaviyo_source.stg_klaviyo__metric", "model.klaviyo_source.stg_klaviyo__integration"]}, "config": {"enabled": true, "alias": null, "schema": "klaviyo_combo", "database": null, "tags": [], "meta": {}, "materialized": "incremental", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "partition_by": {"field": "occurred_on", "data_type": "date"}, "unique_key": "unique_event_id", "incremental_strategy": "merge", "file_format": "delta", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_transformations", "fqn": ["klaviyo", "klaviyo__events"], "unique_id": "model.klaviyo.klaviyo__events", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/klaviyo", "path": "klaviyo__events.sql", "original_file_path": "models/klaviyo__events.sql", "name": "klaviyo__events", "alias": "klaviyo__events", "checksum": {"name": "sha256", "checksum": "4ba6ca5b61a0a246a0cd77d0b36e3cd34090e1c8ad54566e70a2c3cdaf8e1de8"}, "tags": [], "refs": [["int_klaviyo__event_attribution"], ["int_klaviyo__event_attribution"], ["stg_klaviyo__campaign"], ["stg_klaviyo__flow"], ["stg_klaviyo__person"], ["stg_klaviyo__metric"], ["stg_klaviyo__integration"]], "sources": [], "description": "Table of Klaviyo events, enriched with attribution data (see `int_klaviyo__event_attribution` for details), and information regarding the event's associated user, flow, campaign, and platform/integration. \nNote: this model has an incremental materialization. Custom event-columns specified by the `klaviyo__event_pass_through_columns` variable will appear here as well.\n", "columns": {"variation_id": {"name": "variation_id", "description": "Unique ID of the attributed flow or campaign variation group. This does not map onto another table. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Foreign key referencing the CAMPAIGN that the event is attributed to.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "occurred_at": {"name": "occurred_at", "description": "Timestamp of when the event was triggered.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_id": {"name": "flow_id", "description": "Foreign key referencing the FLOW that the event is attributed to.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_message_id": {"name": "flow_message_id", "description": "Unique ID of the FLOW_MESSAGE that the event is attributed to. This does not map onto another table.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "event_id": {"name": "event_id", "description": "Unique ID of the event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "metric_id": {"name": "metric_id", "description": "Foreign key referencing the metric being captured.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "person_id": {"name": "person_id", "description": "Foreign key referencing the PERSON who triggered the event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "type": {"name": "type", "description": "Type of event that was triggered. This is the same as the METRIC name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "uuid": {"name": "uuid", "description": "Universally Unique Identifier of the event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "numeric_value": {"name": "numeric_value", "description": "Numeric value associated with the event (ie the dollars associated with a purchase).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "touch_type": {"name": "touch_type", "description": "Type of touch/message that the event itself is already attributed to in Klaviyo. Either 'flow', 'campaign', or null. Note that the package will refer to campaign and flow interactions as \"touches\".\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "occurred_on": {"name": "occurred_on", "description": "Calendar date (UTC) on which the event occurred.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "touch_id": {"name": "touch_id", "description": "Coalescing of the Klaviyo-attributed campaign_id and flow_id.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_at": {"name": "last_touch_at", "description": "Timestamp of when, relative to the current event, this person last interacted with a campaign or flow according to Klaviyo. This will be null if the event is not attributed to any flow or campaign. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_event_type": {"name": "last_touch_event_type", "description": "The type of event through which, relative to the current event, the person last interacted with a campaign or flow. This information is used to determine which lookback window to use (email vs sms). This will be null if the event is not attributed to any flow or campaign.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_type": {"name": "last_touch_type", "description": "What kind of touch the event was attributed to by the package -- 'campaign', 'flow', or null.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_campaign_id": {"name": "last_touch_campaign_id", "description": "Foreign key referencing the CAMPAIGN that the event is attributed to by the package.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_flow_id": {"name": "last_touch_flow_id", "description": "Foreign key referencing the FLOW that the event is attributed to by the package.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_name": {"name": "campaign_name", "description": "A name for this campaign. If not specified, this will default to the subject of the campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_type": {"name": "campaign_type", "description": "Type of campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_subject_line": {"name": "campaign_subject_line", "description": "Type of campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_name": {"name": "flow_name", "description": "Name of the flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "person_city": {"name": "person_city", "description": "City that the person who triggered this event lives in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "person_country": {"name": "person_country", "description": "Country that the person who triggered this event lives in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "person_region": {"name": "person_region", "description": "Region or state that the person who triggered this event lives in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "person_email": {"name": "person_email", "description": "The email address and the unique identifier for the person who triggered the event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "person_timezone": {"name": "person_timezone", "description": "Timezone that the person who triggered this event is situated in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "integration_name": {"name": "integration_name", "description": "Name of the platform that triggered the event (either Klaviyo, the API, or another integration).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "integration_category": {"name": "integration_category", "description": "Use-case category of the platform that sent the event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "UTC Timestamp that indicates the start time of the Fivetran job that synced this event row.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "unique_event_id": {"name": "unique_event_id", "description": "The unique identifier for the combination of event_id and source_relation columns.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_relation": {"name": "source_relation", "description": "The source where this data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioining together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "klaviyo://models/klaviyo.yml", "compiled_path": "target/compiled/klaviyo/models/klaviyo__events.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "incremental", "schema": "klaviyo_combo", "unique_key": "unique_event_id", "partition_by": {"field": "occurred_on", "data_type": "date"}, "incremental_strategy": "merge", "file_format": "delta"}, "created_at": 1641410292.481054, "compiled_sql": "\n-- ^ the incremental strategy is split into delete+insert for snowflake since there is a bit of\n-- overlap in transformed data blocks for incremental runs (we look back an extra hour, see lines 23 - 30)\n-- this configuration solution was taken from https://docs.getdbt.com/reference/resource-configs/snowflake-configs#merge-behavior-incremental-models\n\nwith events as (\n\n select *\n from `dbt-package-testing`.`dbt_transformations`.`int_klaviyo__event_attribution`\n\n \n\n -- most events (from all kinds of integrations) at least once every hour\n where _fivetran_synced >= cast(coalesce( \n (\n select \n\n datetime_add(\n cast( max(_fivetran_synced) as datetime),\n interval -1 hour\n )\n\n \n from `dbt-package-testing`.`dbt_transformations`.`klaviyo__events`\n ), '2012-01-01') as \n timestamp\n ) -- klaviyo was founded in 2012, so let's default the min date to then\n \n),\n\nevent_fields as (\n\n -- excluding some fields to rename them and/or make them null if needed\n \n -- as of the patch release of dbt-utils v0.7.3, the snowflake uppercasing is not needed anymore so we have deleted the snowflake conditional in the exclusion\n\n select \n `variation_id` as `variation_id`,\n `campaign_id` as `campaign_id`,\n `occurred_at` as `occurred_at`,\n `flow_id` as `flow_id`,\n `flow_message_id` as `flow_message_id`,\n `event_id` as `event_id`,\n `metric_id` as `metric_id`,\n `person_id` as `person_id`,\n `uuid` as `uuid`,\n `numeric_value` as `numeric_value`,\n `_fivetran_synced` as `_fivetran_synced`,\n `source_relation` as `source_relation`,\n `occurred_on` as `occurred_on`,\n `touch_id` as `touch_id`,\n `touch_type` as `touch_type`,\n\n type, -- need to pull this out because it gets removed by dbt_utils.star, due to being a substring of 'session_event_type' and 'session_touch_type'\n\n -- split out campaign and flow IDs\n case \n when session_touch_type = 'campaign' then last_touch_id \n else null end as last_touch_campaign_id,\n case \n when session_touch_type = 'flow' then last_touch_id \n else null end as last_touch_flow_id,\n\n -- only make these non-null if the event indeed qualified for attribution\n case \n when last_touch_id is not null then session_start_at \n else null end as last_touch_at,\n case \n when last_touch_id is not null then session_event_type \n else null end as last_touch_event_type,\n case \n when last_touch_id is not null then session_touch_type \n else null end as last_touch_type -- flow vs campaign\n\n \n from events\n),\n\ncampaign as (\n\n select *\n from `dbt-package-testing`.`dbt_transformations`.`stg_klaviyo__campaign`\n),\n\nflow as (\n\n select *\n from `dbt-package-testing`.`dbt_transformations`.`stg_klaviyo__flow`\n),\n\nperson as (\n\n select *\n from `dbt-package-testing`.`dbt_transformations`.`stg_klaviyo__person`\n),\n\n-- just pulling this to join with INTEGRATION\nmetric as (\n\n select *\n from `dbt-package-testing`.`dbt_transformations`.`stg_klaviyo__metric`\n),\n\nintegration as (\n\n select *\n from `dbt-package-testing`.`dbt_transformations`.`stg_klaviyo__integration`\n),\n\njoin_fields as (\n\n select\n event_fields.*,\n campaign.campaign_name,\n campaign.campaign_type,\n campaign.subject as campaign_subject_line,\n flow.flow_name, \n person.city as person_city,\n person.country as person_country,\n person.region as person_region,\n person.email as person_email,\n person.timezone as person_timezone,\n integration.integration_name,\n integration.category as integration_category\n\n from event_fields\n left join campaign on (\n event_fields.last_touch_campaign_id = campaign.campaign_id\n and\n event_fields.source_relation = campaign.source_relation\n )\n left join flow on (\n event_fields.last_touch_flow_id = flow.flow_id\n and\n event_fields.source_relation = flow.source_relation \n )\n left join person on (\n event_fields.person_id = person.person_id\n and\n event_fields.source_relation = person.source_relation\n )\n left join metric on (\n event_fields.metric_id = metric.metric_id\n and\n event_fields.source_relation = metric.source_relation\n )\n left join integration on (\n metric.integration_id = integration.integration_id\n and\n metric.source_relation = integration.source_relation\n )\n)\n\nselect * from join_fields", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_transformations`.`klaviyo__events`"}, "model.klaviyo.int_klaviyo__campaign_flow_metrics": {"raw_sql": "with person_campaign_flow as (\n\n select *\n from {{ ref('klaviyo__person_campaign_flow') }}\n),\n\n{%- set pcf_columns = adapter.get_columns_in_relation(ref('klaviyo__person_campaign_flow')) %}\n\n-- aggregating to the campaign/flow - variation level. so a flow with A/B versions will have 2 rows\nagg_metrics as (\n\n select\n last_touch_campaign_id,\n last_touch_flow_id,\n variation_id,\n source_relation,\n count(distinct person_id) as total_count_unique_people,\n min(first_event_at) as first_event_at,\n max(last_event_at) as last_event_at\n \n {% for col in pcf_columns if col.name|lower not in ['last_touch_campaign_id', 'person_id', 'last_touch_flow_id', 'source_relation',\n 'campaign_name', 'flow_name','variation_id', 'first_event_at', 'last_event_at'] %}\n -- sum up any person-level metrics to the flow/campaign level\n , sum( {{ col.name }} ) as {{ col.name }}\n\n {% if 'sum_revenue' not in col.name|lower %} -- only look at 'count' metrics for unique people counts\n -- get unique number of people who did each kind of event\n -- each record in person_campaign_flow is at the person-campaign/flow-variation level, \n -- so we can just sum up 0s and 1s to get totals at the campaign/flow-variation grain.\n , sum(case when {{ col.name }} > 0 then 1 else 0 end) as {{ 'unique_' ~ col.name }}\n\n {% endif %}\n {% endfor -%}\n\n from person_campaign_flow\n group by 1,2,3,4\n)\n\nselect * from agg_metrics", "compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["model.klaviyo.klaviyo__person_campaign_flow", "model.klaviyo.klaviyo__person_campaign_flow"]}, "config": {"enabled": true, "alias": null, "schema": "klaviyo_combo", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_transformations", "fqn": ["klaviyo", "intermediate", "int_klaviyo__campaign_flow_metrics"], "unique_id": "model.klaviyo.int_klaviyo__campaign_flow_metrics", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/klaviyo", "path": "intermediate/int_klaviyo__campaign_flow_metrics.sql", "original_file_path": "models/intermediate/int_klaviyo__campaign_flow_metrics.sql", "name": "int_klaviyo__campaign_flow_metrics", "alias": "int_klaviyo__campaign_flow_metrics", "checksum": {"name": "sha256", "checksum": "05f2223e2d8ab2cbcb57045b3008aee2e9c74f1803cb5e3b658b8b92b7b22e9d"}, "tags": [], "refs": [["klaviyo__person_campaign_flow"], ["klaviyo__person_campaign_flow"]], "sources": [], "description": "Table that draws from the `klaviyo__person_campaign_flow` model to aggregate event metrics to the campaign or flow AND variation grain. A campaign with A/B versions will have 2 records. **Counts** of the unique users and instances of the events, as well as **sums** of the numeric value associated with events (i.e. revenue) will be pivoted out into columns, as configured by the `klaviyo__count_metrics` and `klaviyo__sum_revenue_metrics` variables, respectively. See the dbt_project.yml file for the default metrics used. These columns will be prefixed with `count_`, `unique_count_`, and `sum_revenue_`.\n", "columns": {"last_touch_campaign_id": {"name": "last_touch_campaign_id", "description": "Foreign key referencing the CAMPAIGN attributed with these metrics (by the package's attribution model).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_flow_id": {"name": "last_touch_flow_id", "description": "Foreign key referencing the FLOW attributed with these metrics (by the package's attribution model).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variation_id": {"name": "variation_id", "description": "Unique ID of the attributed flow or campaign variation group. This does not map onto another table. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_count_unique_people": {"name": "total_count_unique_people", "description": "The count of the distinct people that have interacted with this campaign or flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_event_at": {"name": "first_event_at", "description": "Timestamp of the first ever interaction between this campaign/flow and a person.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_event_at": {"name": "last_event_at", "description": "Timestamp of the most recent interaction between this campaign/flow and a person.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_relation": {"name": "source_relation", "description": "The source where this data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioining together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "klaviyo://models/intermediate/int_klaviyo.yml", "compiled_path": "target/compiled/klaviyo/models/intermediate/int_klaviyo__campaign_flow_metrics.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "klaviyo_combo"}, "created_at": 1641410292.611037, "compiled_sql": "with person_campaign_flow as (\n\n select *\n from `dbt-package-testing`.`dbt_transformations`.`klaviyo__person_campaign_flow`\n),\n\n-- aggregating to the campaign/flow - variation level. so a flow with A/B versions will have 2 rows\nagg_metrics as (\n\n select\n last_touch_campaign_id,\n last_touch_flow_id,\n variation_id,\n source_relation,\n count(distinct person_id) as total_count_unique_people,\n min(first_event_at) as first_event_at,\n max(last_event_at) as last_event_at\n \n \n -- sum up any person-level metrics to the flow/campaign level\n , sum( sum_revenue_refunded_order ) as sum_revenue_refunded_order\n\n \n \n -- sum up any person-level metrics to the flow/campaign level\n , sum( sum_revenue_placed_order ) as sum_revenue_placed_order\n\n \n \n -- sum up any person-level metrics to the flow/campaign level\n , sum( sum_revenue_ordered_product ) as sum_revenue_ordered_product\n\n \n \n -- sum up any person-level metrics to the flow/campaign level\n , sum( sum_revenue_checkout_started ) as sum_revenue_checkout_started\n\n \n \n -- sum up any person-level metrics to the flow/campaign level\n , sum( sum_revenue_cancelled_order ) as sum_revenue_cancelled_order\n\n \n \n -- sum up any person-level metrics to the flow/campaign level\n , sum( count_active_on_site ) as count_active_on_site\n\n -- only look at 'count' metrics for unique people counts\n -- get unique number of people who did each kind of event\n -- each record in person_campaign_flow is at the person-campaign/flow-variation level, \n -- so we can just sum up 0s and 1s to get totals at the campaign/flow-variation grain.\n , sum(case when count_active_on_site > 0 then 1 else 0 end) as unique_count_active_on_site\n\n \n \n -- sum up any person-level metrics to the flow/campaign level\n , sum( count_viewed_product ) as count_viewed_product\n\n -- only look at 'count' metrics for unique people counts\n -- get unique number of people who did each kind of event\n -- each record in person_campaign_flow is at the person-campaign/flow-variation level, \n -- so we can just sum up 0s and 1s to get totals at the campaign/flow-variation grain.\n , sum(case when count_viewed_product > 0 then 1 else 0 end) as unique_count_viewed_product\n\n \n \n -- sum up any person-level metrics to the flow/campaign level\n , sum( count_ordered_product ) as count_ordered_product\n\n -- only look at 'count' metrics for unique people counts\n -- get unique number of people who did each kind of event\n -- each record in person_campaign_flow is at the person-campaign/flow-variation level, \n -- so we can just sum up 0s and 1s to get totals at the campaign/flow-variation grain.\n , sum(case when count_ordered_product > 0 then 1 else 0 end) as unique_count_ordered_product\n\n \n \n -- sum up any person-level metrics to the flow/campaign level\n , sum( count_placed_order ) as count_placed_order\n\n -- only look at 'count' metrics for unique people counts\n -- get unique number of people who did each kind of event\n -- each record in person_campaign_flow is at the person-campaign/flow-variation level, \n -- so we can just sum up 0s and 1s to get totals at the campaign/flow-variation grain.\n , sum(case when count_placed_order > 0 then 1 else 0 end) as unique_count_placed_order\n\n \n \n -- sum up any person-level metrics to the flow/campaign level\n , sum( count_refunded_order ) as count_refunded_order\n\n -- only look at 'count' metrics for unique people counts\n -- get unique number of people who did each kind of event\n -- each record in person_campaign_flow is at the person-campaign/flow-variation level, \n -- so we can just sum up 0s and 1s to get totals at the campaign/flow-variation grain.\n , sum(case when count_refunded_order > 0 then 1 else 0 end) as unique_count_refunded_order\n\n \n \n -- sum up any person-level metrics to the flow/campaign level\n , sum( count_received_email ) as count_received_email\n\n -- only look at 'count' metrics for unique people counts\n -- get unique number of people who did each kind of event\n -- each record in person_campaign_flow is at the person-campaign/flow-variation level, \n -- so we can just sum up 0s and 1s to get totals at the campaign/flow-variation grain.\n , sum(case when count_received_email > 0 then 1 else 0 end) as unique_count_received_email\n\n \n \n -- sum up any person-level metrics to the flow/campaign level\n , sum( count_clicked_email ) as count_clicked_email\n\n -- only look at 'count' metrics for unique people counts\n -- get unique number of people who did each kind of event\n -- each record in person_campaign_flow is at the person-campaign/flow-variation level, \n -- so we can just sum up 0s and 1s to get totals at the campaign/flow-variation grain.\n , sum(case when count_clicked_email > 0 then 1 else 0 end) as unique_count_clicked_email\n\n \n \n -- sum up any person-level metrics to the flow/campaign level\n , sum( count_opened_email ) as count_opened_email\n\n -- only look at 'count' metrics for unique people counts\n -- get unique number of people who did each kind of event\n -- each record in person_campaign_flow is at the person-campaign/flow-variation level, \n -- so we can just sum up 0s and 1s to get totals at the campaign/flow-variation grain.\n , sum(case when count_opened_email > 0 then 1 else 0 end) as unique_count_opened_email\n\n \n \n -- sum up any person-level metrics to the flow/campaign level\n , sum( count_marked_email_as_spam ) as count_marked_email_as_spam\n\n -- only look at 'count' metrics for unique people counts\n -- get unique number of people who did each kind of event\n -- each record in person_campaign_flow is at the person-campaign/flow-variation level, \n -- so we can just sum up 0s and 1s to get totals at the campaign/flow-variation grain.\n , sum(case when count_marked_email_as_spam > 0 then 1 else 0 end) as unique_count_marked_email_as_spam\n\n \n \n -- sum up any person-level metrics to the flow/campaign level\n , sum( count_unsubscribed ) as count_unsubscribed\n\n -- only look at 'count' metrics for unique people counts\n -- get unique number of people who did each kind of event\n -- each record in person_campaign_flow is at the person-campaign/flow-variation level, \n -- so we can just sum up 0s and 1s to get totals at the campaign/flow-variation grain.\n , sum(case when count_unsubscribed > 0 then 1 else 0 end) as unique_count_unsubscribed\n\n \n \n -- sum up any person-level metrics to the flow/campaign level\n , sum( count_received_sms ) as count_received_sms\n\n -- only look at 'count' metrics for unique people counts\n -- get unique number of people who did each kind of event\n -- each record in person_campaign_flow is at the person-campaign/flow-variation level, \n -- so we can just sum up 0s and 1s to get totals at the campaign/flow-variation grain.\n , sum(case when count_received_sms > 0 then 1 else 0 end) as unique_count_received_sms\n\n \n \n -- sum up any person-level metrics to the flow/campaign level\n , sum( count_clicked_sms ) as count_clicked_sms\n\n -- only look at 'count' metrics for unique people counts\n -- get unique number of people who did each kind of event\n -- each record in person_campaign_flow is at the person-campaign/flow-variation level, \n -- so we can just sum up 0s and 1s to get totals at the campaign/flow-variation grain.\n , sum(case when count_clicked_sms > 0 then 1 else 0 end) as unique_count_clicked_sms\n\n \n \n -- sum up any person-level metrics to the flow/campaign level\n , sum( count_sent_sms ) as count_sent_sms\n\n -- only look at 'count' metrics for unique people counts\n -- get unique number of people who did each kind of event\n -- each record in person_campaign_flow is at the person-campaign/flow-variation level, \n -- so we can just sum up 0s and 1s to get totals at the campaign/flow-variation grain.\n , sum(case when count_sent_sms > 0 then 1 else 0 end) as unique_count_sent_sms\n\n \n \n -- sum up any person-level metrics to the flow/campaign level\n , sum( count_unsubscribed_from_sms ) as count_unsubscribed_from_sms\n\n -- only look at 'count' metrics for unique people counts\n -- get unique number of people who did each kind of event\n -- each record in person_campaign_flow is at the person-campaign/flow-variation level, \n -- so we can just sum up 0s and 1s to get totals at the campaign/flow-variation grain.\n , sum(case when count_unsubscribed_from_sms > 0 then 1 else 0 end) as unique_count_unsubscribed_from_sms\n\n \n from person_campaign_flow\n group by 1,2,3,4\n)\n\nselect * from agg_metrics", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_transformations`.`int_klaviyo__campaign_flow_metrics`"}, "model.klaviyo.int_klaviyo__person_metrics": {"raw_sql": "with person_campaign_flow as (\n\n select *\n from {{ ref('klaviyo__person_campaign_flow') }}\n),\n\n{%- set pcf_columns = adapter.get_columns_in_relation(ref('klaviyo__person_campaign_flow')) %}\n\nagg_metrics as (\n\n select\n person_id,\n source_relation,\n count(distinct last_touch_campaign_id) as count_total_campaigns,\n count(distinct last_touch_flow_id) as count_total_flows,\n min(first_event_at) as first_event_at, -- first ever event occurred at\n max(last_event_at) as last_event_at, -- last ever event occurred at\n min(distinct case when last_touch_campaign_id is not null then first_event_at end) as first_campaign_touch_at,\n max(distinct case when last_touch_campaign_id is not null then last_event_at end) as last_campaign_touch_at,\n min(distinct case when last_touch_flow_id is not null then first_event_at end) as first_flow_touch_at,\n max(distinct case when last_touch_flow_id is not null then last_event_at end) as last_flow_touch_at\n\n {% for col in pcf_columns if col.name|lower not in ['last_touch_campaign_id', 'person_id', 'last_touch_flow_id', 'source_relation',\n 'campaign_name', 'flow_name','variation_id', 'first_event_at', 'last_event_at'] %}\n -- sum up any count/sum_revenue metrics -> prefix with `total` since we're pulling out organic sums as well\n , sum( {{ col.name }} ) as {{ 'total_' ~ col.name }}\n\n -- let's pull out the organic (not attributed to a flow or campaign) revenue sums\n {% if 'sum_revenue' in col.name|lower %}\n , sum( case when coalesce(last_touch_campaign_id, last_touch_flow_id) is null then {{ col.name }} else 0 end ) as {{ 'organic_' ~ col.name }}\n {% endif %}\n\n {% endfor -%}\n\n from person_campaign_flow\n group by 1,2\n\n)\n\nselect * from agg_metrics", "compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["model.klaviyo.klaviyo__person_campaign_flow", "model.klaviyo.klaviyo__person_campaign_flow"]}, "config": {"enabled": true, "alias": null, "schema": "klaviyo_combo", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_transformations", "fqn": ["klaviyo", "intermediate", "int_klaviyo__person_metrics"], "unique_id": "model.klaviyo.int_klaviyo__person_metrics", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/klaviyo", "path": "intermediate/int_klaviyo__person_metrics.sql", "original_file_path": "models/intermediate/int_klaviyo__person_metrics.sql", "name": "int_klaviyo__person_metrics", "alias": "int_klaviyo__person_metrics", "checksum": {"name": "sha256", "checksum": "a17b4d3bfd7f6a19bc40dc8199f22c30594994645f31cc2bd72280e8ac429259"}, "tags": [], "refs": [["klaviyo__person_campaign_flow"], ["klaviyo__person_campaign_flow"]], "sources": [], "description": "Table that draws from the `klaviyo__person_campaign_flow` model to aggregate event metrics to the person grain. \n**Counts** of instances of the events and **sums** of the numeric value (i.e. revenue) associated with events (total vs organic/not attributed to flows or campaigns) will be pivoted out into columns, as configured by the `klaviyo__count_metrics` and `klaviyo__sum_revenue_metrics`variables, respectively. See the dbt_project.yml file for the default metrics used. \nThese columns will be prefixed with `total_count_`, `total_sum_revenue_` (organic + attributed), and `organic_sum_revenue_` (not attributed to a campaign or flow). \n", "columns": {"person_id": {"name": "person_id", "description": "Unique ID of the person.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "count_total_campaigns": {"name": "count_total_campaigns", "description": "Count of the number of campaigns this person has interacted with.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "count_total_flows": {"name": "count_total_flows", "description": "Count of the number of flows this person has interacted with.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_event_at": {"name": "first_event_at", "description": "Timestamp of when the user first triggered an event (not limited to campaign and flow interactions).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_event_at": {"name": "last_event_at", "description": "Timestamp of when the user last triggered an event (not limited to campaign and flow interactions).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_campaign_touch_at": {"name": "first_campaign_touch_at", "description": "Timestamp of when the user first interacted with a campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_campaign_touch_at": {"name": "last_campaign_touch_at", "description": "Timestamp of when the user last interacted with a campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_flow_touch_at": {"name": "first_flow_touch_at", "description": "Timestamp of when the user first interacted with a flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_flow_touch_at": {"name": "last_flow_touch_at", "description": "Timestamp of when the user last interacted with a flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_relation": {"name": "source_relation", "description": "The source where this data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioining together multiple sources, this will be an empty string.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "klaviyo://models/intermediate/int_klaviyo.yml", "compiled_path": "target/compiled/klaviyo/models/intermediate/int_klaviyo__person_metrics.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "klaviyo_combo"}, "created_at": 1641410292.615648, "compiled_sql": "with person_campaign_flow as (\n\n select *\n from `dbt-package-testing`.`dbt_transformations`.`klaviyo__person_campaign_flow`\n),\n\nagg_metrics as (\n\n select\n person_id,\n source_relation,\n count(distinct last_touch_campaign_id) as count_total_campaigns,\n count(distinct last_touch_flow_id) as count_total_flows,\n min(first_event_at) as first_event_at, -- first ever event occurred at\n max(last_event_at) as last_event_at, -- last ever event occurred at\n min(distinct case when last_touch_campaign_id is not null then first_event_at end) as first_campaign_touch_at,\n max(distinct case when last_touch_campaign_id is not null then last_event_at end) as last_campaign_touch_at,\n min(distinct case when last_touch_flow_id is not null then first_event_at end) as first_flow_touch_at,\n max(distinct case when last_touch_flow_id is not null then last_event_at end) as last_flow_touch_at\n\n \n -- sum up any count/sum_revenue metrics -> prefix with `total` since we're pulling out organic sums as well\n , sum( sum_revenue_refunded_order ) as total_sum_revenue_refunded_order\n\n -- let's pull out the organic (not attributed to a flow or campaign) revenue sums\n \n , sum( case when coalesce(last_touch_campaign_id, last_touch_flow_id) is null then sum_revenue_refunded_order else 0 end ) as organic_sum_revenue_refunded_order\n \n\n \n -- sum up any count/sum_revenue metrics -> prefix with `total` since we're pulling out organic sums as well\n , sum( sum_revenue_placed_order ) as total_sum_revenue_placed_order\n\n -- let's pull out the organic (not attributed to a flow or campaign) revenue sums\n \n , sum( case when coalesce(last_touch_campaign_id, last_touch_flow_id) is null then sum_revenue_placed_order else 0 end ) as organic_sum_revenue_placed_order\n \n\n \n -- sum up any count/sum_revenue metrics -> prefix with `total` since we're pulling out organic sums as well\n , sum( sum_revenue_ordered_product ) as total_sum_revenue_ordered_product\n\n -- let's pull out the organic (not attributed to a flow or campaign) revenue sums\n \n , sum( case when coalesce(last_touch_campaign_id, last_touch_flow_id) is null then sum_revenue_ordered_product else 0 end ) as organic_sum_revenue_ordered_product\n \n\n \n -- sum up any count/sum_revenue metrics -> prefix with `total` since we're pulling out organic sums as well\n , sum( sum_revenue_checkout_started ) as total_sum_revenue_checkout_started\n\n -- let's pull out the organic (not attributed to a flow or campaign) revenue sums\n \n , sum( case when coalesce(last_touch_campaign_id, last_touch_flow_id) is null then sum_revenue_checkout_started else 0 end ) as organic_sum_revenue_checkout_started\n \n\n \n -- sum up any count/sum_revenue metrics -> prefix with `total` since we're pulling out organic sums as well\n , sum( sum_revenue_cancelled_order ) as total_sum_revenue_cancelled_order\n\n -- let's pull out the organic (not attributed to a flow or campaign) revenue sums\n \n , sum( case when coalesce(last_touch_campaign_id, last_touch_flow_id) is null then sum_revenue_cancelled_order else 0 end ) as organic_sum_revenue_cancelled_order\n \n\n \n -- sum up any count/sum_revenue metrics -> prefix with `total` since we're pulling out organic sums as well\n , sum( count_active_on_site ) as total_count_active_on_site\n\n -- let's pull out the organic (not attributed to a flow or campaign) revenue sums\n \n\n \n -- sum up any count/sum_revenue metrics -> prefix with `total` since we're pulling out organic sums as well\n , sum( count_viewed_product ) as total_count_viewed_product\n\n -- let's pull out the organic (not attributed to a flow or campaign) revenue sums\n \n\n \n -- sum up any count/sum_revenue metrics -> prefix with `total` since we're pulling out organic sums as well\n , sum( count_ordered_product ) as total_count_ordered_product\n\n -- let's pull out the organic (not attributed to a flow or campaign) revenue sums\n \n\n \n -- sum up any count/sum_revenue metrics -> prefix with `total` since we're pulling out organic sums as well\n , sum( count_placed_order ) as total_count_placed_order\n\n -- let's pull out the organic (not attributed to a flow or campaign) revenue sums\n \n\n \n -- sum up any count/sum_revenue metrics -> prefix with `total` since we're pulling out organic sums as well\n , sum( count_refunded_order ) as total_count_refunded_order\n\n -- let's pull out the organic (not attributed to a flow or campaign) revenue sums\n \n\n \n -- sum up any count/sum_revenue metrics -> prefix with `total` since we're pulling out organic sums as well\n , sum( count_received_email ) as total_count_received_email\n\n -- let's pull out the organic (not attributed to a flow or campaign) revenue sums\n \n\n \n -- sum up any count/sum_revenue metrics -> prefix with `total` since we're pulling out organic sums as well\n , sum( count_clicked_email ) as total_count_clicked_email\n\n -- let's pull out the organic (not attributed to a flow or campaign) revenue sums\n \n\n \n -- sum up any count/sum_revenue metrics -> prefix with `total` since we're pulling out organic sums as well\n , sum( count_opened_email ) as total_count_opened_email\n\n -- let's pull out the organic (not attributed to a flow or campaign) revenue sums\n \n\n \n -- sum up any count/sum_revenue metrics -> prefix with `total` since we're pulling out organic sums as well\n , sum( count_marked_email_as_spam ) as total_count_marked_email_as_spam\n\n -- let's pull out the organic (not attributed to a flow or campaign) revenue sums\n \n\n \n -- sum up any count/sum_revenue metrics -> prefix with `total` since we're pulling out organic sums as well\n , sum( count_unsubscribed ) as total_count_unsubscribed\n\n -- let's pull out the organic (not attributed to a flow or campaign) revenue sums\n \n\n \n -- sum up any count/sum_revenue metrics -> prefix with `total` since we're pulling out organic sums as well\n , sum( count_received_sms ) as total_count_received_sms\n\n -- let's pull out the organic (not attributed to a flow or campaign) revenue sums\n \n\n \n -- sum up any count/sum_revenue metrics -> prefix with `total` since we're pulling out organic sums as well\n , sum( count_clicked_sms ) as total_count_clicked_sms\n\n -- let's pull out the organic (not attributed to a flow or campaign) revenue sums\n \n\n \n -- sum up any count/sum_revenue metrics -> prefix with `total` since we're pulling out organic sums as well\n , sum( count_sent_sms ) as total_count_sent_sms\n\n -- let's pull out the organic (not attributed to a flow or campaign) revenue sums\n \n\n \n -- sum up any count/sum_revenue metrics -> prefix with `total` since we're pulling out organic sums as well\n , sum( count_unsubscribed_from_sms ) as total_count_unsubscribed_from_sms\n\n -- let's pull out the organic (not attributed to a flow or campaign) revenue sums\n \n\n from person_campaign_flow\n group by 1,2\n\n)\n\nselect * from agg_metrics", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_transformations`.`int_klaviyo__person_metrics`"}, "model.klaviyo.int_klaviyo__event_attribution": {"raw_sql": "{{\n config(\n materialized='incremental',\n unique_key='unique_event_id',\n partition_by={\n \"field\": \"occurred_on\",\n \"data_type\": \"date\"\n } if target.type == 'bigquery' else none,\n incremental_strategy = 'merge',\n file_format = 'delta'\n )\n}}\n\nwith events as (\n\n select \n *,\n -- no event will be attributed to both a campaign and flow\n coalesce(campaign_id, flow_id) as touch_id,\n case \n when campaign_id is not null then 'campaign' \n when flow_id is not null then 'flow' \n else null end as touch_type -- defintion: touch = interaction with campaign/flow\n\n from {{ var('event_table') }}\n\n {% if is_incremental() %}\n -- grab **ALL** events for users who have any events in this new increment\n where person_id in (\n\n select distinct person_id\n from {{ var('event_table') }}\n\n -- most events (from all kinds of integrations) at least once every hour\n -- https://help.klaviyo.com/hc/en-us/articles/115005253208\n where _fivetran_synced >= cast(coalesce( \n (\n select {{ dbt_utils.dateadd(datepart = 'hour', \n interval = -1,\n from_date_or_timestamp = 'max(_fivetran_synced)' ) }} \n from {{ this }}\n ), '2012-01-01') as {{ dbt_utils.type_timestamp() }} ) -- klaviyo was founded in 2012, so let's default the min date to then\n )\n {% endif %}\n),\n\n-- sessionize events based on attribution eligibility -- is it the right kind of event, and does it have a campaign or flow?\ncreate_sessions as (\n select\n *,\n -- default klaviyo__event_attribution_filter limits attribution-eligible events to to email opens, email clicks, and sms opens\n -- https://help.klaviyo.com/hc/en-us/articles/115005248128\n\n -- events that come with flow/campaign attributions (and are eligible event types) will create new sessions.\n -- non-attributed events that come in afterward will be batched into the same attribution-session\n sum(case when touch_id is not null\n {% if var('klaviyo__eligible_attribution_events') != [] %}\n and lower(type) in {{ \"('\" ~ (var('klaviyo__eligible_attribution_events') | join(\"', '\")) ~ \"')\" }}\n {% endif %}\n then 1 else 0 end) over (\n partition by person_id, source_relation order by occurred_at asc rows between unbounded preceding and current row) as touch_session \n\n from events\n\n),\n\n-- \"session start\" refers to the event in a \"touch session\" that is already attributed with a campaign or flow by Klaviyo\n-- a new event that is attributed with a campaign/flow will trigger a new session, so there will only be one already-attributed event per each session \n-- events that are missing attributions will borrow data from the event that triggered the session, if they are in the lookback window (see `attribute` CTE)\nlast_touches as (\n\n select \n *,\n -- when did the touch session begin?\n min(occurred_at) over(partition by person_id, source_relation, touch_session) as session_start_at,\n\n -- get the kind of metric/event that triggered the attribution session, in order to decide \n -- to use the sms or email lookback value. \n first_value(type) over(\n partition by person_id, source_relation, touch_session order by occurred_at asc rows between unbounded preceding and current row) as session_event_type\n\n from create_sessions\n),\n\nattribute as (\n\n select \n *,\n -- klaviyo uses different lookback windows for email and sms events\n -- default email lookback = 5 days (120 hours) -> https://help.klaviyo.com/hc/en-us/articles/115005248128#conversion-tracking1\n -- default sms lookback: 1 day (24 hours -> https://help.klaviyo.com/hc/en-us/articles/115005248128#sms-conversion-tracking7\n\n coalesce(touch_id, -- use pre-attributed flow/campaign if provided\n case \n when {{ dbt_utils.datediff('session_start_at', 'occurred_at', 'hour') }} <= (\n case \n when lower(session_event_type) like '%sms%' then {{ var('klaviyo__sms_attribution_lookback') }}\n else {{ var('klaviyo__email_attribution_lookback') }} end\n ) -- if the events fall within the lookback window, attribute\n then first_value(touch_id) over (\n partition by person_id, source_relation, touch_session order by occurred_at asc rows between unbounded preceding and current row)\n else null end) as last_touch_id -- session qualified for attribution -> we will call this \"last touch\"\n\n from last_touches \n),\n\nfinal as (\n\n select\n *,\n\n -- get whether the event is attributed to a flow or campaign\n coalesce(touch_type, first_value(touch_type) over(\n partition by person_id, source_relation, touch_session order by occurred_at asc rows between unbounded preceding and current row)) \n\n as session_touch_type -- if the session events qualified for attribution, extract the type of touch they are attributed to\n\n from attribute \n)\n\nselect * from final", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt.is_incremental", "macro.dbt_utils.datediff", "macro.dbt_utils.dateadd", "macro.dbt_utils.type_timestamp"], "nodes": ["model.klaviyo_source.stg_klaviyo__event"]}, "config": {"enabled": true, "alias": null, "schema": "klaviyo_combo", "database": null, "tags": [], "meta": {}, "materialized": "incremental", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "partition_by": {"field": "occurred_on", "data_type": "date"}, "unique_key": "unique_event_id", "incremental_strategy": "merge", "file_format": "delta", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_transformations", "fqn": ["klaviyo", "intermediate", "int_klaviyo__event_attribution"], "unique_id": "model.klaviyo.int_klaviyo__event_attribution", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/klaviyo", "path": "intermediate/int_klaviyo__event_attribution.sql", "original_file_path": "models/intermediate/int_klaviyo__event_attribution.sql", "name": "int_klaviyo__event_attribution", "alias": "int_klaviyo__event_attribution", "checksum": {"name": "sha256", "checksum": "22789e5f90114e1efca414b23605fed6362bc83f6bc21397f7337880e6844b9d"}, "tags": [], "refs": [["stg_klaviyo__event"]], "sources": [], "description": "Table enriching events with an additional layer of last-touch attribution. Though Klaviyo already performs attribution on events each day, this extra step is necessary, as certain kinds of events/metrics never get attributed to flows or campaigns via Klaviyo's internal model. \nBy default, the package performs attribution [in line with Klaviyo](https://help.klaviyo.com/hc/en-us/articles/115005248128). It considers email opens and clicks, and SMS opens as the events eligible to be credited with conversions. This attribution-eligibility can be configured by the `klaviyo__eligible_attribution_events` variable. Note that this refers to the events eligible to credit campaigns and flows with conversions, _not_ the events eligible to receive attribution (all kinds of events are privy to this).\nSimilar to Klaviyo, the package by default considers the conversion period/lookback window for email events to be 120 hours (5 days) and 24 hours for SMS events. These can be configured through the `klaviyo__email_attribution_lookback` and `klaviyo__sms_attribution_lookback` variables, respectively (in integer-hours).\nNote: this model has an incremental materialization. Custom event-columns specified by the `klaviyo__event_pass_through_columns` variable will appear here as well.\n", "columns": {"variation_id": {"name": "variation_id", "description": "Unique ID of the attributed flow or campaign variation group. This does not map onto another table. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Foreign key referencing the CAMPAIGN that the event is attributed to.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "occurred_at": {"name": "occurred_at", "description": "Timestamp of when the event was triggered.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_id": {"name": "flow_id", "description": "Foreign key referencing the FLOW that the event is attributed to.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_message_id": {"name": "flow_message_id", "description": "Unique ID of the FLOW_MESSAGE that the event is attributed to. This does not map onto another table.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "event_id": {"name": "event_id", "description": "Unique ID of the event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "metric_id": {"name": "metric_id", "description": "Foreign key referencing the metric being captured.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "person_id": {"name": "person_id", "description": "Foreign key referencing the PERSON who triggered the event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "type": {"name": "type", "description": "Type of event that was triggered. This is the same as the METRIC name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "uuid": {"name": "uuid", "description": "Universally Unique Identifier of the event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "numeric_value": {"name": "numeric_value", "description": "Numeric value associated with the event (ie the dollars associated with a purchase).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "touch_type": {"name": "touch_type", "description": "Type of touch/message that the event itself is already attributed to in Klaviyo. Either 'flow', 'campaign', or null. Note that the package will refer to campaign and flow interactions as \"touches\".\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "occurred_on": {"name": "occurred_on", "description": "Calendar date (UTC) on which the event occurred.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "touch_id": {"name": "touch_id", "description": "Coalescing of the Klaviyo-attributed campaign_id and flow_id.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "touch_session": {"name": "touch_session", "description": "ID used to batch an individual person's events into attribution-groups. Each event that comes attributed to a campaign or flow begins a new session/batch, in which the following events without a flow/campaign_id have the same `touch_session` (and may be attributed to the same flow/campaign).\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "session_start_at": {"name": "session_start_at", "description": "Timestamp of when, relative to the current event, this person last interacted with a campaign or flow according to Klaviyo. This is the beginning of the event's touch-session.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "session_event_type": {"name": "session_event_type", "description": "The type of event through which, relative to the current event, the person last interacted with a campaign or flow. This information is used to determine which lookback window to use (email vs sms).\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_id": {"name": "last_touch_id", "description": "The campaign or flow that the package attributed the event to.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_type": {"name": "last_touch_type", "description": "What kind of touch the event was attributed to by the package -- 'campaign', 'flow', or null.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "UTC Timestamp that indicates the start time of the Fivetran job that synced this event row.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "unique_event_id": {"name": "unique_event_id", "description": "The unique identifier for the combination of event_id and source_relation columns.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_relation": {"name": "source_relation", "description": "The source where this data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioining together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "klaviyo://models/intermediate/int_klaviyo.yml", "compiled_path": "target/compiled/klaviyo/models/intermediate/int_klaviyo__event_attribution.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "incremental", "schema": "klaviyo_combo", "unique_key": "unique_event_id", "partition_by": {"field": "occurred_on", "data_type": "date"}, "incremental_strategy": "merge", "file_format": "delta"}, "created_at": 1641410292.6076338, "compiled_sql": "\n\nwith events as (\n\n select \n *,\n -- no event will be attributed to both a campaign and flow\n coalesce(campaign_id, flow_id) as touch_id,\n case \n when campaign_id is not null then 'campaign' \n when flow_id is not null then 'flow' \n else null end as touch_type -- defintion: touch = interaction with campaign/flow\n\n from `dbt-package-testing`.`dbt_transformations`.`stg_klaviyo__event`\n\n \n -- grab **ALL** events for users who have any events in this new increment\n where person_id in (\n\n select distinct person_id\n from `dbt-package-testing`.`dbt_transformations`.`stg_klaviyo__event`\n\n -- most events (from all kinds of integrations) at least once every hour\n -- https://help.klaviyo.com/hc/en-us/articles/115005253208\n where _fivetran_synced >= cast(coalesce( \n (\n select \n\n datetime_add(\n cast( max(_fivetran_synced) as datetime),\n interval -1 hour\n )\n\n \n from `dbt-package-testing`.`dbt_transformations`.`int_klaviyo__event_attribution`\n ), '2012-01-01') as \n timestamp\n ) -- klaviyo was founded in 2012, so let's default the min date to then\n )\n \n),\n\n-- sessionize events based on attribution eligibility -- is it the right kind of event, and does it have a campaign or flow?\ncreate_sessions as (\n select\n *,\n -- default klaviyo__event_attribution_filter limits attribution-eligible events to to email opens, email clicks, and sms opens\n -- https://help.klaviyo.com/hc/en-us/articles/115005248128\n\n -- events that come with flow/campaign attributions (and are eligible event types) will create new sessions.\n -- non-attributed events that come in afterward will be batched into the same attribution-session\n sum(case when touch_id is not null\n \n and lower(type) in ('ordered product', 'checkout started', 'viewed product', 'active on site', 'placed order', 'received email', 'opened email', 'clicked email')\n \n then 1 else 0 end) over (\n partition by person_id, source_relation order by occurred_at asc rows between unbounded preceding and current row) as touch_session \n\n from events\n\n),\n\n-- \"session start\" refers to the event in a \"touch session\" that is already attributed with a campaign or flow by Klaviyo\n-- a new event that is attributed with a campaign/flow will trigger a new session, so there will only be one already-attributed event per each session \n-- events that are missing attributions will borrow data from the event that triggered the session, if they are in the lookback window (see `attribute` CTE)\nlast_touches as (\n\n select \n *,\n -- when did the touch session begin?\n min(occurred_at) over(partition by person_id, source_relation, touch_session) as session_start_at,\n\n -- get the kind of metric/event that triggered the attribution session, in order to decide \n -- to use the sms or email lookback value. \n first_value(type) over(\n partition by person_id, source_relation, touch_session order by occurred_at asc rows between unbounded preceding and current row) as session_event_type\n\n from create_sessions\n),\n\nattribute as (\n\n select \n *,\n -- klaviyo uses different lookback windows for email and sms events\n -- default email lookback = 5 days (120 hours) -> https://help.klaviyo.com/hc/en-us/articles/115005248128#conversion-tracking1\n -- default sms lookback: 1 day (24 hours -> https://help.klaviyo.com/hc/en-us/articles/115005248128#sms-conversion-tracking7\n\n coalesce(touch_id, -- use pre-attributed flow/campaign if provided\n case \n when \n\n datetime_diff(\n cast(occurred_at as datetime),\n cast(session_start_at as datetime),\n hour\n )\n\n <= (\n case \n when lower(session_event_type) like '%sms%' then 24\n else 120 end\n ) -- if the events fall within the lookback window, attribute\n then first_value(touch_id) over (\n partition by person_id, source_relation, touch_session order by occurred_at asc rows between unbounded preceding and current row)\n else null end) as last_touch_id -- session qualified for attribution -> we will call this \"last touch\"\n\n from last_touches \n),\n\nfinal as (\n\n select\n *,\n\n -- get whether the event is attributed to a flow or campaign\n coalesce(touch_type, first_value(touch_type) over(\n partition by person_id, source_relation, touch_session order by occurred_at asc rows between unbounded preceding and current row)) \n\n as session_touch_type -- if the session events qualified for attribution, extract the type of touch they are attributed to\n\n from attribute \n)\n\nselect * from final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_transformations`.`int_klaviyo__event_attribution`"}, "model.shopify.shopify__customer_cohorts": {"raw_sql": "with calendar as (\n\n select *\n from {{ ref('shopify__calendar') }}\n where cast({{ dbt_utils.date_trunc('month','date_day') }} as date) = date_day\n\n), customers as (\n\n select *\n from {{ ref('shopify__customers') }}\n\n), orders as (\n\n select *\n from {{ ref('shopify__orders') }}\n\n), customer_calendar as (\n\n select\n calendar.date_day as date_month,\n customers.customer_id,\n customers.first_order_timestamp,\n customers.source_relation,\n {{ dbt_utils.date_trunc('month', 'first_order_timestamp') }} as cohort_month\n from calendar\n inner join customers\n on cast({{ dbt_utils.date_trunc('month', 'first_order_timestamp') }} as date) <= calendar.date_day\n\n), orders_joined as (\n\n select \n customer_calendar.date_month, \n customer_calendar.customer_id, \n customer_calendar.first_order_timestamp,\n customer_calendar.cohort_month,\n customer_calendar.source_relation,\n coalesce(count(distinct orders.order_id), 0) as order_count_in_month,\n coalesce(sum(orders.order_adjusted_total), 0) as total_price_in_month,\n coalesce(sum(orders.line_item_count), 0) as line_item_count_in_month\n from customer_calendar\n left join orders\n on customer_calendar.customer_id = orders.customer_id\n and customer_calendar.source_relation = orders.source_relation\n and customer_calendar.date_month = cast({{ dbt_utils.date_trunc('month', 'created_timestamp') }} as date)\n group by 1,2,3,4,5\n\n), windows as (\n\n {% set partition_string = 'partition by customer_id, source_relation order by date_month rows between unbounded preceding and current row' %}\n\n select\n *,\n sum(total_price_in_month) over ({{ partition_string }}) as total_price_lifetime,\n sum(order_count_in_month) over ({{ partition_string }}) as order_count_lifetime,\n sum(line_item_count_in_month) over ({{ partition_string }}) as line_item_count_lifetime,\n row_number() over (partition by customer_id, source_relation order by date_month asc) as cohort_month_number\n from orders_joined\n \n), surrogate_key as (\n\n select \n *, \n {{ dbt_utils.surrogate_key(['date_month','customer_id','source_relation']) }} as customer_cohort_id\n from windows\n\n)\n\nselect *\nfrom surrogate_key", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt_utils.date_trunc", "macro.dbt_utils.surrogate_key"], "nodes": ["model.shopify.shopify__calendar", "model.shopify.shopify__customers", "model.shopify.shopify__orders"]}, "config": {"enabled": true, "alias": null, "schema": "shopify_combo", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_transformations", "fqn": ["shopify", "shopify__customer_cohorts"], "unique_id": "model.shopify.shopify__customer_cohorts", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify", "path": "shopify__customer_cohorts.sql", "original_file_path": "models/shopify__customer_cohorts.sql", "name": "shopify__customer_cohorts", "alias": "shopify__customer_cohorts", "checksum": {"name": "sha256", "checksum": "4179fd82cc1aafd2c0e61ad2e4d8d0a2d4a6daf2afbb91a70bc77cc7311cf1aa"}, "tags": [], "refs": [["shopify__calendar"], ["shopify__customers"], ["shopify__orders"]], "sources": [], "description": "Each record represents a customer's performance in a calendar month.", "columns": {"cohort_month": {"name": "cohort_month", "description": "The month the cohort belongs to, i.e the first month the customer had an order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "cohort_month_number": {"name": "cohort_month_number", "description": "The 'number' of the `date_month` of the record, i.e. how many months from their start month this cohort occurred", "meta": {}, "data_type": null, "quote": null, "tags": []}, "customer_cohort_id": {"name": "customer_cohort_id", "description": "Unique key representing a customer in a given month.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "customer_id": {"name": "customer_id", "description": "The ID of the related customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "date_month": {"name": "date_month", "description": "The calendar month the customer stats relate to.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_order_timestamp": {"name": "first_order_timestamp", "description": "The timestamp of the customer's first order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "line_item_count_in_month": {"name": "line_item_count_in_month", "description": "Number of line items purchased in the `date_month`", "meta": {}, "data_type": null, "quote": null, "tags": []}, "line_item_count_lifetime": {"name": "line_item_count_lifetime", "description": "Number of line items purchased up until and including this `date_month`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_count_in_month": {"name": "order_count_in_month", "description": "Number of orders purchased in the `date_month`", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_count_lifetime": {"name": "order_count_lifetime", "description": "Number of orders purchased up until and including this `date_month`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_price_in_month": {"name": "total_price_in_month", "description": "Total amount (in currency) purchased in the `date_month`", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_price_lifetime": {"name": "total_price_lifetime", "description": "Total amount (in currency) up until and including this `date_month`.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify://models/shopify.yml", "compiled_path": "target/compiled/shopify/models/shopify__customer_cohorts.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "shopify_combo", "materialized": "table"}, "created_at": 1641410292.649276, "compiled_sql": "with calendar as (\n\n select *\n from `dbt-package-testing`.`dbt_transformations`.`shopify__calendar`\n where cast(\n timestamp_trunc(\n cast(date_day as timestamp),\n month\n )\n\n as date) = date_day\n\n), customers as (\n\n select *\n from `dbt-package-testing`.`dbt_transformations`.`shopify__customers`\n\n), orders as (\n\n select *\n from `dbt-package-testing`.`dbt_transformations`.`shopify__orders`\n\n), customer_calendar as (\n\n select\n calendar.date_day as date_month,\n customers.customer_id,\n customers.first_order_timestamp,\n customers.source_relation,\n \n timestamp_trunc(\n cast(first_order_timestamp as timestamp),\n month\n )\n\n as cohort_month\n from calendar\n inner join customers\n on cast(\n timestamp_trunc(\n cast(first_order_timestamp as timestamp),\n month\n )\n\n as date) <= calendar.date_day\n\n), orders_joined as (\n\n select \n customer_calendar.date_month, \n customer_calendar.customer_id, \n customer_calendar.first_order_timestamp,\n customer_calendar.cohort_month,\n customer_calendar.source_relation,\n coalesce(count(distinct orders.order_id), 0) as order_count_in_month,\n coalesce(sum(orders.order_adjusted_total), 0) as total_price_in_month,\n coalesce(sum(orders.line_item_count), 0) as line_item_count_in_month\n from customer_calendar\n left join orders\n on customer_calendar.customer_id = orders.customer_id\n and customer_calendar.source_relation = orders.source_relation\n and customer_calendar.date_month = cast(\n timestamp_trunc(\n cast(created_timestamp as timestamp),\n month\n )\n\n as date)\n group by 1,2,3,4,5\n\n), windows as (\n\n \n\n select\n *,\n sum(total_price_in_month) over (partition by customer_id, source_relation order by date_month rows between unbounded preceding and current row) as total_price_lifetime,\n sum(order_count_in_month) over (partition by customer_id, source_relation order by date_month rows between unbounded preceding and current row) as order_count_lifetime,\n sum(line_item_count_in_month) over (partition by customer_id, source_relation order by date_month rows between unbounded preceding and current row) as line_item_count_lifetime,\n row_number() over (partition by customer_id, source_relation order by date_month asc) as cohort_month_number\n from orders_joined\n \n), surrogate_key as (\n\n select \n *, \n to_hex(md5(cast(coalesce(cast(date_month as \n string\n), '') || '-' || coalesce(cast(customer_id as \n string\n), '') || '-' || coalesce(cast(source_relation as \n string\n), '') as \n string\n))) as customer_cohort_id\n from windows\n\n)\n\nselect *\nfrom surrogate_key", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_transformations`.`shopify__customer_cohorts`"}, "model.shopify.shopify__orders": {"raw_sql": "with orders as (\n\n select *\n from {{ var('shopify_order') }}\n\n), order_lines as (\n\n select *\n from {{ ref('shopify__orders__order_line_aggregates') }}\n\n{% if var('shopify__using_order_adjustment', true) %}\n), order_adjustments as (\n\n select *\n from {{ var('shopify_order_adjustment') }}\n\n), order_adjustments_aggregates as (\n select\n order_id,\n source_relation,\n sum(amount) as order_adjustment_amount,\n sum(tax_amount) as order_adjustment_tax_amount\n from order_adjustments\n group by 1,2\n{% endif %}\n\n{% if fivetran_utils.enabled_vars(vars=[\"shopify__using_order_line_refund\", \"shopify__using_refund\"]) %}\n), refunds as (\n\n select *\n from {{ ref('shopify__orders__order_refunds') }}\n\n), refund_aggregates as (\n select\n order_id,\n source_relation,\n sum(subtotal) as refund_subtotal,\n sum(total_tax) as refund_total_tax\n from refunds\n group by 1,2\n{% endif %}\n\n), joined as (\n\n select\n orders.*,\n coalesce(cast({{ fivetran_utils.json_parse(\"total_shipping_price_set\",[\"shop_money\",\"amount\"]) }} as {{ dbt_utils.type_float() }}) ,0) as shipping_cost,\n \n {% if var('shopify__using_order_adjustment', true) %}\n order_adjustments_aggregates.order_adjustment_amount,\n order_adjustments_aggregates.order_adjustment_tax_amount,\n {% endif %}\n\n {% if fivetran_utils.enabled_vars(vars=[\"shopify__using_order_line_refund\", \"shopify__using_refund\"]) %}\n refund_aggregates.refund_subtotal,\n refund_aggregates.refund_total_tax,\n {% endif %}\n (orders.total_price\n {% if var('shopify__using_order_adjustment', true) %}\n + coalesce(order_adjustments_aggregates.order_adjustment_amount,0) + coalesce(order_adjustments_aggregates.order_adjustment_tax_amount,0) \n {% endif %}\n {% if fivetran_utils.enabled_vars(vars=[\"shopify__using_order_line_refund\", \"shopify__using_refund\"]) %}\n - coalesce(refund_aggregates.refund_subtotal,0) - coalesce(refund_aggregates.refund_total_tax,0)\n {% endif %} ) as order_adjusted_total,\n order_lines.line_item_count\n from orders\n left join order_lines\n on orders.order_id = order_lines.order_id\n and orders.source_relation = order_lines.source_relation\n\n {% if fivetran_utils.enabled_vars(vars=[\"shopify__using_order_line_refund\", \"shopify__using_refund\"]) %}\n left join refund_aggregates\n on orders.order_id = refund_aggregates.order_id\n and orders.source_relation = refund_aggregates.source_relation\n {% endif %}\n {% if var('shopify__using_order_adjustment', true) %}\n left join order_adjustments_aggregates\n on orders.order_id = order_adjustments_aggregates.order_id\n and orders.source_relation = order_adjustments_aggregates.source_relation\n {% endif %}\n\n), windows as (\n\n select \n *,\n row_number() over (partition by customer_id, source_relation order by created_timestamp) as customer_order_seq_number\n from joined\n\n), new_vs_repeat as (\n\n select \n *,\n case \n when customer_order_seq_number = 1 then 'new'\n else 'repeat'\n end as new_vs_repeat\n from windows\n\n)\n\nselect *\nfrom new_vs_repeat", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.json_parse", "macro.dbt_utils.type_float"], "nodes": ["model.shopify_source.stg_shopify__order", "model.shopify.shopify__orders__order_line_aggregates", "model.shopify_source.stg_shopify__order_adjustment", "model.shopify.shopify__orders__order_refunds"]}, "config": {"enabled": true, "alias": null, "schema": "shopify_combo", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_transformations", "fqn": ["shopify", "shopify__orders"], "unique_id": "model.shopify.shopify__orders", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify", "path": "shopify__orders.sql", "original_file_path": "models/shopify__orders.sql", "name": "shopify__orders", "alias": "shopify__orders", "checksum": {"name": "sha256", "checksum": "314b165b27050181ab0f5a6e4bcd722c3f6918af348f575dd942f4c6aee4eb0c"}, "tags": [], "refs": [["stg_shopify__order"], ["shopify__orders__order_line_aggregates"], ["stg_shopify__order_adjustment"], ["shopify__orders__order_refunds"]], "sources": [], "description": "Each record represents an order in Shopify.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "app_id": {"name": "app_id", "description": "The ID of the app that created the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_address_1": {"name": "billing_address_address_1", "description": "The street address of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_address_2": {"name": "billing_address_address_2", "description": "An optional additional field for the street address of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_city": {"name": "billing_address_city", "description": "The city, town, or village of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_company": {"name": "billing_address_company", "description": "The company of the person associated with the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_country": {"name": "billing_address_country", "description": "The name of the country of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_country_code": {"name": "billing_address_country_code", "description": "The two-letter code (ISO 3166-1 format) for the country of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_first_name": {"name": "billing_address_first_name", "description": "The first name of the person associated with the payment method.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_last_name": {"name": "billing_address_last_name", "description": "The last name of the person associated with the payment method.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_latitude": {"name": "billing_address_latitude", "description": "The latitude of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_longitude": {"name": "billing_address_longitude", "description": "The longitude of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_name": {"name": "billing_address_name", "description": "The full name of the person associated with the payment method.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_phone": {"name": "billing_address_phone", "description": "The phone number at the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_province": {"name": "billing_address_province", "description": "The name of the region (province, state, prefecture, \u2026) of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_province_code": {"name": "billing_address_province_code", "description": "The two-letter abbreviation of the region of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_zip": {"name": "billing_address_zip", "description": "The postal code (zip, postcode, Eircode, \u2026) of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "browser_ip": {"name": "browser_ip", "description": "The IP address of the browser used by the customer when they placed the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "has_buyer_accepted_marketing": {"name": "has_buyer_accepted_marketing", "description": "Whether the customer consented to receive email updates from the shop.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "cancel_reason": {"name": "cancel_reason", "description": "The reason why the order was canceled.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "cancelled_timestamp": {"name": "cancelled_timestamp", "description": "The date and time when the order was canceled.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "cart_token": {"name": "cart_token", "description": "The ID of the cart that's associated with the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "closed_timestamp": {"name": "closed_timestamp", "description": "The date and time when the order was closed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_timestamp": {"name": "created_timestamp", "description": "The autogenerated date and time when the order was created in Shopify.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "The three-letter code for the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "customer_id": {"name": "customer_id", "description": "The ID of the order's customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email": {"name": "email", "description": "The customer's email address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "financial_status": {"name": "financial_status", "description": "The status of payments associated with the order. Can only be set when the order is created", "meta": {}, "data_type": null, "quote": null, "tags": []}, "fulfillment_status": {"name": "fulfillment_status", "description": "The order's status in terms of fulfilled line items.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_id": {"name": "order_id", "description": "The ID of the order, used for API purposes. This is different from the order_number property, which is the ID used by the shop owner and customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "landing_site_base_url": {"name": "landing_site_base_url", "description": "The URL for the page where the buyer landed when they entered the shop.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "location_id": {"name": "location_id", "description": "The ID of the physical location where the order was processed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "name": {"name": "name", "description": "The order name, generated by combining the order_number property with the order prefix and suffix that are set in the merchant's general settings.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "note": {"name": "note", "description": "An optional note that a shop owner can attach to the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "number": {"name": "number", "description": "The order's position in the shop's count of orders. Numbers are sequential and start at 1.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_number": {"name": "order_number", "description": "The order 's position in the shop's count of orders starting at 1001. Order numbers are sequential and start at 1001.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "processed_timestamp": {"name": "processed_timestamp", "description": "The date and time when an order was processed. This value is the date that appears on your orders and that's used in the analytic reports.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "processing_method": {"name": "processing_method", "description": "How the payment was processed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "referring_site": {"name": "referring_site", "description": "The website where the customer clicked a link to the shop.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_address_1": {"name": "shipping_address_address_1", "description": "The street address of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_address_2": {"name": "shipping_address_address_2", "description": "An optional additional field for the street address of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_city": {"name": "shipping_address_city", "description": "The city, town, or village of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_company": {"name": "shipping_address_company", "description": "The company of the person associated with the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_country": {"name": "shipping_address_country", "description": "The name of the country of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_country_code": {"name": "shipping_address_country_code", "description": "The two-letter code (ISO 3166-1 format) for the country of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_first_name": {"name": "shipping_address_first_name", "description": "The first name of the person associated with the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_last_name": {"name": "shipping_address_last_name", "description": "The last name of the person associated with the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_latitude": {"name": "shipping_address_latitude", "description": "The latitude of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_longitude": {"name": "shipping_address_longitude", "description": "The longitude of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_name": {"name": "shipping_address_name", "description": "The full name of the person associated with the payment method.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_phone": {"name": "shipping_address_phone", "description": "The phone number at the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_province": {"name": "shipping_address_province", "description": "The name of the region (province, state, prefecture, \u2026) of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_province_code": {"name": "shipping_address_province_code", "description": "The two-letter abbreviation of the region of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_zip": {"name": "shipping_address_zip", "description": "The postal code (zip, postcode, Eircode, \u2026) of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_name": {"name": "source_name", "description": "Where the order originated. Can be set only during order creation, and is not writeable afterwards.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "subtotal_price": {"name": "subtotal_price", "description": "The price of the order in the shop currency after discounts but before shipping, taxes, and tips.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "has_taxes_included": {"name": "has_taxes_included", "description": "Whether taxes are included in the order subtotal.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_test_order": {"name": "is_test_order", "description": "Whether this is a test order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "token": {"name": "token", "description": "A unique token for the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_discounts": {"name": "total_discounts", "description": "The total discounts applied to the price of the order in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_line_items_price": {"name": "total_line_items_price", "description": "The sum of all line item prices in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_price": {"name": "total_price", "description": "The sum of all line item prices, discounts, shipping, taxes, and tips in the shop currency. Must be positive.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_tax": {"name": "total_tax", "description": "The sum of all the taxes applied to the order in th shop currency. Must be positive).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_weight": {"name": "total_weight", "description": "The sum of all line item weights in grams.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_timestamp": {"name": "updated_timestamp", "description": "The date and time (ISO 8601 format) when the order was last modified.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "user_id": {"name": "user_id", "description": "The ID of the user logged into Shopify POS who processed the order, if applicable.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "line_item_count": {"name": "line_item_count", "description": "Number of line items included in the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "customer_order_seq_number": {"name": "customer_order_seq_number", "description": "The sequential number of the order as it relates to the customer", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_vs_repeat": {"name": "new_vs_repeat", "description": "Whether the order was a new or repeat order for the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_cost": {"name": "shipping_cost", "description": "The shipping cost of the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_adjustment_amount": {"name": "order_adjustment_amount", "description": "Total adjustment amount applied to the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_adjustment_tax_amount": {"name": "order_adjustment_tax_amount", "description": "Total tax applied to the adjustment on the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refund_subtotal": {"name": "refund_subtotal", "description": "Total refund amount applied to the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refund_total_tax": {"name": "refund_total_tax", "description": "Total tax applied to the refund on the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_adjusted_total": {"name": "order_adjusted_total", "description": "Order total adjusted for refunds and other adjustments. The calculation used for this field is as follows: total price listed on the original order (including shipping costs and discounts) + adjustments + adjustments tax - total refunds - refunds tax The order_adjusted_total will equate to the total sales - refunds listed within the transactions table for the order (after currency exchange).\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "index": {"name": "index", "description": "Field representing the index of the order line in relation to the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "pre_tax_price": {"name": "pre_tax_price", "description": "The pre tax price of the order line.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "checkout_token": {"name": "checkout_token", "description": "The checkout token applied to the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_shipping_price_set": {"name": "total_shipping_price_set", "description": "The total shipping price set to the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify://models/shopify.yml", "compiled_path": "target/compiled/shopify/models/shopify__orders.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "shopify_combo", "materialized": "table"}, "created_at": 1641410292.680285, "compiled_sql": "with __dbt__cte__shopify__orders__order_line_aggregates as (\nwith order_line as (\n\n select *\n from `dbt-package-testing`.`dbt_transformations`.`stg_shopify__order_line`\n\n), aggregated as (\n\n select \n order_id,\n source_relation,\n count(*) as line_item_count\n from order_line\n group by 1,2\n\n)\n\nselect *\nfrom aggregated\n), __dbt__cte__shopify__orders__order_refunds as (\n\n\nwith refunds as (\n\n select *\n from `dbt-package-testing`.`dbt_transformations`.`stg_shopify__refund`\n\n), order_line_refunds as (\n\n select *\n from `dbt-package-testing`.`dbt_transformations`.`stg_shopify__order_line_refund`\n \n), refund_join as (\n\n select \n refunds.refund_id,\n refunds.created_at,\n refunds.order_id,\n refunds.user_id,\n refunds.source_relation,\n order_line_refunds.order_line_refund_id,\n order_line_refunds.order_line_id,\n order_line_refunds.restock_type,\n order_line_refunds.quantity,\n order_line_refunds.subtotal,\n order_line_refunds.total_tax\n from refunds\n left join order_line_refunds\n on refunds.refund_id = order_line_refunds.refund_id\n and refunds.source_relation = order_line_refunds.source_relation\n\n)\n\nselect *\nfrom refund_join\n),orders as (\n\n select *\n from `dbt-package-testing`.`dbt_transformations`.`stg_shopify__order`\n\n), order_lines as (\n\n select *\n from __dbt__cte__shopify__orders__order_line_aggregates\n\n\n), order_adjustments as (\n\n select *\n from `dbt-package-testing`.`dbt_transformations`.`stg_shopify__order_adjustment`\n\n), order_adjustments_aggregates as (\n select\n order_id,\n source_relation,\n sum(amount) as order_adjustment_amount,\n sum(tax_amount) as order_adjustment_tax_amount\n from order_adjustments\n group by 1,2\n\n\n\n), refunds as (\n\n select *\n from __dbt__cte__shopify__orders__order_refunds\n\n), refund_aggregates as (\n select\n order_id,\n source_relation,\n sum(subtotal) as refund_subtotal,\n sum(total_tax) as refund_total_tax\n from refunds\n group by 1,2\n\n\n), joined as (\n\n select\n orders.*,\n coalesce(cast(\n\n \n json_extract_scalar(total_shipping_price_set, '$.shop_money.amount')\n\n as \n float64\n) ,0) as shipping_cost,\n \n \n order_adjustments_aggregates.order_adjustment_amount,\n order_adjustments_aggregates.order_adjustment_tax_amount,\n \n\n \n refund_aggregates.refund_subtotal,\n refund_aggregates.refund_total_tax,\n \n (orders.total_price\n \n + coalesce(order_adjustments_aggregates.order_adjustment_amount,0) + coalesce(order_adjustments_aggregates.order_adjustment_tax_amount,0) \n \n \n - coalesce(refund_aggregates.refund_subtotal,0) - coalesce(refund_aggregates.refund_total_tax,0)\n ) as order_adjusted_total,\n order_lines.line_item_count\n from orders\n left join order_lines\n on orders.order_id = order_lines.order_id\n and orders.source_relation = order_lines.source_relation\n\n \n left join refund_aggregates\n on orders.order_id = refund_aggregates.order_id\n and orders.source_relation = refund_aggregates.source_relation\n \n \n left join order_adjustments_aggregates\n on orders.order_id = order_adjustments_aggregates.order_id\n and orders.source_relation = order_adjustments_aggregates.source_relation\n \n\n), windows as (\n\n select \n *,\n row_number() over (partition by customer_id, source_relation order by created_timestamp) as customer_order_seq_number\n from joined\n\n), new_vs_repeat as (\n\n select \n *,\n case \n when customer_order_seq_number = 1 then 'new'\n else 'repeat'\n end as new_vs_repeat\n from windows\n\n)\n\nselect *\nfrom new_vs_repeat", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.shopify.shopify__orders__order_line_aggregates", "sql": " __dbt__cte__shopify__orders__order_line_aggregates as (\nwith order_line as (\n\n select *\n from `dbt-package-testing`.`dbt_transformations`.`stg_shopify__order_line`\n\n), aggregated as (\n\n select \n order_id,\n source_relation,\n count(*) as line_item_count\n from order_line\n group by 1,2\n\n)\n\nselect *\nfrom aggregated\n)"}, {"id": "model.shopify.shopify__orders__order_refunds", "sql": " __dbt__cte__shopify__orders__order_refunds as (\n\n\nwith refunds as (\n\n select *\n from `dbt-package-testing`.`dbt_transformations`.`stg_shopify__refund`\n\n), order_line_refunds as (\n\n select *\n from `dbt-package-testing`.`dbt_transformations`.`stg_shopify__order_line_refund`\n \n), refund_join as (\n\n select \n refunds.refund_id,\n refunds.created_at,\n refunds.order_id,\n refunds.user_id,\n refunds.source_relation,\n order_line_refunds.order_line_refund_id,\n order_line_refunds.order_line_id,\n order_line_refunds.restock_type,\n order_line_refunds.quantity,\n order_line_refunds.subtotal,\n order_line_refunds.total_tax\n from refunds\n left join order_line_refunds\n on refunds.refund_id = order_line_refunds.refund_id\n and refunds.source_relation = order_line_refunds.source_relation\n\n)\n\nselect *\nfrom refund_join\n)"}], "relation_name": "`dbt-package-testing`.`dbt_transformations`.`shopify__orders`"}, "model.shopify.shopify__products": {"raw_sql": "with products as (\n\n select *\n from {{ var('shopify_product') }}\n\n), order_lines as (\n\n select *\n from {{ ref('shopify__order_lines') }}\n\n), orders as (\n\n select *\n from {{ ref('shopify__orders')}}\n\n), order_lines_aggregated as (\n\n select \n order_lines.product_id, \n order_lines.source_relation,\n sum(order_lines.quantity) as quantity_sold,\n sum(order_lines.pre_tax_price) as subtotal_sold,\n\n {% if fivetran_utils.enabled_vars(vars=[\"shopify__using_order_line_refund\", \"shopify__using_refund\"]) %}\n sum(order_lines.quantity_net_refunds) as quantity_sold_net_refunds,\n sum(order_lines.subtotal_net_refunds) as subtotal_sold_net_refunds,\n {% endif %}\n\n min(orders.created_timestamp) as first_order_timestamp,\n max(orders.created_timestamp) as most_recent_order_timestamp\n from order_lines\n left join orders\n using (order_id, source_relation)\n group by 1,2\n\n), joined as (\n\n select\n products.*,\n coalesce(order_lines_aggregated.quantity_sold,0) as quantity_sold,\n coalesce(order_lines_aggregated.subtotal_sold,0) as subtotal_sold,\n\n {% if fivetran_utils.enabled_vars(vars=[\"shopify__using_order_line_refund\", \"shopify__using_refund\"]) %}\n coalesce(order_lines_aggregated.quantity_sold_net_refunds,0) as quantity_sold_net_refunds,\n coalesce(order_lines_aggregated.subtotal_sold_net_refunds,0) as subtotal_sold_net_refunds,\n {% endif %}\n \n order_lines_aggregated.first_order_timestamp,\n order_lines_aggregated.most_recent_order_timestamp\n from products\n left join order_lines_aggregated\n using (product_id, source_relation)\n\n)\n\nselect *\nfrom joined", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars"], "nodes": ["model.shopify_source.stg_shopify__product", "model.shopify.shopify__order_lines", "model.shopify.shopify__orders"]}, "config": {"enabled": true, "alias": null, "schema": "shopify_combo", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_transformations", "fqn": ["shopify", "shopify__products"], "unique_id": "model.shopify.shopify__products", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify", "path": "shopify__products.sql", "original_file_path": "models/shopify__products.sql", "name": "shopify__products", "alias": "shopify__products", "checksum": {"name": "sha256", "checksum": "e699f3d418cc215e557b5a7ad0705f82470c62c8b54b3fbb29a2896c507ba033"}, "tags": [], "refs": [["stg_shopify__product"], ["shopify__order_lines"], ["shopify__orders"]], "sources": [], "description": "Each record represents a product in Shopify.", "columns": {"_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Whether the record has been deleted in the source system.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_timestamp": {"name": "created_timestamp", "description": "The date and time when the product was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "handle": {"name": "handle", "description": "A unique human-friendly string for the product. Automatically generated from the product's title.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "product_id": {"name": "product_id", "description": "An unsigned 64-bit integer that's used as a unique identifier for the product. Each id is unique across the Shopify system. No two products will have the same id, even if they're from different shops.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "product_type": {"name": "product_type", "description": "A categorization for the product used for filtering and searching products.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "published_timestamp": {"name": "published_timestamp", "description": "The date and time (ISO 8601 format) when the product was published. Can be set to null to unpublish the product from the Online Store channel.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "published_scope": {"name": "published_scope", "description": "Whether the product is published to the Point of Sale channel.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "title": {"name": "title", "description": "The name of the product.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_timestamp": {"name": "updated_timestamp", "description": "The date and time when the product was last modified.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "vendor": {"name": "vendor", "description": "The name of the product's vendor.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "quantity_sold": {"name": "quantity_sold", "description": "Quantity of the product sold.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "subtotal_sold": {"name": "subtotal_sold", "description": "Total amount of the product sold.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "quantity_sold_net_refunds": {"name": "quantity_sold_net_refunds", "description": "Quantity of the product sold, excluding refunds.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "subtotal_sold_net_refunds": {"name": "subtotal_sold_net_refunds", "description": "Total amount of the product sold, excluding refunds.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_order_timestamp": {"name": "first_order_timestamp", "description": "The timestamp the product was first ordered.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "most_recent_order_timestamp": {"name": "most_recent_order_timestamp", "description": "The timestamp the product was most recently ordered.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify://models/shopify.yml", "compiled_path": "target/compiled/shopify/models/shopify__products.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "shopify_combo", "materialized": "table"}, "created_at": 1641410292.695851, "compiled_sql": "with products as (\n\n select *\n from `dbt-package-testing`.`dbt_transformations`.`stg_shopify__product`\n\n), order_lines as (\n\n select *\n from `dbt-package-testing`.`dbt_transformations`.`shopify__order_lines`\n\n), orders as (\n\n select *\n from `dbt-package-testing`.`dbt_transformations`.`shopify__orders`\n\n), order_lines_aggregated as (\n\n select \n order_lines.product_id, \n order_lines.source_relation,\n sum(order_lines.quantity) as quantity_sold,\n sum(order_lines.pre_tax_price) as subtotal_sold,\n\n \n sum(order_lines.quantity_net_refunds) as quantity_sold_net_refunds,\n sum(order_lines.subtotal_net_refunds) as subtotal_sold_net_refunds,\n \n\n min(orders.created_timestamp) as first_order_timestamp,\n max(orders.created_timestamp) as most_recent_order_timestamp\n from order_lines\n left join orders\n using (order_id, source_relation)\n group by 1,2\n\n), joined as (\n\n select\n products.*,\n coalesce(order_lines_aggregated.quantity_sold,0) as quantity_sold,\n coalesce(order_lines_aggregated.subtotal_sold,0) as subtotal_sold,\n\n \n coalesce(order_lines_aggregated.quantity_sold_net_refunds,0) as quantity_sold_net_refunds,\n coalesce(order_lines_aggregated.subtotal_sold_net_refunds,0) as subtotal_sold_net_refunds,\n \n \n order_lines_aggregated.first_order_timestamp,\n order_lines_aggregated.most_recent_order_timestamp\n from products\n left join order_lines_aggregated\n using (product_id, source_relation)\n\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_transformations`.`shopify__products`"}, "model.shopify.shopify__transactions": {"raw_sql": "with transactions as (\n select *\n from {{ var('shopify_transaction') }}\n\n), exchange_rate as (\n\n select\n *,\n coalesce(cast(nullif({{ fivetran_utils.json_parse(\"receipt\",[\"charges\",\"data\",0,\"balance_transaction\",\"exchange_rate\"]) }}, '') as {{ dbt_utils.type_numeric() }} ),1) as exchange_rate,\n coalesce(cast(nullif({{ fivetran_utils.json_parse(\"receipt\",[\"charges\",\"data\",0,\"balance_transaction\",\"exchange_rate\"]) }}, '') as {{ dbt_utils.type_numeric() }} ),1) * amount as currency_exchange_calculated_amount\n from transactions\n\n)\n\nselect *\nfrom exchange_rate", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.json_parse", "macro.dbt_utils.type_numeric"], "nodes": ["model.shopify_source.stg_shopify__transaction"]}, "config": {"enabled": true, "alias": null, "schema": "shopify_combo", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_transformations", "fqn": ["shopify", "shopify__transactions"], "unique_id": "model.shopify.shopify__transactions", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify", "path": "shopify__transactions.sql", "original_file_path": "models/shopify__transactions.sql", "name": "shopify__transactions", "alias": "shopify__transactions", "checksum": {"name": "sha256", "checksum": "88e4a9aa6d2acc8dbe0e1d3f280087b5adb6a730391785680d0bf112b0923906"}, "tags": [], "refs": [["stg_shopify__transaction"]], "sources": [], "description": "Each record represents a transaction in Shopify.", "columns": {"transaction_id": {"name": "transaction_id", "description": "The ID for the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_id": {"name": "order_id", "description": "The ID for the order that the transaction is associated with.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refund_id": {"name": "refund_id", "description": "The ID associated with a refund in the refund table.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "amount": {"name": "amount", "description": "The amount of money included in the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "authorization": {"name": "authorization", "description": "The authorization code associated with the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_timestamp": {"name": "created_timestamp", "description": "The date and time when the transaction was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "processed_timestamp": {"name": "processed_timestamp", "description": "The date and time when a transaction was processed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "device_id": {"name": "device_id", "description": "The ID for the device.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "gateway": {"name": "gateway", "description": "The name of the gateway the transaction was issued through.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_name": {"name": "source_name", "description": "The origin of the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "message": {"name": "message", "description": "A string generated by the payment provider with additional information about why the transaction succeeded or failed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "The three-letter code (ISO 4217 format) for the currency used for the payment.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "location_id": {"name": "location_id", "description": "The ID of the physical location where the transaction was processed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "parent_id": {"name": "parent_id", "description": "The ID of an associated transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payment_avs_result_code": {"name": "payment_avs_result_code", "description": "The response code from the address verification system.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payment_credit_card_bin": {"name": "payment_credit_card_bin", "description": "The issuer identification number (IIN), formerly known as bank identification number (BIN) of the customer's credit card.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payment_cvv_result_code": {"name": "payment_cvv_result_code", "description": "The response code from the credit card company indicating whether the customer entered the card security code, or card verification value, correctly.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payment_credit_card_number": {"name": "payment_credit_card_number", "description": "The customer's credit card number, with most of the leading digits redacted.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payment_credit_card_company": {"name": "payment_credit_card_company", "description": "The name of the company that issued the customer's credit card.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "kind": {"name": "kind", "description": "The transaction's type.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "receipt": {"name": "receipt", "description": "A transaction receipt attached to the transaction by the gateway.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency_exchange_id": {"name": "currency_exchange_id", "description": "The ID of the adjustment.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency_exchange_adjustment": {"name": "currency_exchange_adjustment", "description": "The difference between the amounts on the associated transaction and the parent transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency_exchange_original_amount": {"name": "currency_exchange_original_amount", "description": "The amount of the parent transaction in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency_exchange_final_amount": {"name": "currency_exchange_final_amount", "description": "The amount of the associated transaction in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency_exchange_currency": {"name": "currency_exchange_currency", "description": "The shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "error_code": {"name": "error_code", "description": "A standardized error code, independent of the payment provider.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status": {"name": "status", "description": "The status of the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "test": {"name": "test", "description": "Whether the transaction is a test transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "user_id": {"name": "user_id", "description": "The ID for the user who was logged into the Shopify POS device when the order was processed, if applicable.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of the date the record was synced by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "exchange_rate": {"name": "exchange_rate", "description": "The exchange rate between the home currency and the currency of sale at the time of the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency_exchange_calculated_amount": {"name": "currency_exchange_calculated_amount", "description": "The total amount of the transaction with the currency exchange rate applied.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify://models/shopify.yml", "compiled_path": "target/compiled/shopify/models/shopify__transactions.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "shopify_combo", "materialized": "table"}, "created_at": 1641410292.727286, "compiled_sql": "with transactions as (\n select *\n from `dbt-package-testing`.`dbt_transformations`.`stg_shopify__transaction`\n\n), exchange_rate as (\n\n select\n *,\n coalesce(cast(nullif(\n\n \n json_extract_scalar(receipt, '$.charges.data.0.balance_transaction.exchange_rate')\n\n, '') as \n numeric\n ),1) as exchange_rate,\n coalesce(cast(nullif(\n\n \n json_extract_scalar(receipt, '$.charges.data.0.balance_transaction.exchange_rate')\n\n, '') as \n numeric\n ),1) * amount as currency_exchange_calculated_amount\n from transactions\n\n)\n\nselect *\nfrom exchange_rate", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_transformations`.`shopify__transactions`"}, "model.shopify.shopify__customers": {"raw_sql": "with customers as (\n\n select \n {{ dbt_utils.star(from=ref('stg_shopify__customer'), except=[\"orders_count\", \"total_spent\"]) }}\n from {{ var('shopify_customer') }}\n\n), orders as (\n\n select *\n from {{ ref('shopify__customers__order_aggregates' )}}\n\n), joined as (\n\n select \n customers.*,\n orders.first_order_timestamp,\n orders.most_recent_order_timestamp,\n coalesce(orders.average_order_value, 0) as average_order_value,\n coalesce(orders.lifetime_total_spent, 0) as lifetime_total_spent,\n coalesce(orders.lifetime_total_refunded, 0) as lifetime_total_refunded,\n (coalesce(orders.lifetime_total_spent, 0) - coalesce(orders.lifetime_total_refunded, 0)) as lifetime_total_amount,\n coalesce(orders.lifetime_count_orders, 0) as lifetime_count_orders\n from customers\n left join orders\n using (customer_id, source_relation)\n\n)\n\nselect *\nfrom joined", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": ["model.shopify_source.stg_shopify__customer", "model.shopify_source.stg_shopify__customer", "model.shopify.shopify__customers__order_aggregates"]}, "config": {"enabled": true, "alias": null, "schema": "shopify_combo", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_transformations", "fqn": ["shopify", "shopify__customers"], "unique_id": "model.shopify.shopify__customers", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify", "path": "shopify__customers.sql", "original_file_path": "models/shopify__customers.sql", "name": "shopify__customers", "alias": "shopify__customers", "checksum": {"name": "sha256", "checksum": "70e28dce05bc26f7fc7678928e4bf4ab455d399c6f314f54d3c4671be96d3b7e"}, "tags": [], "refs": [["stg_shopify__customer"], ["stg_shopify__customer"], ["shopify__customers__order_aggregates"]], "sources": [], "description": "Each record represents a customer in Shopify.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "has_accepted_marketing": {"name": "has_accepted_marketing", "description": "Whether the customer has consented to receive marketing material via email.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_timestamp": {"name": "created_timestamp", "description": "The date and time when the customer was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "default_address_id": {"name": "default_address_id", "description": "The default address for the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email": {"name": "email", "description": "The unique email address of the customer. Attempting to assign the same email address to multiple customers returns an error.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_name": {"name": "first_name", "description": "The customer's first name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "customer_id": {"name": "customer_id", "description": "A unique identifier for the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_name": {"name": "last_name", "description": "The customer's last name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "lifetime_count_orders": {"name": "lifetime_count_orders", "description": "The number of orders associated with this customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "phone": {"name": "phone", "description": "The unique phone number (E.164 format) for this customer. Attempting to assign the same phone number to multiple customers returns an error.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "account_state": {"name": "account_state", "description": "The state of the customer's account with a shop.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_tax_exempt": {"name": "is_tax_exempt", "description": "Whether the customer is exempt from paying taxes on their order. If true, then taxes won't be applied to an order at checkout. If false, then taxes will be applied at checkout.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_timestamp": {"name": "updated_timestamp", "description": "The date and time when the customer information was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_verified_email": {"name": "is_verified_email", "description": "Whether the customer has verified their email address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_order_timestamp": {"name": "first_order_timestamp", "description": "The timestamp the customer completed their first order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "most_recent_order_timestamp": {"name": "most_recent_order_timestamp", "description": "The timestamp the customer completed their most recent order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "average_order_value": {"name": "average_order_value", "description": "The average order value for the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "lifetime_total_spent": {"name": "lifetime_total_spent", "description": "The total amount of money that the customer has spent on orders across their order history.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "lifetime_total_refunded": {"name": "lifetime_total_refunded", "description": "The total amount of money that the customer has been refunded on orders across their order history.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "lifetime_total_amount": {"name": "lifetime_total_amount", "description": "The total amount of money (minus refunds) that the customer has spent across their order history.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify://models/shopify.yml", "compiled_path": "target/compiled/shopify/models/shopify__customers.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "shopify_combo", "materialized": "table"}, "created_at": 1641410292.688918, "compiled_sql": "with __dbt__cte__shopify__customers__order_aggregates as (\nwith orders as (\n\n select *\n from `dbt-package-testing`.`dbt_transformations`.`stg_shopify__order`\n\n), transactions as (\n\n select *\n from `dbt-package-testing`.`dbt_transformations`.`shopify__transactions`\n where lower(status) = 'success'\n\n), aggregated as (\n\n select\n orders.customer_id,\n orders.source_relation,\n min(orders.created_timestamp) as first_order_timestamp,\n max(orders.created_timestamp) as most_recent_order_timestamp,\n avg(case when lower(transactions.kind) in ('sale','capture') then transactions.currency_exchange_calculated_amount end) as average_order_value,\n sum(case when lower(transactions.kind) in ('sale','capture') then transactions.currency_exchange_calculated_amount end) as lifetime_total_spent,\n sum(case when lower(transactions.kind) in ('refund') then transactions.currency_exchange_calculated_amount end) as lifetime_total_refunded,\n count(distinct orders.order_id) as lifetime_count_orders\n from orders\n left join transactions\n using (order_id, source_relation)\n where customer_id is not null\n group by 1,2\n\n)\n\nselect *\nfrom aggregated\n),customers as (\n\n select \n `_fivetran_synced` as `_fivetran_synced`,\n `has_accepted_marketing` as `has_accepted_marketing`,\n `created_timestamp` as `created_timestamp`,\n `default_address_id` as `default_address_id`,\n `email` as `email`,\n `first_name` as `first_name`,\n `customer_id` as `customer_id`,\n `last_name` as `last_name`,\n `phone` as `phone`,\n `account_state` as `account_state`,\n `is_tax_exempt` as `is_tax_exempt`,\n `updated_timestamp` as `updated_timestamp`,\n `is_verified_email` as `is_verified_email`,\n `multipass_identifier` as `multipass_identifier`,\n `source_relation` as `source_relation`\n from `dbt-package-testing`.`dbt_transformations`.`stg_shopify__customer`\n\n), orders as (\n\n select *\n from __dbt__cte__shopify__customers__order_aggregates\n\n), joined as (\n\n select \n customers.*,\n orders.first_order_timestamp,\n orders.most_recent_order_timestamp,\n coalesce(orders.average_order_value, 0) as average_order_value,\n coalesce(orders.lifetime_total_spent, 0) as lifetime_total_spent,\n coalesce(orders.lifetime_total_refunded, 0) as lifetime_total_refunded,\n (coalesce(orders.lifetime_total_spent, 0) - coalesce(orders.lifetime_total_refunded, 0)) as lifetime_total_amount,\n coalesce(orders.lifetime_count_orders, 0) as lifetime_count_orders\n from customers\n left join orders\n using (customer_id, source_relation)\n\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.shopify.shopify__customers__order_aggregates", "sql": " __dbt__cte__shopify__customers__order_aggregates as (\nwith orders as (\n\n select *\n from `dbt-package-testing`.`dbt_transformations`.`stg_shopify__order`\n\n), transactions as (\n\n select *\n from `dbt-package-testing`.`dbt_transformations`.`shopify__transactions`\n where lower(status) = 'success'\n\n), aggregated as (\n\n select\n orders.customer_id,\n orders.source_relation,\n min(orders.created_timestamp) as first_order_timestamp,\n max(orders.created_timestamp) as most_recent_order_timestamp,\n avg(case when lower(transactions.kind) in ('sale','capture') then transactions.currency_exchange_calculated_amount end) as average_order_value,\n sum(case when lower(transactions.kind) in ('sale','capture') then transactions.currency_exchange_calculated_amount end) as lifetime_total_spent,\n sum(case when lower(transactions.kind) in ('refund') then transactions.currency_exchange_calculated_amount end) as lifetime_total_refunded,\n count(distinct orders.order_id) as lifetime_count_orders\n from orders\n left join transactions\n using (order_id, source_relation)\n where customer_id is not null\n group by 1,2\n\n)\n\nselect *\nfrom aggregated\n)"}], "relation_name": "`dbt-package-testing`.`dbt_transformations`.`shopify__customers`"}, "model.shopify.shopify__order_lines": {"raw_sql": "with order_lines as (\n\n select *\n from {{ var('shopify_order_line') }}\n\n), product_variants as (\n\n select *\n from {{ var('shopify_product_variant') }}\n\n{% if fivetran_utils.enabled_vars(vars=[\"shopify__using_order_line_refund\", \"shopify__using_refund\"]) %}\n), refunds as (\n\n select *\n from {{ ref('shopify__orders__order_refunds') }}\n\n), refunds_aggregated as (\n \n select\n order_line_id,\n source_relation,\n sum(quantity) as quantity,\n sum(coalesce(subtotal, 0)) as subtotal\n from refunds\n group by 1,2\n{% endif %}\n\n), joined as (\n\n select\n order_lines.*,\n\n {% if fivetran_utils.enabled_vars(vars=[\"shopify__using_order_line_refund\", \"shopify__using_refund\"]) %}\n coalesce(refunds_aggregated.quantity,0) as refunded_quantity,\n coalesce(refunds_aggregated.subtotal,0) as refunded_subtotal,\n order_lines.quantity - coalesce(refunds_aggregated.quantity,0) as quantity_net_refunds,\n order_lines.pre_tax_price - coalesce(refunds_aggregated.subtotal,0) as subtotal_net_refunds,\n {% endif %}\n \n product_variants.created_timestamp as variant_created_at,\n product_variants.updated_timestamp as variant_updated_at,\n product_variants.inventory_item_id,\n product_variants.image_id,\n product_variants.title as variant_title,\n product_variants.price as variant_price,\n product_variants.sku as variant_sku,\n product_variants.position as variant_position,\n product_variants.inventory_policy as variant_inventory_policy,\n product_variants.compare_at_price as variant_compare_at_price,\n product_variants.fulfillment_service as variant_fulfillment_service,\n product_variants.inventory_management as variant_inventory_management,\n product_variants.is_taxable as variant_is_taxable,\n product_variants.barcode as variant_barcode,\n product_variants.grams as variant_grams,\n product_variants.inventory_quantity as variant_inventory_quantity,\n product_variants.weight as variant_weight,\n product_variants.weight_unit as variant_weight_unit,\n product_variants.option_1 as variant_option_1,\n product_variants.option_2 as variant_option_2,\n product_variants.option_3 as variant_option_3,\n product_variants.tax_code as variant_tax_code,\n product_variants.is_requiring_shipping as variant_is_requiring_shipping\n from order_lines\n {% if fivetran_utils.enabled_vars(vars=[\"shopify__using_order_line_refund\", \"shopify__using_refund\"]) %}\n left join refunds_aggregated\n on refunds_aggregated.order_line_id = order_lines.order_line_id\n and refunds_aggregated.source_relation = order_lines.source_relation\n {% endif %}\n left join product_variants\n on product_variants.variant_id = order_lines.variant_id\n and product_variants.source_relation = order_lines.source_relation\n\n)\n\nselect *\nfrom joined", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars"], "nodes": ["model.shopify_source.stg_shopify__order_line", "model.shopify_source.stg_shopify__product_variant", "model.shopify.shopify__orders__order_refunds"]}, "config": {"enabled": true, "alias": null, "schema": "shopify_combo", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_transformations", "fqn": ["shopify", "shopify__order_lines"], "unique_id": "model.shopify.shopify__order_lines", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify", "path": "shopify__order_lines.sql", "original_file_path": "models/shopify__order_lines.sql", "name": "shopify__order_lines", "alias": "shopify__order_lines", "checksum": {"name": "sha256", "checksum": "c9fa8308e1257375b69ec4b40135a4d1ad64fab1d9e0c14b7a353132438df5d8"}, "tags": [], "refs": [["stg_shopify__order_line"], ["stg_shopify__product_variant"], ["shopify__orders__order_refunds"]], "sources": [], "description": "Each record represents a line item of an order in Shopify.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "fulfillable_quantity": {"name": "fulfillable_quantity", "description": "The amount available to fulfill, calculated as follows: quantity - max(refunded_quantity, fulfilled_quantity) - pending_fulfilled_quantity - open_fulfilled_quantity", "meta": {}, "data_type": null, "quote": null, "tags": []}, "fulfillment_service": {"name": "fulfillment_service", "description": "The service provider that's fulfilling the item.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "fulfillment_status": {"name": "fulfillment_status", "description": "How far along an order is in terms line items fulfilled.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_gift_card": {"name": "is_gift_card", "description": "Whether the item is a gift card. If true, then the item is not taxed or considered for shipping charges.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "grams": {"name": "grams", "description": "The weight of the item in grams.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_line_id": {"name": "order_line_id", "description": "The ID of the line item.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "name": {"name": "name", "description": "The name of the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_id": {"name": "order_id", "description": "The ID of the related order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "price": {"name": "price", "description": "The price of the item before discounts have been applied in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "product_id": {"name": "product_id", "description": "The ID of the product that the line item belongs to. Can be null if the original product associated with the order is deleted at a later date.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "quantity": {"name": "quantity", "description": "The number of items that were purchased.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_requiring_shipping": {"name": "is_requiring_shipping", "description": "Whether the item requires shipping.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "sku": {"name": "sku", "description": "The item's SKU (stock keeping unit).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_taxable": {"name": "is_taxable", "description": "Whether the item was taxable.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "title": {"name": "title", "description": "The title of the product.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_discount": {"name": "total_discount", "description": "The total amount of the discount allocated to the line item in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_id": {"name": "variant_id", "description": "The ID of the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "vendor": {"name": "vendor", "description": "The name of the item's supplier.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refunded_quantity": {"name": "refunded_quantity", "description": "Quantity of the item that has been refunded.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "quantity_net_refunds": {"name": "quantity_net_refunds", "description": "Quantity ordered, excluding refunds.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_barcode": {"name": "variant_barcode", "description": "The barcode, UPC, or ISBN number for the product.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_compare_at_price": {"name": "variant_compare_at_price", "description": "The original price of the item before an adjustment or a sale.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_created_at": {"name": "variant_created_at", "description": "The date and time (ISO 8601 format) when the product variant was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_fulfillment_service": {"name": "variant_fulfillment_service", "description": "The fulfillment service associated with the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_grams": {"name": "variant_grams", "description": "The weight of the product variant in grams.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_image_id": {"name": "variant_image_id", "description": "The unique numeric identifier for a product's image. The image must be associated to the same product as the variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "inventory_item_id": {"name": "inventory_item_id", "description": "The unique identifier for the inventory item, which is used in the Inventory API to query for inventory information.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_inventory_management": {"name": "variant_inventory_management", "description": "The fulfillment service that tracks the number of items in stock for the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_inventory_policy": {"name": "variant_inventory_policy", "description": "Whether customers are allowed to place an order for the product variant when it's out of stock.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_inventory_quantity": {"name": "variant_inventory_quantity", "description": "An aggregate of inventory across all locations. To adjust inventory at a specific location, use the InventoryLevel resource.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_option_1": {"name": "variant_option_1", "description": "The custom properties that a shop owner uses to define product variants. You can define three options for a product variant: option1, option2, option3.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_option_2": {"name": "variant_option_2", "description": "The custom properties that a shop owner uses to define product variants. You can define three options for a product variant: option1, option2, option3.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_option_3": {"name": "variant_option_3", "description": "The custom properties that a shop owner uses to define product variants. You can define three options for a product variant: option1, option2, option3.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_position": {"name": "variant_position", "description": "The order of the product variant in the list of product variants. The first position in the list is 1. The position of variants is indicated by the order in which they are listed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_price": {"name": "variant_price", "description": "The price of the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_is_requiring_shipping": {"name": "variant_is_requiring_shipping", "description": "This property is deprecated. Use the `requires_shipping` property on the InventoryItem resource instead.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_sku": {"name": "variant_sku", "description": "A unique identifier for the product variant in the shop. Required in order to connect to a FulfillmentService.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_is_taxable": {"name": "variant_is_taxable", "description": "Whether a tax is charged when the product variant is sold.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_title": {"name": "variant_title", "description": "The title of the product variant. The title field is a concatenation of the option1, option2, and option3 fields. You can only update title indirectly using the option fields.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_updated_at": {"name": "variant_updated_at", "description": "The date and time when the product variant was last modified. Gets returned in ISO 8601 format.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_weight": {"name": "variant_weight", "description": "The weight of the product variant in the unit system specified with weight_unit.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_weight_unit": {"name": "variant_weight_unit", "description": "The unit of measurement that applies to the product variant's weight. If you don't specify a value for weight_unit, then the shop's default unit of measurement is applied. Valid values: g, kg, oz, and lb.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refunded_subtotal": {"name": "refunded_subtotal", "description": "Subtotal amount of the refund applied to the order line.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "subtotal_net_refunds": {"name": "subtotal_net_refunds", "description": "Subtotal of the order line with refunds subtracted.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "image_id": {"name": "image_id", "description": "Image id of the product variant associated with the order line.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify://models/shopify.yml", "compiled_path": "target/compiled/shopify/models/shopify__order_lines.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "shopify_combo", "materialized": "table"}, "created_at": 1641410292.7137752, "compiled_sql": "with __dbt__cte__shopify__orders__order_refunds as (\n\n\nwith refunds as (\n\n select *\n from `dbt-package-testing`.`dbt_transformations`.`stg_shopify__refund`\n\n), order_line_refunds as (\n\n select *\n from `dbt-package-testing`.`dbt_transformations`.`stg_shopify__order_line_refund`\n \n), refund_join as (\n\n select \n refunds.refund_id,\n refunds.created_at,\n refunds.order_id,\n refunds.user_id,\n refunds.source_relation,\n order_line_refunds.order_line_refund_id,\n order_line_refunds.order_line_id,\n order_line_refunds.restock_type,\n order_line_refunds.quantity,\n order_line_refunds.subtotal,\n order_line_refunds.total_tax\n from refunds\n left join order_line_refunds\n on refunds.refund_id = order_line_refunds.refund_id\n and refunds.source_relation = order_line_refunds.source_relation\n\n)\n\nselect *\nfrom refund_join\n),order_lines as (\n\n select *\n from `dbt-package-testing`.`dbt_transformations`.`stg_shopify__order_line`\n\n), product_variants as (\n\n select *\n from `dbt-package-testing`.`dbt_transformations`.`stg_shopify__product_variant`\n\n\n), refunds as (\n\n select *\n from __dbt__cte__shopify__orders__order_refunds\n\n), refunds_aggregated as (\n \n select\n order_line_id,\n source_relation,\n sum(quantity) as quantity,\n sum(coalesce(subtotal, 0)) as subtotal\n from refunds\n group by 1,2\n\n\n), joined as (\n\n select\n order_lines.*,\n\n \n coalesce(refunds_aggregated.quantity,0) as refunded_quantity,\n coalesce(refunds_aggregated.subtotal,0) as refunded_subtotal,\n order_lines.quantity - coalesce(refunds_aggregated.quantity,0) as quantity_net_refunds,\n order_lines.pre_tax_price - coalesce(refunds_aggregated.subtotal,0) as subtotal_net_refunds,\n \n \n product_variants.created_timestamp as variant_created_at,\n product_variants.updated_timestamp as variant_updated_at,\n product_variants.inventory_item_id,\n product_variants.image_id,\n product_variants.title as variant_title,\n product_variants.price as variant_price,\n product_variants.sku as variant_sku,\n product_variants.position as variant_position,\n product_variants.inventory_policy as variant_inventory_policy,\n product_variants.compare_at_price as variant_compare_at_price,\n product_variants.fulfillment_service as variant_fulfillment_service,\n product_variants.inventory_management as variant_inventory_management,\n product_variants.is_taxable as variant_is_taxable,\n product_variants.barcode as variant_barcode,\n product_variants.grams as variant_grams,\n product_variants.inventory_quantity as variant_inventory_quantity,\n product_variants.weight as variant_weight,\n product_variants.weight_unit as variant_weight_unit,\n product_variants.option_1 as variant_option_1,\n product_variants.option_2 as variant_option_2,\n product_variants.option_3 as variant_option_3,\n product_variants.tax_code as variant_tax_code,\n product_variants.is_requiring_shipping as variant_is_requiring_shipping\n from order_lines\n \n left join refunds_aggregated\n on refunds_aggregated.order_line_id = order_lines.order_line_id\n and refunds_aggregated.source_relation = order_lines.source_relation\n \n left join product_variants\n on product_variants.variant_id = order_lines.variant_id\n and product_variants.source_relation = order_lines.source_relation\n\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.shopify.shopify__orders__order_refunds", "sql": " __dbt__cte__shopify__orders__order_refunds as (\n\n\nwith refunds as (\n\n select *\n from `dbt-package-testing`.`dbt_transformations`.`stg_shopify__refund`\n\n), order_line_refunds as (\n\n select *\n from `dbt-package-testing`.`dbt_transformations`.`stg_shopify__order_line_refund`\n \n), refund_join as (\n\n select \n refunds.refund_id,\n refunds.created_at,\n refunds.order_id,\n refunds.user_id,\n refunds.source_relation,\n order_line_refunds.order_line_refund_id,\n order_line_refunds.order_line_id,\n order_line_refunds.restock_type,\n order_line_refunds.quantity,\n order_line_refunds.subtotal,\n order_line_refunds.total_tax\n from refunds\n left join order_line_refunds\n on refunds.refund_id = order_line_refunds.refund_id\n and refunds.source_relation = order_line_refunds.source_relation\n\n)\n\nselect *\nfrom refund_join\n)"}], "relation_name": "`dbt-package-testing`.`dbt_transformations`.`shopify__order_lines`"}, "model.shopify.shopify__calendar": {"raw_sql": "{{ dbt_utils.date_spine(\n datepart=\"day\",\n start_date=\"cast('2019-01-01' as date)\",\n end_date=\"current_date\"\n )\n}}", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt_utils.date_spine"], "nodes": []}, "config": {"enabled": true, "alias": null, "schema": "shopify_combo", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_transformations", "fqn": ["shopify", "utils", "shopify__calendar"], "unique_id": "model.shopify.shopify__calendar", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify", "path": "utils/shopify__calendar.sql", "original_file_path": "models/utils/shopify__calendar.sql", "name": "shopify__calendar", "alias": "shopify__calendar", "checksum": {"name": "sha256", "checksum": "330711091f6b47526ac5e8bc39960b2d171633362c0e10b666931be500abeddd"}, "tags": [], "refs": [], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify/models/utils/shopify__calendar.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "shopify_combo", "materialized": "table"}, "created_at": 1641410291.938668, "compiled_sql": "\n\n/*\ncall 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*/\n\nwith rawdata as (\n\n \n\n \n\n with p as (\n select 0 as generated_number union all select 1\n ), unioned as (\n\n select\n\n \n p0.generated_number * power(2, 0)\n + \n \n p1.generated_number * power(2, 1)\n + \n \n p2.generated_number * power(2, 2)\n + \n \n p3.generated_number * power(2, 3)\n + \n \n p4.generated_number * power(2, 4)\n + \n \n p5.generated_number * power(2, 5)\n + \n \n p6.generated_number * power(2, 6)\n + \n \n p7.generated_number * power(2, 7)\n + \n \n p8.generated_number * power(2, 8)\n + \n \n p9.generated_number * power(2, 9)\n + \n \n p10.generated_number * power(2, 10)\n \n \n + 1\n as generated_number\n\n from\n\n \n p as p0\n cross join \n \n p as p1\n cross join \n \n p as p2\n cross join \n \n p as p3\n cross join \n \n p as p4\n cross join \n \n p as p5\n cross join \n \n p as p6\n cross join \n \n p as p7\n cross join \n \n p as p8\n cross join \n \n p as p9\n cross join \n \n p as p10\n \n \n\n )\n\n select *\n from unioned\n where generated_number <= 1100\n order by generated_number\n\n\n\n),\n\nall_periods as (\n\n select (\n \n\n datetime_add(\n cast( cast('2019-01-01' as date) as datetime),\n interval row_number() over (order by 1) - 1 day\n )\n\n\n ) as date_day\n from rawdata\n\n),\n\nfiltered as (\n\n select *\n from all_periods\n where date_day <= current_date\n\n)\n\nselect * from filtered\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_transformations`.`shopify__calendar`"}, "model.shopify.shopify__orders__order_line_aggregates": {"raw_sql": "with order_line as (\n\n select *\n from {{ var('shopify_order_line') }}\n\n), aggregated as (\n\n select \n order_id,\n source_relation,\n count(*) as line_item_count\n from order_line\n group by 1,2\n\n)\n\nselect *\nfrom aggregated", "compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["model.shopify_source.stg_shopify__order_line"]}, "config": {"enabled": true, "alias": null, "schema": "shopify_combo", "database": null, "tags": [], "meta": {}, "materialized": "ephemeral", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_transformations", "fqn": ["shopify", "intermediate", "shopify__orders__order_line_aggregates"], "unique_id": "model.shopify.shopify__orders__order_line_aggregates", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify", "path": "intermediate/shopify__orders__order_line_aggregates.sql", "original_file_path": "models/intermediate/shopify__orders__order_line_aggregates.sql", "name": "shopify__orders__order_line_aggregates", "alias": "shopify__orders__order_line_aggregates", "checksum": {"name": "sha256", "checksum": "837181b671b2beb8e58924357d213e33d6479a47e16c604db35cbb6ce6489fa8"}, "tags": [], "refs": [["stg_shopify__order_line"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify://models/intermediate/intermediate.yml", "compiled_path": "target/compiled/shopify/models/intermediate/shopify__orders__order_line_aggregates.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "shopify_combo", "materialized": "ephemeral"}, "created_at": 1641410292.762165, "compiled_sql": "with order_line as (\n\n select *\n from `dbt-package-testing`.`dbt_transformations`.`stg_shopify__order_line`\n\n), aggregated as (\n\n select \n order_id,\n source_relation,\n count(*) as line_item_count\n from order_line\n group by 1,2\n\n)\n\nselect *\nfrom aggregated", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null}, "model.shopify.shopify__customers__order_aggregates": {"raw_sql": "with orders as (\n\n select *\n from {{ var('shopify_order') }}\n\n), transactions as (\n\n select *\n from {{ ref('shopify__transactions' )}}\n where lower(status) = 'success'\n\n), aggregated as (\n\n select\n orders.customer_id,\n orders.source_relation,\n min(orders.created_timestamp) as first_order_timestamp,\n max(orders.created_timestamp) as most_recent_order_timestamp,\n avg(case when lower(transactions.kind) in ('sale','capture') then transactions.currency_exchange_calculated_amount end) as average_order_value,\n sum(case when lower(transactions.kind) in ('sale','capture') then transactions.currency_exchange_calculated_amount end) as lifetime_total_spent,\n sum(case when lower(transactions.kind) in ('refund') then transactions.currency_exchange_calculated_amount end) as lifetime_total_refunded,\n count(distinct orders.order_id) as lifetime_count_orders\n from orders\n left join transactions\n using (order_id, source_relation)\n where customer_id is not null\n group by 1,2\n\n)\n\nselect *\nfrom aggregated", "compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["model.shopify_source.stg_shopify__order", "model.shopify.shopify__transactions"]}, "config": {"enabled": true, "alias": null, "schema": "shopify_combo", "database": null, "tags": [], "meta": {}, "materialized": "ephemeral", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_transformations", "fqn": ["shopify", "intermediate", "shopify__customers__order_aggregates"], "unique_id": "model.shopify.shopify__customers__order_aggregates", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify", "path": "intermediate/shopify__customers__order_aggregates.sql", "original_file_path": "models/intermediate/shopify__customers__order_aggregates.sql", "name": "shopify__customers__order_aggregates", "alias": "shopify__customers__order_aggregates", "checksum": {"name": "sha256", "checksum": "902e082d29e1b00c443c6d18109a496dc53a1a7e927134bc8a523cdc106076bd"}, "tags": [], "refs": [["stg_shopify__order"], ["shopify__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify://models/intermediate/intermediate.yml", "compiled_path": "target/compiled/shopify/models/intermediate/shopify__customers__order_aggregates.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "shopify_combo", "materialized": "ephemeral"}, "created_at": 1641410292.7616498, "compiled_sql": "with orders as (\n\n select *\n from `dbt-package-testing`.`dbt_transformations`.`stg_shopify__order`\n\n), transactions as (\n\n select *\n from `dbt-package-testing`.`dbt_transformations`.`shopify__transactions`\n where lower(status) = 'success'\n\n), aggregated as (\n\n select\n orders.customer_id,\n orders.source_relation,\n min(orders.created_timestamp) as first_order_timestamp,\n max(orders.created_timestamp) as most_recent_order_timestamp,\n avg(case when lower(transactions.kind) in ('sale','capture') then transactions.currency_exchange_calculated_amount end) as average_order_value,\n sum(case when lower(transactions.kind) in ('sale','capture') then transactions.currency_exchange_calculated_amount end) as lifetime_total_spent,\n sum(case when lower(transactions.kind) in ('refund') then transactions.currency_exchange_calculated_amount end) as lifetime_total_refunded,\n count(distinct orders.order_id) as lifetime_count_orders\n from orders\n left join transactions\n using (order_id, source_relation)\n where customer_id is not null\n group by 1,2\n\n)\n\nselect *\nfrom aggregated", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null}, "model.shopify.shopify__orders__order_refunds": {"raw_sql": "{{ config(enabled=fivetran_utils.enabled_vars(['shopify__using_order_line_refund','shopify__using_refund'])) }}\n\nwith refunds as (\n\n select *\n from {{ var('shopify_refund') }}\n\n), order_line_refunds as (\n\n select *\n from {{ var('shopify_order_line_refund') }}\n \n), refund_join as (\n\n select \n refunds.refund_id,\n refunds.created_at,\n refunds.order_id,\n refunds.user_id,\n refunds.source_relation,\n order_line_refunds.order_line_refund_id,\n order_line_refunds.order_line_id,\n order_line_refunds.restock_type,\n order_line_refunds.quantity,\n order_line_refunds.subtotal,\n order_line_refunds.total_tax\n from refunds\n left join order_line_refunds\n on refunds.refund_id = order_line_refunds.refund_id\n and refunds.source_relation = order_line_refunds.source_relation\n\n)\n\nselect *\nfrom refund_join", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars"], "nodes": ["model.shopify_source.stg_shopify__refund", "model.shopify_source.stg_shopify__order_line_refund"]}, "config": {"enabled": true, "alias": null, "schema": "shopify_combo", "database": null, "tags": [], "meta": {}, "materialized": "ephemeral", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_transformations", "fqn": ["shopify", "intermediate", "shopify__orders__order_refunds"], "unique_id": "model.shopify.shopify__orders__order_refunds", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify", "path": "intermediate/shopify__orders__order_refunds.sql", "original_file_path": "models/intermediate/shopify__orders__order_refunds.sql", "name": "shopify__orders__order_refunds", "alias": "shopify__orders__order_refunds", "checksum": {"name": "sha256", "checksum": "1bcc3be258e3bdda4c6845e465f95e7e5b4e0eee823b169e0cd5e7eff4cf7792"}, "tags": [], "refs": [["stg_shopify__refund"], ["stg_shopify__order_line_refund"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify://models/intermediate/intermediate.yml", "compiled_path": "target/compiled/shopify/models/intermediate/shopify__orders__order_refunds.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "shopify_combo", "materialized": "ephemeral", "enabled": true}, "created_at": 1641410292.762613, "compiled_sql": "\n\nwith refunds as (\n\n select *\n from `dbt-package-testing`.`dbt_transformations`.`stg_shopify__refund`\n\n), order_line_refunds as (\n\n select *\n from `dbt-package-testing`.`dbt_transformations`.`stg_shopify__order_line_refund`\n \n), refund_join as (\n\n select \n refunds.refund_id,\n refunds.created_at,\n refunds.order_id,\n refunds.user_id,\n refunds.source_relation,\n order_line_refunds.order_line_refund_id,\n order_line_refunds.order_line_id,\n order_line_refunds.restock_type,\n order_line_refunds.quantity,\n order_line_refunds.subtotal,\n order_line_refunds.total_tax\n from refunds\n left join order_line_refunds\n on refunds.refund_id = order_line_refunds.refund_id\n and refunds.source_relation = order_line_refunds.source_relation\n\n)\n\nselect *\nfrom refund_join", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null}, "model.shopify_holistic_reporting.shopify_holistic_reporting__customer_enhanced": {"raw_sql": "with shopify_customers as (\n\n select *\n from {{ ref('int__shopify_customer_rollup') }}\n\n), klaviyo_persons as (\n\n select *\n from {{ ref('int__klaviyo_person_rollup') }}\n\n), combine_customer_info as (\n\n select\n coalesce(shopify_customers.email, klaviyo_persons.email) as email,\n\n coalesce(klaviyo_persons.full_name, shopify_customers.full_name) as full_name,\n shopify_customers.customer_ids as shopify_customer_ids,\n klaviyo_persons.person_ids as klaviyo_person_ids,\n coalesce(shopify_customers.phone_numbers, klaviyo_persons.phone_numbers) as phone_number,\n shopify_customers.first_shopify_account_made_at as shopify_customer_first_created_at,\n shopify_customers.last_shopify_account_made_at as shopify_customer_last_created_at,\n klaviyo_persons.first_klaviyo_account_made_at as klaviyo_person_first_created_at,\n klaviyo_persons.last_klaviyo_account_made_at as klaviyo_person_last_created_at,\n shopify_customers.last_updated_at as shopify_customer_last_updated_at,\n klaviyo_persons.last_updated_at as klaviyo_person_last_updated_at,\n shopify_customers.is_verified_email as is_shopify_email_verified,\n\n {{ dbt_utils.star(from=ref('int__shopify_customer_rollup'), relation_alias='shopify_customers', prefix='shopify_',\n except=['source_relation','email', 'full_name', 'customer_ids', 'phone_numbers', 'first_shopify_account_made_at','last_shopify_account_made_at', \n 'last_updated_at', 'is_verified_email'] ) \n }},\n shopify_customers.source_relation as shopify_source_relation,\n\n {{ dbt_utils.star(from=ref('int__klaviyo_person_rollup'), relation_alias='klaviyo_persons', prefix='klaviyo_',\n except=['source_relation','email', 'full_name', 'first_klaviyo_account_made_at', 'last_klaviyo_account_made_at', 'person_ids', 'phone_numbers', 'last_updated_at'] ) \n }},\n klaviyo_persons.source_relation as klaviyo_source_relation\n\n from shopify_customers\n full outer join klaviyo_persons \n on shopify_customers.email = lower(klaviyo_persons.email) -- redshift doesn't like doing 2 lowers here. we lowercase shopify.email in an intermediate model\n\n)\n\nselect *\nfrom combine_customer_info", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": ["model.shopify_holistic_reporting.int__shopify_customer_rollup", "model.shopify_holistic_reporting.int__klaviyo_person_rollup", "model.shopify_holistic_reporting.int__shopify_customer_rollup", "model.shopify_holistic_reporting.int__klaviyo_person_rollup"]}, "config": {"enabled": true, "alias": null, "schema": "sk_combo", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_transformations", "fqn": ["shopify_holistic_reporting", "shopify_holistic_reporting__customer_enhanced"], "unique_id": "model.shopify_holistic_reporting.shopify_holistic_reporting__customer_enhanced", "package_name": "shopify_holistic_reporting", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify_holistic_reporting", "path": "shopify_holistic_reporting__customer_enhanced.sql", "original_file_path": "models/shopify_holistic_reporting__customer_enhanced.sql", "name": "shopify_holistic_reporting__customer_enhanced", "alias": "shopify_holistic_reporting__customer_enhanced", "checksum": {"name": "sha256", "checksum": "db442dfeedb2bb460e284b8e3d2742abc3f9ae90d8db670d6019afc567b53a09"}, "tags": [], "refs": [["int__shopify_customer_rollup"], ["int__klaviyo_person_rollup"], ["int__shopify_customer_rollup"], ["int__klaviyo_person_rollup"]], "sources": [], "description": "Table consolidating customers and their information and activity metrics from across all platforms. A full outer join is performed in order to union together users who may not exist in both sources, and personal information is coalesced to consolidate as much information as possible. Includes any custom columns specified in passthrough variables for both Shopify and Klaviyo.\nFor **Klaviyo** metrics: Counts of instances of triggered events and sums of the numeric value (i.e. revenue) associated with events (total vs organic/not attributed to flows or campaigns) will be pivoted out into columns, as configured by the klaviyo__count_metrics and klaviyo__sum_revenue_metricsvariables, respectively. See the Klaviyo dbt_project.yml file for the default metrics used. These columns will be prefixed with total_count_, total_sum_revenue_ (organic + attributed), and organic_sum_revenue_ (not attributed to a campaign or flow).\nColumns that come _only_ from one source will be prefixed with that source name (ie klaviyo_)\n", "columns": {"shopify_source_relation": {"name": "shopify_source_relation", "description": "The source where this Shopify data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioning together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_source_relation": {"name": "klaviyo_source_relation", "description": "The source where this Klaviyo data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioning together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_has_accepted_marketing": {"name": "shopify_has_accepted_marketing", "description": "Whether the customer has consented to receive marketing material via email.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_customer_first_created_at": {"name": "shopify_customer_first_created_at", "description": "The date and time when the customer account first associated with this email was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_customer_last_created_at": {"name": "shopify_customer_last_created_at", "description": "The date and time when the customer account first associated with this email was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_customer_last_updated_at": {"name": "shopify_customer_last_updated_at", "description": "Timestamp of when the shopify customer was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_default_address_id": {"name": "shopify_default_address_id", "description": "The default address for the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email": {"name": "email", "description": "The unique email address of the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "full_name": {"name": "full_name", "description": "The customer's full name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_customer_ids": {"name": "shopify_customer_ids", "description": "A comma-separated aggregated list of Shopify IDs for the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_lifetime_count_orders": {"name": "shopify_lifetime_count_orders", "description": "The number of orders associated with this customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "phone_number": {"name": "phone_number", "description": "The unique phone number (E.164 format) for this customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_account_state": {"name": "shopify_account_state", "description": "The state of the customer's account with a shop.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_is_tax_exempt": {"name": "shopify_is_tax_exempt", "description": "Whether the customer is exempt from paying taxes on their order. If true, then taxes won't be applied to an order at checkout. If false, then taxes will be applied at checkout.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_last_updated_at": {"name": "shopify_last_updated_at", "description": "The date and time when the customer information was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_shopify_email_verified": {"name": "is_shopify_email_verified", "description": "Whether the customer has verified their email address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_first_order_at": {"name": "shopify_first_order_at", "description": "The timestamp the customer completed their first order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_last_order_at": {"name": "shopify_last_order_at", "description": "The timestamp the customer completed their most recent order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_average_order_value": {"name": "shopify_average_order_value", "description": "The average order value for the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_lifetime_total_spent": {"name": "shopify_lifetime_total_spent", "description": "The total amount of money that the customer has spent on orders across their order history.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_lifetime_total_refunded": {"name": "shopify_lifetime_total_refunded", "description": "The total amount of money that the customer has been refunded on orders across their order history.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_lifetime_total_amount": {"name": "shopify_lifetime_total_amount", "description": "The total amount of money (minus refunds) that the customer has spent across their order history.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_person_id": {"name": "klaviyo_person_id", "description": "Unique ID of the user if you use your own unique identifier. Otherwise, Klaviyo recommends using the email as the primary key. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_address_1": {"name": "klaviyo_address_1", "description": "First line of the person's address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_address_2": {"name": "klaviyo_address_2", "description": "Second line of the person's address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_city": {"name": "klaviyo_city", "description": "City they live in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_country": {"name": "klaviyo_country", "description": "Country they live in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_zip": {"name": "klaviyo_zip", "description": "Postal code where they live.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_person_created_at": {"name": "klaviyo_person_created_at", "description": "Timestamp of when the person's profile was created in Klaviyo.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_latitude": {"name": "klaviyo_latitude", "description": "Latitude of the person's location.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_longitude": {"name": "klaviyo_longitude", "description": "Longitude of the person's location.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_organization": {"name": "klaviyo_organization", "description": "Business organization they belong to.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_region": {"name": "klaviyo_region", "description": "Region or state they live in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_timezone": {"name": "klaviyo_timezone", "description": "Timezone they are situated in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_title": {"name": "klaviyo_title", "description": "Title at their business or organization.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_person_updated_at": {"name": "klaviyo_person_updated_at", "description": "Timestamp of when the person profile was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_count_total_campaigns": {"name": "klaviyo_count_total_campaigns", "description": "Count of the number of campaigns this person has interacted with.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_count_total_flows": {"name": "klaviyo_count_total_flows", "description": "Count of the number of flows this person has interacted with.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_first_event_at": {"name": "klaviyo_first_event_at", "description": "Timestamp of when the user first triggered an event (not limited to campaign and flow interactions).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_last_event_at": {"name": "klaviyo_last_event_at", "description": "Timestamp of when the user last triggered an event (not limited to campaign and flow interactions).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_first_campaign_touch_at": {"name": "klaviyo_first_campaign_touch_at", "description": "Timestamp of when the user first interacted with a campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_last_campaign_touch_at": {"name": "klaviyo_last_campaign_touch_at", "description": "Timestamp of when the user last interacted with a campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_first_flow_touch_at": {"name": "klaviyo_first_flow_touch_at", "description": "Timestamp of when the user first interacted with a flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_last_flow_touch_at": {"name": "klaviyo_last_flow_touch_at", "description": "Timestamp of when the user last interacted with a flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify_holistic_reporting://models/shopify_holistic_reporting.yml", "compiled_path": "target/compiled/shopify_holistic_reporting/models/shopify_holistic_reporting__customer_enhanced.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "sk_combo"}, "created_at": 1641410292.7954628, "compiled_sql": "with shopify_customers as (\n\n select *\n from `dbt-package-testing`.`dbt_transformations`.`int__shopify_customer_rollup`\n\n), klaviyo_persons as (\n\n select *\n from `dbt-package-testing`.`dbt_transformations`.`int__klaviyo_person_rollup`\n\n), combine_customer_info as (\n\n select\n coalesce(shopify_customers.email, klaviyo_persons.email) as email,\n\n coalesce(klaviyo_persons.full_name, shopify_customers.full_name) as full_name,\n shopify_customers.customer_ids as shopify_customer_ids,\n klaviyo_persons.person_ids as klaviyo_person_ids,\n coalesce(shopify_customers.phone_numbers, klaviyo_persons.phone_numbers) as phone_number,\n shopify_customers.first_shopify_account_made_at as shopify_customer_first_created_at,\n shopify_customers.last_shopify_account_made_at as shopify_customer_last_created_at,\n klaviyo_persons.first_klaviyo_account_made_at as klaviyo_person_first_created_at,\n klaviyo_persons.last_klaviyo_account_made_at as klaviyo_person_last_created_at,\n shopify_customers.last_updated_at as shopify_customer_last_updated_at,\n klaviyo_persons.last_updated_at as klaviyo_person_last_updated_at,\n shopify_customers.is_verified_email as is_shopify_email_verified,\n\n shopify_customers.`first_order_at` as `shopify_first_order_at`,\n shopify_customers.`last_order_at` as `shopify_last_order_at`,\n shopify_customers.`lifetime_total_spent` as `shopify_lifetime_total_spent`,\n shopify_customers.`lifetime_total_refunded` as `shopify_lifetime_total_refunded`,\n shopify_customers.`lifetime_total_amount` as `shopify_lifetime_total_amount`,\n shopify_customers.`lifetime_count_orders` as `shopify_lifetime_count_orders`,\n shopify_customers.`average_order_value` as `shopify_average_order_value`,\n shopify_customers.`has_accepted_marketing` as `shopify_has_accepted_marketing`,\n shopify_customers.`is_tax_exempt` as `shopify_is_tax_exempt`,\n shopify_customers.`default_address_id` as `shopify_default_address_id`,\n shopify_customers.`account_state` as `shopify_account_state`,\n shopify_customers.`multipass_identifier` as `shopify_multipass_identifier`,\n shopify_customers.source_relation as shopify_source_relation,\n\n ,\n klaviyo_persons.source_relation as klaviyo_source_relation\n\n from shopify_customers\n full outer join klaviyo_persons \n on shopify_customers.email = lower(klaviyo_persons.email) -- redshift doesn't like doing 2 lowers here. we lowercase shopify.email in an intermediate model\n\n)\n\nselect *\nfrom combine_customer_info", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_transformations`.`shopify_holistic_reporting__customer_enhanced`"}, "model.shopify_holistic_reporting.shopify_holistic_reporting__orders_attribution": {"raw_sql": "{{\n config(\n materialized='incremental',\n unique_key='unique_order_key',\n partition_by={\n \"field\": \"created_timestamp\",\n \"data_type\": \"timestamp\"\n } if target.type == 'bigquery' else none,\n incremental_strategy = 'merge',\n file_format = 'delta'\n )\n}}\n\nwith orders as (\n\n select *\n from {{ ref('shopify__orders') }}\n\n -- just grab new orders\n {% if is_incremental() %}\n where created_timestamp >= (select max(created_timestamp) from {{ this }})\n {% endif %}\n\n), events as (\n\n select \n *\n from {{ ref('klaviyo__events') }}\n\n where \n coalesce(last_touch_campaign_id, last_touch_flow_id) is not null\n {% if var('klaviyo__eligible_attribution_events') != [] %}\n and lower(type) in {{ \"('\" ~ (var('klaviyo__eligible_attribution_events') | join(\"', '\")) ~ \"')\" }}\n {% endif %}\n\n -- only grab the events for users who are in the new increment of orders\n {% if is_incremental() %}\n and lower(person_email) in (select distinct lower(email) from orders)\n {% endif %}\n\n), join_orders_w_events as (\n\n select \n orders.*,\n events.last_touch_campaign_id,\n events.last_touch_flow_id,\n events.variation_id as last_touch_variation_id,\n events.campaign_name as last_touch_campaign_name,\n events.campaign_subject_line as last_touch_campaign_subject_line,\n events.flow_name as last_touch_flow_name,\n events.campaign_type as last_touch_campaign_type,\n events.event_id as last_touch_event_id,\n events.occurred_at as last_touch_event_occurred_at,\n events.type as last_touch_event_type,\n events.integration_name as last_touch_integration_name,\n events.integration_category as last_touch_integration_category,\n events.source_relation as klaviyo_source_relation\n\n from orders \n left join events on \n lower(orders.email) = lower(events.person_email)\n and {{ dbt_utils.datediff('events.occurred_at', 'orders.created_timestamp', 'hour') }} <= (\n case when events.type like '%sms%' then {{ var('klaviyo__sms_attribution_lookback') }}\n else {{ var('klaviyo__email_attribution_lookback') }} end)\n and orders.created_timestamp > events.occurred_at\n\n), order_events as (\n\n select\n *,\n row_number() over (partition by order_id order by last_touch_event_occurred_at desc) as event_index,\n\n -- the order was made after X interactions with campaign/flow\n count(last_touch_event_id) over (partition by order_id, last_touch_campaign_id) as count_interactions_with_campaign,\n count(last_touch_event_id) over (partition by order_id, last_touch_flow_id) as count_interactions_with_flow\n\n\n from join_orders_w_events\n\n), last_touches as (\n\n select \n {{ dbt_utils.star(from=ref('shopify__orders'), except=['source_relation']) }},\n last_touch_campaign_id is not null or last_touch_flow_id is not null as is_attributed,\n last_touch_campaign_id,\n last_touch_flow_id,\n last_touch_variation_id,\n last_touch_campaign_name,\n last_touch_campaign_subject_line,\n last_touch_campaign_type,\n last_touch_flow_name,\n case when last_touch_campaign_id is not null then count_interactions_with_campaign else null end as count_interactions_with_campaign, -- will be null if it's associated with a flow\n count_interactions_with_flow, -- will be null if it's associated with a campaign\n last_touch_event_id,\n last_touch_event_occurred_at,\n last_touch_event_type,\n last_touch_integration_name,\n last_touch_integration_category,\n source_relation as shopify_source_relation,\n klaviyo_source_relation,\n {{ dbt_utils.surrogate_key(['order_id', 'source_relation']) }} as unique_order_key\n\n from order_events\n where event_index = 1\n)\n\nselect *\nfrom last_touches", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt.is_incremental", "macro.dbt_utils.datediff", "macro.dbt_utils.star", "macro.dbt_utils.surrogate_key"], "nodes": ["model.shopify.shopify__orders", "model.klaviyo.klaviyo__events", "model.shopify.shopify__orders"]}, "config": {"enabled": true, "alias": null, "schema": "sk_combo", "database": null, "tags": [], "meta": {}, "materialized": "incremental", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "partition_by": {"field": "created_timestamp", "data_type": "timestamp"}, "unique_key": "unique_order_key", "incremental_strategy": "merge", "file_format": "delta", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_transformations", "fqn": ["shopify_holistic_reporting", "shopify_holistic_reporting__orders_attribution"], "unique_id": "model.shopify_holistic_reporting.shopify_holistic_reporting__orders_attribution", "package_name": "shopify_holistic_reporting", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify_holistic_reporting", "path": "shopify_holistic_reporting__orders_attribution.sql", "original_file_path": "models/shopify_holistic_reporting__orders_attribution.sql", "name": "shopify_holistic_reporting__orders_attribution", "alias": "shopify_holistic_reporting__orders_attribution", "checksum": {"name": "sha256", "checksum": "da2a71f239b954470efdd1c2046000e7940d635bfca3094ed8e4f57efbae0d44"}, "tags": [], "refs": [["shopify__orders"], ["klaviyo__events"], ["shopify__orders"]], "sources": [], "description": "Table of Shopify orders, enriched with a last-touch attribution model associating orders (as conversions) to campaigns or flows in Klaviyo. \nBy default, the package performs attribution [in line with Klaviyo](https://help.klaviyo.com/hc/en-us/articles/115005248128). It considers email opens and clicks, and SMS opens as the events eligible to be credited with orders. This attribution-eligibility can be configured by the `klaviyo__eligible_attribution_events` variable. \nSimilar to the Klaviyo app, the package by default considers the conversion period/lookback window for email events to be 120 hours (5 days) and 24 hours for SMS events. These can be configured through the `klaviyo__email_attribution_lookback` and `klaviyo__sms_attribution_lookback` variables, respectively (in integer-hours).\nRefer to the Klaviyo package [README](https://github.com/fivetran/dbt_klaviyo#attribution-lookback-window) for more details.\n", "columns": {"app_id": {"name": "app_id", "description": "The ID of the app that created the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_address_1": {"name": "billing_address_address_1", "description": "The street address of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_address_2": {"name": "billing_address_address_2", "description": "An optional additional field for the street address of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_city": {"name": "billing_address_city", "description": "The city, town, or village of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_company": {"name": "billing_address_company", "description": "The company of the person associated with the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_country": {"name": "billing_address_country", "description": "The name of the country of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_country_code": {"name": "billing_address_country_code", "description": "The two-letter code (ISO 3166-1 format) for the country of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_first_name": {"name": "billing_address_first_name", "description": "The first name of the person associated with the payment method.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_last_name": {"name": "billing_address_last_name", "description": "The last name of the person associated with the payment method.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_latitude": {"name": "billing_address_latitude", "description": "The latitude of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_longitude": {"name": "billing_address_longitude", "description": "The longitude of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_name": {"name": "billing_address_name", "description": "The full name of the person associated with the payment method.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_phone": {"name": "billing_address_phone", "description": "The phone number at the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_province": {"name": "billing_address_province", "description": "The name of the region (province, state, prefecture, \u2026) of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_province_code": {"name": "billing_address_province_code", "description": "The two-letter abbreviation of the region of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_zip": {"name": "billing_address_zip", "description": "The postal code (zip, postcode, Eircode, \u2026) of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "browser_ip": {"name": "browser_ip", "description": "The IP address of the browser used by the customer when they placed the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "has_buyer_accepted_marketing": {"name": "has_buyer_accepted_marketing", "description": "Whether the customer consented to receive email updates from the shop.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "cancel_reason": {"name": "cancel_reason", "description": "The reason why the order was canceled.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "cancelled_timestamp": {"name": "cancelled_timestamp", "description": "The date and time when the order was canceled.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "cart_token": {"name": "cart_token", "description": "The ID of the cart that's associated with the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "closed_timestamp": {"name": "closed_timestamp", "description": "The date and time when the order was closed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_timestamp": {"name": "created_timestamp", "description": "The autogenerated date and time when the order was created in Shopify.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "The three-letter code for the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "customer_id": {"name": "customer_id", "description": "The ID of the order's customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email": {"name": "email", "description": "The customer's email address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "financial_status": {"name": "financial_status", "description": "The status of payments associated with the order. Can only be set when the order is created", "meta": {}, "data_type": null, "quote": null, "tags": []}, "fulfillment_status": {"name": "fulfillment_status", "description": "The order's status in terms of fulfilled line items.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_id": {"name": "order_id", "description": "The ID of the order, used for API purposes. This is different from the order_number property, which is the ID used by the shop owner and customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "landing_site_base_url": {"name": "landing_site_base_url", "description": "The URL for the page where the buyer landed when they entered the shop.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "location_id": {"name": "location_id", "description": "The ID of the physical location where the order was processed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "name": {"name": "name", "description": "The order name, generated by combining the order_number property with the order prefix and suffix that are set in the merchant's general settings.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "note": {"name": "note", "description": "An optional note that a shop owner can attach to the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "number": {"name": "number", "description": "The order's position in the shop's count of orders. Numbers are sequential and start at 1.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_number": {"name": "order_number", "description": "The order 's position in the shop's count of orders starting at 1001. Order numbers are sequential and start at 1001.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "processed_timestamp": {"name": "processed_timestamp", "description": "The date and time when an order was processed. This value is the date that appears on your orders and that's used in the analytic reports.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "processing_method": {"name": "processing_method", "description": "How the payment was processed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "referring_site": {"name": "referring_site", "description": "The website where the customer clicked a link to the shop.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_address_1": {"name": "shipping_address_address_1", "description": "The street address of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_address_2": {"name": "shipping_address_address_2", "description": "An optional additional field for the street address of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_city": {"name": "shipping_address_city", "description": "The city, town, or village of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_company": {"name": "shipping_address_company", "description": "The company of the person associated with the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_country": {"name": "shipping_address_country", "description": "The name of the country of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_country_code": {"name": "shipping_address_country_code", "description": "The two-letter code (ISO 3166-1 format) for the country of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_first_name": {"name": "shipping_address_first_name", "description": "The first name of the person associated with the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_last_name": {"name": "shipping_address_last_name", "description": "The last name of the person associated with the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_latitude": {"name": "shipping_address_latitude", "description": "The latitude of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_longitude": {"name": "shipping_address_longitude", "description": "The longitude of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_name": {"name": "shipping_address_name", "description": "The full name of the person associated with the payment method.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_phone": {"name": "shipping_address_phone", "description": "The phone number at the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_province": {"name": "shipping_address_province", "description": "The name of the region (province, state, prefecture, \u2026) of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_province_code": {"name": "shipping_address_province_code", "description": "The two-letter abbreviation of the region of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_zip": {"name": "shipping_address_zip", "description": "The postal code (zip, postcode, Eircode, \u2026) of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_name": {"name": "source_name", "description": "Where the order originated. Can be set only during order creation, and is not writeable afterwards.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "subtotal_price": {"name": "subtotal_price", "description": "The price of the order in the shop currency after discounts but before shipping, taxes, and tips.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "has_taxes_included": {"name": "has_taxes_included", "description": "Whether taxes are included in the order subtotal.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_test_order": {"name": "is_test_order", "description": "Whether this is a test order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "token": {"name": "token", "description": "A unique token for the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_discounts": {"name": "total_discounts", "description": "The total discounts applied to the price of the order in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_line_items_price": {"name": "total_line_items_price", "description": "The sum of all line item prices in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_price": {"name": "total_price", "description": "The sum of all line item prices, discounts, shipping, taxes, and tips in the shop currency. Must be positive.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_tax": {"name": "total_tax", "description": "The sum of all the taxes applied to the order in th shop currency. Must be positive).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_weight": {"name": "total_weight", "description": "The sum of all line item weights in grams.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_timestamp": {"name": "updated_timestamp", "description": "The date and time (ISO 8601 format) when the order was last modified.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "user_id": {"name": "user_id", "description": "The ID of the user logged into Shopify POS who processed the order, if applicable.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "line_item_count": {"name": "line_item_count", "description": "Number of line items included in the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "customer_order_seq_number": {"name": "customer_order_seq_number", "description": "The sequential number of the order as it relates to the customer", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_vs_repeat": {"name": "new_vs_repeat", "description": "Whether the order was a new or repeat order for the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_cost": {"name": "shipping_cost", "description": "The shipping cost of the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_adjustment_amount": {"name": "order_adjustment_amount", "description": "Total adjustment amount applied to the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_adjustment_tax_amount": {"name": "order_adjustment_tax_amount", "description": "Total tax applied to the adjustment on the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refund_subtotal": {"name": "refund_subtotal", "description": "Total refund amount applied to the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refund_total_tax": {"name": "refund_total_tax", "description": "Total tax applied to the refund on the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_adjusted_total": {"name": "order_adjusted_total", "description": "Order total adjusted for refunds and other adjustments. The calculation used for this field is as follows: total price listed on the original order (including shipping costs and discounts) + adjustments + adjustments tax - total refunds - refunds tax The order_adjusted_total will equate to the total sales - refunds listed within the transactions table for the order (after currency exchange).\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "index": {"name": "index", "description": "Field representing the index of the order line in relation to the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "pre_tax_price": {"name": "pre_tax_price", "description": "The pre tax price of the order line.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "checkout_token": {"name": "checkout_token", "description": "The checkout token applied to the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_shipping_price_set": {"name": "total_shipping_price_set", "description": "The total shipping price set to the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_campaign_id": {"name": "last_touch_campaign_id", "description": "The Klaviyo campaign that the order has been attributed to by the package.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_flow_id": {"name": "last_touch_flow_id", "description": "The Klaviyo flow that the order has been attributed to by the package.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_variation_id": {"name": "last_touch_variation_id", "description": "Unique ID of the attributed Klaviyo flow or campaign variation group. This does not map onto another table. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_campaign_name": {"name": "last_touch_campaign_name", "description": "Name of the attributed Klaviyo campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_campaign_subject_line": {"name": "last_touch_campaign_subject_line", "description": "Email subject line of the attributed Klaviyo campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_flow_name": {"name": "last_touch_flow_name", "description": "Name of the attributed Klaviyo flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_campaign_type": {"name": "last_touch_campaign_type", "description": "Type of Klaviyo campaign that the order is attributed to.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_event_id": {"name": "last_touch_event_id", "description": "Unique Klaviyo event id of the interaction the customer had with the campaign or flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_event_occurred_at": {"name": "last_touch_event_occurred_at", "description": "Timestamp of when the customer interacted with the attributed campaign/flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_event_type": {"name": "last_touch_event_type", "description": "Type of interaction that the customer had with the campaign or flow. Will be one of the event types specified by the `klaviyo__eligible_attribution_events` variable. By default, this is just email opens, email clicks, and sms opens.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_integration_name": {"name": "last_touch_integration_name", "description": "Name of the platform that tracked the campaign/flow interaction (either Klaviyo, the API, or another integration).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_integration_category": {"name": "last_touch_integration_category", "description": "Use-case category of the platform that sent the campaign/flow interaction event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_source_relation": {"name": "shopify_source_relation", "description": "The source where this Shopify data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioning together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_source_relation": {"name": "klaviyo_source_relation", "description": "The source where Klaviyo campaign/flow data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioning together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "count_interactions_with_campaign": {"name": "count_interactions_with_campaign", "description": "The count of distinct attributable events the customer had with the campaign throughout the attribution window.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "count_interactions_with_flow": {"name": "count_interactions_with_flow", "description": "The count of distinct attributable events the customer had with the flow throughout the attribution window.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify_holistic_reporting://models/shopify_holistic_reporting.yml", "compiled_path": "target/compiled/shopify_holistic_reporting/models/shopify_holistic_reporting__orders_attribution.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "incremental", "schema": "sk_combo", "unique_key": "unique_order_key", "partition_by": {"field": "created_timestamp", "data_type": "timestamp"}, "incremental_strategy": "merge", "file_format": "delta"}, "created_at": 1641410292.841231, "compiled_sql": "\n\nwith orders as (\n\n select *\n from `dbt-package-testing`.`dbt_transformations`.`shopify__orders`\n\n -- just grab new orders\n \n where created_timestamp >= (select max(created_timestamp) from `dbt-package-testing`.`dbt_transformations`.`shopify_holistic_reporting__orders_attribution`)\n \n\n), events as (\n\n select \n *\n from `dbt-package-testing`.`dbt_transformations`.`klaviyo__events`\n\n where \n coalesce(last_touch_campaign_id, last_touch_flow_id) is not null\n \n and lower(type) in ('opened email', 'clicked email', 'clicked sms')\n \n\n -- only grab the events for users who are in the new increment of orders\n \n and lower(person_email) in (select distinct lower(email) from orders)\n \n\n), join_orders_w_events as (\n\n select \n orders.*,\n events.last_touch_campaign_id,\n events.last_touch_flow_id,\n events.variation_id as last_touch_variation_id,\n events.campaign_name as last_touch_campaign_name,\n events.campaign_subject_line as last_touch_campaign_subject_line,\n events.flow_name as last_touch_flow_name,\n events.campaign_type as last_touch_campaign_type,\n events.event_id as last_touch_event_id,\n events.occurred_at as last_touch_event_occurred_at,\n events.type as last_touch_event_type,\n events.integration_name as last_touch_integration_name,\n events.integration_category as last_touch_integration_category,\n events.source_relation as klaviyo_source_relation\n\n from orders \n left join events on \n lower(orders.email) = lower(events.person_email)\n and \n\n datetime_diff(\n cast(orders.created_timestamp as datetime),\n cast(events.occurred_at as datetime),\n hour\n )\n\n <= (\n case when events.type like '%sms%' then 24\n else 120 end)\n and orders.created_timestamp > events.occurred_at\n\n), order_events as (\n\n select\n *,\n row_number() over (partition by order_id order by last_touch_event_occurred_at desc) as event_index,\n\n -- the order was made after X interactions with campaign/flow\n count(last_touch_event_id) over (partition by order_id, last_touch_campaign_id) as count_interactions_with_campaign,\n count(last_touch_event_id) over (partition by order_id, last_touch_flow_id) as count_interactions_with_flow\n\n\n from join_orders_w_events\n\n), last_touches as (\n\n select \n `_fivetran_synced` as `_fivetran_synced`,\n `billing_address_address_1` as `billing_address_address_1`,\n `billing_address_address_2` as `billing_address_address_2`,\n `billing_address_city` as `billing_address_city`,\n `billing_address_company` as `billing_address_company`,\n `billing_address_country` as `billing_address_country`,\n `billing_address_country_code` as `billing_address_country_code`,\n `billing_address_first_name` as `billing_address_first_name`,\n `billing_address_last_name` as `billing_address_last_name`,\n `billing_address_latitude` as `billing_address_latitude`,\n `billing_address_longitude` as `billing_address_longitude`,\n `billing_address_name` as `billing_address_name`,\n `billing_address_phone` as `billing_address_phone`,\n `billing_address_province` as `billing_address_province`,\n `billing_address_province_code` as `billing_address_province_code`,\n `billing_address_zip` as `billing_address_zip`,\n `browser_ip` as `browser_ip`,\n `has_buyer_accepted_marketing` as `has_buyer_accepted_marketing`,\n `cancel_reason` as `cancel_reason`,\n `cancelled_timestamp` as `cancelled_timestamp`,\n `cart_token` as `cart_token`,\n `checkout_token` as `checkout_token`,\n `closed_timestamp` as `closed_timestamp`,\n `created_timestamp` as `created_timestamp`,\n `currency` as `currency`,\n `customer_id` as `customer_id`,\n `email` as `email`,\n `financial_status` as `financial_status`,\n `fulfillment_status` as `fulfillment_status`,\n `order_id` as `order_id`,\n `landing_site_base_url` as `landing_site_base_url`,\n `location_id` as `location_id`,\n `name` as `name`,\n `note` as `note`,\n `number` as `number`,\n `order_number` as `order_number`,\n `processed_timestamp` as `processed_timestamp`,\n `processing_method` as `processing_method`,\n `referring_site` as `referring_site`,\n `total_shipping_price_set` as `total_shipping_price_set`,\n `shipping_address_address_1` as `shipping_address_address_1`,\n `shipping_address_address_2` as `shipping_address_address_2`,\n `shipping_address_city` as `shipping_address_city`,\n `shipping_address_company` as `shipping_address_company`,\n `shipping_address_country` as `shipping_address_country`,\n `shipping_address_country_code` as `shipping_address_country_code`,\n `shipping_address_first_name` as `shipping_address_first_name`,\n `shipping_address_last_name` as `shipping_address_last_name`,\n `shipping_address_latitude` as `shipping_address_latitude`,\n `shipping_address_longitude` as `shipping_address_longitude`,\n `shipping_address_name` as `shipping_address_name`,\n `shipping_address_phone` as `shipping_address_phone`,\n `shipping_address_province` as `shipping_address_province`,\n `shipping_address_province_code` as `shipping_address_province_code`,\n `shipping_address_zip` as `shipping_address_zip`,\n `source_name` as `source_name`,\n `subtotal_price` as `subtotal_price`,\n `has_taxes_included` as `has_taxes_included`,\n `is_test_order` as `is_test_order`,\n `token` as `token`,\n `total_discounts` as `total_discounts`,\n `total_line_items_price` as `total_line_items_price`,\n `total_price` as `total_price`,\n `total_tax` as `total_tax`,\n `total_weight` as `total_weight`,\n `updated_timestamp` as `updated_timestamp`,\n `user_id` as `user_id`,\n `shipping_cost` as `shipping_cost`,\n `order_adjustment_amount` as `order_adjustment_amount`,\n `order_adjustment_tax_amount` as `order_adjustment_tax_amount`,\n `refund_subtotal` as `refund_subtotal`,\n `refund_total_tax` as `refund_total_tax`,\n `order_adjusted_total` as `order_adjusted_total`,\n `line_item_count` as `line_item_count`,\n `customer_order_seq_number` as `customer_order_seq_number`,\n `new_vs_repeat` as `new_vs_repeat`,\n last_touch_campaign_id is not null or last_touch_flow_id is not null as is_attributed,\n last_touch_campaign_id,\n last_touch_flow_id,\n last_touch_variation_id,\n last_touch_campaign_name,\n last_touch_campaign_subject_line,\n last_touch_campaign_type,\n last_touch_flow_name,\n case when last_touch_campaign_id is not null then count_interactions_with_campaign else null end as count_interactions_with_campaign, -- will be null if it's associated with a flow\n count_interactions_with_flow, -- will be null if it's associated with a campaign\n last_touch_event_id,\n last_touch_event_occurred_at,\n last_touch_event_type,\n last_touch_integration_name,\n last_touch_integration_category,\n source_relation as shopify_source_relation,\n klaviyo_source_relation,\n to_hex(md5(cast(coalesce(cast(order_id as \n string\n), '') || '-' || coalesce(cast(source_relation as \n string\n), '') as \n string\n))) as unique_order_key\n\n from order_events\n where event_index = 1\n)\n\nselect *\nfrom last_touches", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_transformations`.`shopify_holistic_reporting__orders_attribution`"}, "model.shopify_holistic_reporting.shopify_holistic_reporting__daily_customer_metrics": {"raw_sql": "with shopify_daily as (\n\n select *\n from {{ ref('int__daily_shopify_customer_orders') }}\n\n), klaviyo_daily as (\n\n select *\n from {{ ref('int__daily_klaviyo_user_metrics') }}\n\n), combine_histories as (\n\n select \n coalesce(shopify_daily.date_day, klaviyo_daily.date_day) as date_day,\n coalesce(shopify_daily.email, klaviyo_daily.email) as email,\n\n -- when the below is null, these are unattributed actions\n coalesce(shopify_daily.last_touch_campaign_id, klaviyo_daily.last_touch_campaign_id) as campaign_id,\n coalesce(shopify_daily.last_touch_flow_id, klaviyo_daily.last_touch_flow_id) as flow_id,\n coalesce(shopify_daily.last_touch_campaign_name, klaviyo_daily.campaign_name) as campaign_name,\n coalesce(shopify_daily.last_touch_flow_name, klaviyo_daily.flow_name) as flow_name,\n coalesce(shopify_daily.last_touch_variation_id, klaviyo_daily.variation_id) as variation_id,\n coalesce(shopify_daily.last_touch_campaign_subject_line, klaviyo_daily.campaign_subject_line) as campaign_subject_line,\n coalesce(shopify_daily.last_touch_campaign_type, klaviyo_daily.campaign_type) as campaign_type,\n \n {{ dbt_utils.star(from=ref('int__daily_shopify_customer_orders'), relation_alias='shopify_daily', prefix='shopify_',\n except=['source_relation','date_day', 'email', 'last_touch_variation_id', 'last_touch_flow_name', 'last_touch_campaign_name', 'last_touch_flow_id', 'last_touch_campaign_id', 'last_touch_campaign_subject_line', 'last_touch_campaign_type']) }},\n shopify_daily.source_relation as shopify_source_relation,\n\n {{ dbt_utils.star(from=ref('int__daily_klaviyo_user_metrics'), relation_alias='klaviyo_daily', prefix='klaviyo_',\n except=['source_relation','date_day', 'email', 'variation_id', 'flow_name', 'campaign_name', 'last_touch_flow_id', 'last_touch_campaign_id', 'campaign_subject_line', 'campaign_type']) }},\n klaviyo_daily.source_relation as klaviyo_source_relation\n\n from shopify_daily\n full outer join klaviyo_daily\n on lower(shopify_daily.email) = lower(klaviyo_daily.email)\n and shopify_daily.date_day = klaviyo_daily.date_day\n)\n\nselect *\nfrom combine_histories", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": ["model.shopify_holistic_reporting.int__daily_shopify_customer_orders", "model.shopify_holistic_reporting.int__daily_klaviyo_user_metrics", "model.shopify_holistic_reporting.int__daily_shopify_customer_orders", "model.shopify_holistic_reporting.int__daily_klaviyo_user_metrics"]}, "config": {"enabled": true, "alias": null, "schema": "sk_combo", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_transformations", "fqn": ["shopify_holistic_reporting", "shopify_holistic_reporting__daily_customer_metrics"], "unique_id": "model.shopify_holistic_reporting.shopify_holistic_reporting__daily_customer_metrics", "package_name": "shopify_holistic_reporting", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify_holistic_reporting", "path": "shopify_holistic_reporting__daily_customer_metrics.sql", "original_file_path": "models/shopify_holistic_reporting__daily_customer_metrics.sql", "name": "shopify_holistic_reporting__daily_customer_metrics", "alias": "shopify_holistic_reporting__daily_customer_metrics", "checksum": {"name": "sha256", "checksum": "971dcdccf88ae613b19a18bff1ebb515f480d4fd5fb1c4ae1c8cfb3c0d07072d"}, "tags": [], "refs": [["int__daily_shopify_customer_orders"], ["int__daily_klaviyo_user_metrics"], ["int__daily_shopify_customer_orders"], ["int__daily_klaviyo_user_metrics"]], "sources": [], "description": "Table that aggregates Shopify and Klaviyo metrics to the day-customer-campaign or day-customer-flow grain (but note that if a user interacts with 2 different variations of a flow/campaign somehow, they will have 2 records). Also note that non-attributed (to Klaviyo at least) orders and interactions (someone with null campaign_id/flow_id) are included in this table. \nFor **Klaviyo**: **Counts** of the instances of the events, as well as **sums** of the numeric value associated with events (i.e. revenue) will be pivoted out into columns, as configured by the `klaviyo__count_metrics` and `klaviyo__sum_revenue_metrics` variables, respectively. See the dbt_project.yml file for the default metrics used. These columns will be prefixed with `count_` and `sum_revenue_`.\nNote that 0-activity days will not appear. \n", "columns": {"date_day": {"name": "date_day", "description": "Day on which the customer performed these activities.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email": {"name": "email", "description": "Email address of the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Foreign key referencing the CAMPAIGN attributed with these metrics (by the package's attribution model).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_id": {"name": "flow_id", "description": "Foreign key referencing the FLOW attributed with these metrics (by the package's attribution model).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_name": {"name": "campaign_name", "description": "Name of the attributed campaign. If not specified, this will default to the subject of the campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_name": {"name": "flow_name", "description": "Name of the attributed flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variation_id": {"name": "variation_id", "description": "Unique ID of the attributed flow or campaign variation group. This does not map onto another table. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_first_event_at": {"name": "klaviyo_first_event_at", "description": "Timestamp of the first interaction between this campaign/flow and a person on this day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_last_event_at": {"name": "klaviyo_last_event_at", "description": "Timestamp of the last interaction between this campaign/flow and a person on this day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_subject_line": {"name": "campaign_subject_line", "description": "Email subject line of the Klaviyo campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_type": {"name": "campaign_type", "description": "Type of campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_source_relation": {"name": "shopify_source_relation", "description": "The source where this Shopify data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioning together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_source_relation": {"name": "klaviyo_source_relation", "description": "The source where this Klaviyo data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioning together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_total_orders": {"name": "shopify_total_orders", "description": "Total number of orders the customer placed on this day, associated with this campaign or flow. Includes canceled orders.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_total_price": {"name": "shopify_total_price", "description": "Total adjusted price the customer paid on this day, associated with this campaign or flow, in shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_count_line_items": {"name": "shopify_count_line_items", "description": "The count of order line items the customer placed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_total_line_items_price": {"name": "shopify_total_line_items_price", "description": "The sum of all line item prices in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_total_discounts": {"name": "shopify_total_discounts", "description": "The sum of discounts applied to the customer's orders, in shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_total_tax": {"name": "shopify_total_tax", "description": "The sum of taxes paid by the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_total_shipping_cost": {"name": "shopify_total_shipping_cost", "description": "The sum of shipping costs paid.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_total_refund_subtotal": {"name": "shopify_total_refund_subtotal", "description": "Total amount refunded by the customer. Note that that `date_day` will be when the order was created, not refunded.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_total_refund_tax": {"name": "shopify_total_refund_tax", "description": "Total tax applied to the customer's refunds.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_count_cancelled_orders": {"name": "shopify_count_cancelled_orders", "description": "The count of orders that the customer made on this day and canceled.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_count_products": {"name": "shopify_count_products", "description": "The count of distinct products (based on distinct `product_ids`) that the customer purchased.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_count_product_variants": {"name": "shopify_count_product_variants", "description": "The count of distinct products variants that the customer purchased.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_sum_quantity": {"name": "shopify_sum_quantity", "description": "The total quantity of items that the customer purchased.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_total_order_adjustment_amount": {"name": "shopify_total_order_adjustment_amount", "description": "The total amount of adjustments made to the customer's orders.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_total_order_adjustment_tax_amount": {"name": "shopify_total_order_adjustment_tax_amount", "description": "The total amount of taxes applied to adjustments made to the customer's orders.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify_holistic_reporting://models/shopify_holistic_reporting.yml", "compiled_path": "target/compiled/shopify_holistic_reporting/models/shopify_holistic_reporting__daily_customer_metrics.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "sk_combo"}, "created_at": 1641410292.806676, "compiled_sql": "with shopify_daily as (\n\n select *\n from `dbt-package-testing`.`dbt_transformations`.`int__daily_shopify_customer_orders`\n\n), klaviyo_daily as (\n\n select *\n from `dbt-package-testing`.`dbt_transformations`.`int__daily_klaviyo_user_metrics`\n\n), combine_histories as (\n\n select \n coalesce(shopify_daily.date_day, klaviyo_daily.date_day) as date_day,\n coalesce(shopify_daily.email, klaviyo_daily.email) as email,\n\n -- when the below is null, these are unattributed actions\n coalesce(shopify_daily.last_touch_campaign_id, klaviyo_daily.last_touch_campaign_id) as campaign_id,\n coalesce(shopify_daily.last_touch_flow_id, klaviyo_daily.last_touch_flow_id) as flow_id,\n coalesce(shopify_daily.last_touch_campaign_name, klaviyo_daily.campaign_name) as campaign_name,\n coalesce(shopify_daily.last_touch_flow_name, klaviyo_daily.flow_name) as flow_name,\n coalesce(shopify_daily.last_touch_variation_id, klaviyo_daily.variation_id) as variation_id,\n coalesce(shopify_daily.last_touch_campaign_subject_line, klaviyo_daily.campaign_subject_line) as campaign_subject_line,\n coalesce(shopify_daily.last_touch_campaign_type, klaviyo_daily.campaign_type) as campaign_type,\n \n shopify_daily.`campaign_name` as `shopify_campaign_name`,\n shopify_daily.`flow_name` as `shopify_flow_name`,\n shopify_daily.`variation_id` as `shopify_variation_id`,\n shopify_daily.`campaign_subject_line` as `shopify_campaign_subject_line`,\n shopify_daily.`campaign_type` as `shopify_campaign_type`,\n shopify_daily.`total_orders` as `shopify_total_orders`,\n shopify_daily.`total_price` as `shopify_total_price`,\n shopify_daily.`count_line_items` as `shopify_count_line_items`,\n shopify_daily.`total_line_items_price` as `shopify_total_line_items_price`,\n shopify_daily.`total_discounts` as `shopify_total_discounts`,\n shopify_daily.`total_tax` as `shopify_total_tax`,\n shopify_daily.`total_shipping_cost` as `shopify_total_shipping_cost`,\n shopify_daily.`total_refund_subtotal` as `shopify_total_refund_subtotal`,\n shopify_daily.`total_refund_tax` as `shopify_total_refund_tax`,\n shopify_daily.`count_cancelled_orders` as `shopify_count_cancelled_orders`,\n shopify_daily.`count_products` as `shopify_count_products`,\n shopify_daily.`count_product_variants` as `shopify_count_product_variants`,\n shopify_daily.`sum_quantity` as `shopify_sum_quantity`,\n shopify_daily.`total_order_adjustment_amount` as `shopify_total_order_adjustment_amount`,\n shopify_daily.`total_order_adjustment_tax_amount` as `shopify_total_order_adjustment_tax_amount`,\n shopify_daily.source_relation as shopify_source_relation,\n\n ,\n klaviyo_daily.source_relation as klaviyo_source_relation\n\n from shopify_daily\n full outer join klaviyo_daily\n on lower(shopify_daily.email) = lower(klaviyo_daily.email)\n and shopify_daily.date_day = klaviyo_daily.date_day\n)\n\nselect *\nfrom combine_histories", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_transformations`.`shopify_holistic_reporting__daily_customer_metrics`"}, "model.shopify_holistic_reporting.int__daily_shopify_customer_orders": {"raw_sql": "with orders as (\n\n select *\n from {{ ref('shopify_holistic_reporting__orders_attribution') }}\n\n), order_lines as (\n\n select *\n from {{ ref('shopify__order_lines') }}\n\n), order_line_metrics as (\n\n select \n order_id,\n source_relation,\n count(distinct product_id) as count_products,\n count(distinct product_id || '-' || variant_id) as count_product_variants,\n sum(quantity) as sum_quantity\n \n from order_lines\n group by 1,2\n\n), join_orders as (\n\n select \n orders.*,\n order_line_metrics.count_products,\n order_line_metrics.count_product_variants,\n order_line_metrics.sum_quantity\n\n from orders \n left join order_line_metrics\n on orders.order_id = order_line_metrics.order_id\n and orders.shopify_source_relation = order_line_metrics.source_relation\n\n), daily_order_metrics as (\n\n select\n cast( {{ dbt_utils.date_trunc('day', 'created_timestamp') }} as date) as date_day,\n email,\n last_touch_campaign_id,\n last_touch_flow_id,\n last_touch_campaign_name,\n last_touch_flow_name,\n last_touch_variation_id,\n last_touch_campaign_subject_line,\n last_touch_campaign_type,\n shopify_source_relation as source_relation,\n\n count(distinct order_id) as total_orders,\n sum(order_adjusted_total) as total_price,\n\n sum(line_item_count) as count_line_items,\n sum(total_line_items_price) as total_line_items_price,\n \n\n sum(total_discounts) as total_discounts,\n sum(total_tax) as total_tax,\n sum(shipping_cost) as total_shipping_cost,\n\n {% if fivetran_utils.enabled_vars(vars=[\"shopify__using_order_line_refund\", \"shopify__using_refund\"]) %}\n sum(refund_subtotal) as total_refund_subtotal,\n sum(refund_total_tax) as total_refund_tax,\n {% endif %}\n\n sum(case when cancelled_timestamp is not null then 1 else 0 end) as count_cancelled_orders,\n sum(count_products) as count_products,\n sum(count_product_variants) as count_product_variants,\n sum(sum_quantity) as sum_quantity\n\n {% if var('shopify__using_order_adjustment', true) %}\n , sum(order_adjustment_amount) as total_order_adjustment_amount\n , sum(order_adjustment_tax_amount) as total_order_adjustment_tax_amount\n {% endif %}\n \n\n from join_orders\n {{ dbt_utils.group_by(n=10)}}\n)\n\nselect *\nfrom daily_order_metrics", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt_utils.date_trunc", "macro.fivetran_utils.enabled_vars", "macro.dbt_utils.group_by"], "nodes": ["model.shopify_holistic_reporting.shopify_holistic_reporting__orders_attribution", "model.shopify.shopify__order_lines"]}, "config": {"enabled": true, "alias": null, "schema": "sk_combo", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_transformations", "fqn": ["shopify_holistic_reporting", "intermediate", "int__daily_shopify_customer_orders"], "unique_id": "model.shopify_holistic_reporting.int__daily_shopify_customer_orders", "package_name": "shopify_holistic_reporting", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify_holistic_reporting", "path": "intermediate/int__daily_shopify_customer_orders.sql", "original_file_path": "models/intermediate/int__daily_shopify_customer_orders.sql", "name": "int__daily_shopify_customer_orders", "alias": "int__daily_shopify_customer_orders", "checksum": {"name": "sha256", "checksum": "d72f384b963f98264127d5e031e2e30ac3cafbc48bbf79494b80bd8367e1b0a2"}, "tags": [], "refs": [["shopify_holistic_reporting__orders_attribution"], ["shopify__order_lines"]], "sources": [], "description": "", "columns": {"date_day": {"name": "date_day", "description": "Day on which the customer performed these activities.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email": {"name": "email", "description": "Email address of the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_campaign_id": {"name": "last_touch_campaign_id", "description": "Foreign key referencing the CAMPAIGN attributed with these metrics (by the package's attribution model).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_flow_id": {"name": "last_touch_flow_id", "description": "Foreign key referencing the FLOW attributed with these metrics (by the package's attribution model).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_campaign_name": {"name": "last_touch_campaign_name", "description": "Name of the attributed campaign. If not specified, this will default to the subject of the campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_flow_name": {"name": "last_touch_flow_name", "description": "Name of the attributed flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_variation_id": {"name": "last_touch_variation_id", "description": "Unique ID of the attributed flow or campaign variation group. This does not map onto another table. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_campaign_subject_line": {"name": "last_touch_campaign_subject_line", "description": "Email subject line of the Klaviyo campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_campaign_type": {"name": "last_touch_campaign_type", "description": "Type of campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_relation": {"name": "source_relation", "description": "The source where this Shopify data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioning together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_orders": {"name": "total_orders", "description": "Total number of orders the customer placed on this day, associated with this campaign or flow. Includes canceled orders.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_price": {"name": "total_price", "description": "Total adjusted price the customer paid on this day, associated with this campaign or flow, in shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "count_line_items": {"name": "count_line_items", "description": "The count of order line items the customer placed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_line_items_price": {"name": "total_line_items_price", "description": "The sum of all line item prices in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_discounts": {"name": "total_discounts", "description": "The sum of discounts applied to the customer's orders, in shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_tax": {"name": "total_tax", "description": "The sum of taxes paid by the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_shipping_cost": {"name": "total_shipping_cost", "description": "The sum of shipping costs paid.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_refund_subtotal": {"name": "total_refund_subtotal", "description": "Total amount refunded by the customer. Note that that `date_day` will be when the order was created, not refunded.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_refund_tax": {"name": "total_refund_tax", "description": "Total tax applied to the customer's refunds.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "count_cancelled_orders": {"name": "count_cancelled_orders", "description": "The count of orders that the customer made on this day and canceled.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "count_products": {"name": "count_products", "description": "The count of distinct products (based on distinct `product_ids`) that the customer purchased.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "count_product_variants": {"name": "count_product_variants", "description": "The count of distinct products variants that the customer purchased.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "sum_quantity": {"name": "sum_quantity", "description": "The total quantity of items that the customer purchased.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_order_adjustment_amount": {"name": "total_order_adjustment_amount", "description": "The total amount of adjustments made to the customer's orders.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_order_adjustment_tax_amount": {"name": "total_order_adjustment_tax_amount", "description": "The total amount of taxes applied to adjustments made to the customer's orders.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify_holistic_reporting://models/intermediate/int_shopify_holistic_reporting.yml", "compiled_path": "target/compiled/shopify_holistic_reporting/models/intermediate/int__daily_shopify_customer_orders.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "sk_combo"}, "created_at": 1641410292.873512, "compiled_sql": "with orders as (\n\n select *\n from `dbt-package-testing`.`dbt_transformations`.`shopify_holistic_reporting__orders_attribution`\n\n), order_lines as (\n\n select *\n from `dbt-package-testing`.`dbt_transformations`.`shopify__order_lines`\n\n), order_line_metrics as (\n\n select \n order_id,\n source_relation,\n count(distinct product_id) as count_products,\n count(distinct product_id || '-' || variant_id) as count_product_variants,\n sum(quantity) as sum_quantity\n \n from order_lines\n group by 1,2\n\n), join_orders as (\n\n select \n orders.*,\n order_line_metrics.count_products,\n order_line_metrics.count_product_variants,\n order_line_metrics.sum_quantity\n\n from orders \n left join order_line_metrics\n on orders.order_id = order_line_metrics.order_id\n and orders.shopify_source_relation = order_line_metrics.source_relation\n\n), daily_order_metrics as (\n\n select\n cast( \n timestamp_trunc(\n cast(created_timestamp as timestamp),\n day\n )\n\n as date) as date_day,\n email,\n last_touch_campaign_id,\n last_touch_flow_id,\n last_touch_campaign_name,\n last_touch_flow_name,\n last_touch_variation_id,\n last_touch_campaign_subject_line,\n last_touch_campaign_type,\n shopify_source_relation as source_relation,\n\n count(distinct order_id) as total_orders,\n sum(order_adjusted_total) as total_price,\n\n sum(line_item_count) as count_line_items,\n sum(total_line_items_price) as total_line_items_price,\n \n\n sum(total_discounts) as total_discounts,\n sum(total_tax) as total_tax,\n sum(shipping_cost) as total_shipping_cost,\n\n \n sum(refund_subtotal) as total_refund_subtotal,\n sum(refund_total_tax) as total_refund_tax,\n \n\n sum(case when cancelled_timestamp is not null then 1 else 0 end) as count_cancelled_orders,\n sum(count_products) as count_products,\n sum(count_product_variants) as count_product_variants,\n sum(sum_quantity) as sum_quantity\n\n \n , sum(order_adjustment_amount) as total_order_adjustment_amount\n , sum(order_adjustment_tax_amount) as total_order_adjustment_tax_amount\n \n \n\n from join_orders\n group by 1,2,3,4,5,6,7,8,9,10\n)\n\nselect *\nfrom daily_order_metrics", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_transformations`.`int__daily_shopify_customer_orders`"}, "model.shopify_holistic_reporting.int__shopify_customer_rollup": {"raw_sql": "with customers as (\n\n select \n *,\n row_number() over(partition by email order by created_timestamp desc) as customer_index\n\n from {{ ref('shopify__customers') }}\n\n where email is not null -- nonsensical to include any null emails in this package\n\n), aggregate_customers as (\n\n select\n lower(email) as email,\n source_relation,\n {{ fivetran_utils.string_agg(\"cast(customer_id as \" ~ dbt_utils.type_string() ~ \")\", \"', '\") }} as customer_ids,\n {{ fivetran_utils.string_agg(\"distinct cast(phone as \" ~ dbt_utils.type_string() ~ \")\", \"', '\") }} as phone_numbers,\n\n max(case when customer_index = 1 then first_name || ' ' || last_name else null end) as full_name,\n\n min(created_timestamp) as first_shopify_account_made_at,\n max(created_timestamp) as last_shopify_account_made_at,\n min(first_order_timestamp) as first_order_at,\n max(most_recent_order_timestamp) as last_order_at,\n max(updated_timestamp) as last_updated_at,\n\n -- sum across accounts\n sum(lifetime_total_spent) as lifetime_total_spent,\n sum(lifetime_total_refunded) as lifetime_total_refunded,\n sum(lifetime_total_amount) as lifetime_total_amount,\n sum(lifetime_count_orders) as lifetime_count_orders,\n case \n when sum(lifetime_count_orders) = 0 then 0\n else sum(lifetime_total_spent) / sum(lifetime_count_orders) end as average_order_value,\n\n -- take true if ever given for boolean fields\n {{ fivetran_utils.max_bool(\"has_accepted_marketing\") }} as has_accepted_marketing,\n {{ fivetran_utils.max_bool(\"case when customer_index = 1 then is_tax_exempt else null end\") }} as is_tax_exempt, -- since this changes every year\n {{ fivetran_utils.max_bool(\"is_verified_email\") }} as is_verified_email,\n\n -- other stuff\n max(case when customer_index = 1 then default_address_id else null end) as default_address_id,\n max(case when customer_index = 1 then account_state else null end) as account_state\n\n -- ok let's get any custom passthrough columns! might want to put all max(Case when)'s in here....\n {% set cols = adapter.get_columns_in_relation(ref('shopify__customers')) %}\n {% set except_cols = ['_fivetran_synced', 'email', 'source_relation', 'customer_id', 'phone', 'first_name', 'last_name', 'created_timestamp', 'first_order_timestamp', 'most_recent_order_timestamp',\n 'updated_timestamp', 'lifetime_total_spent', 'lifetime_total_refunded', 'lifetime_total_amount', 'lifetime_count_orders', 'average_order_value', 'has_accepted_marketing',\n 'is_tax_exempt', 'is_verified_email', 'default_address_id', 'account_state'] %}\n {% for col in cols %}\n {% if col.column|lower not in except_cols %}\n , max(case when customer_index = 1 then {{ col.column }} else null end) as {{ col.column }}\n {% endif %}\n {% endfor %}\n\n from customers \n\n group by 1,2\n\n)\n\nselect *\nfrom aggregate_customers", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt_utils.type_string", "macro.fivetran_utils.string_agg", "macro.fivetran_utils.max_bool"], "nodes": ["model.shopify.shopify__customers", "model.shopify.shopify__customers"]}, "config": {"enabled": true, "alias": null, "schema": "sk_combo", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_transformations", "fqn": ["shopify_holistic_reporting", "intermediate", "int__shopify_customer_rollup"], "unique_id": "model.shopify_holistic_reporting.int__shopify_customer_rollup", "package_name": "shopify_holistic_reporting", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify_holistic_reporting", "path": "intermediate/int__shopify_customer_rollup.sql", "original_file_path": "models/intermediate/int__shopify_customer_rollup.sql", "name": "int__shopify_customer_rollup", "alias": "int__shopify_customer_rollup", "checksum": {"name": "sha256", "checksum": "4ee4ea4a1e004aa732004a879fff8a885afe00f56e679b43ae87032740905bff"}, "tags": [], "refs": [["shopify__customers"], ["shopify__customers"]], "sources": [], "description": "Table rolling up shopify customer accounts to the email level. In theory, these should be 1:1, but under certain circumstances (ie bots) one email can be associated with multiple customer_ids.\n", "columns": {"source_relation": {"name": "source_relation", "description": "The source where this data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioning together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "has_accepted_marketing": {"name": "has_accepted_marketing", "description": "Whether the customer has consented to receive marketing material via email.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_shopify_account_made_at": {"name": "first_shopify_account_made_at", "description": "The date and time when the customer account first associated with this email was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_shopify_account_made_at": {"name": "last_shopify_account_made_at", "description": "The date and time when the customer account first associated with this email was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "default_address_id": {"name": "default_address_id", "description": "The default address for the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email": {"name": "email", "description": "The unique email address of the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "full_name": {"name": "full_name", "description": "The customer's full name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "customer_ids": {"name": "customer_ids", "description": "A comma-separated aggregated list of Shopify IDs for the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "lifetime_count_orders": {"name": "lifetime_count_orders", "description": "The number of orders associated with this customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "phone_numbers": {"name": "phone_numbers", "description": "Comma separated aggregated list of unique phone numbers (E.164 format) for this customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "account_state": {"name": "account_state", "description": "The state of the customer's account with a shop.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_tax_exempt": {"name": "is_tax_exempt", "description": "Whether the customer is exempt from paying taxes on their order. If true, then taxes won't be applied to an order at checkout. If false, then taxes will be applied at checkout.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_updated_at": {"name": "last_updated_at", "description": "The date and time when the customer information was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_order_at": {"name": "first_order_at", "description": "The timestamp the customer completed their first order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_order_at": {"name": "last_order_at", "description": "The timestamp the customer completed their most recent order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "average_order_value": {"name": "average_order_value", "description": "The average order value for the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "lifetime_total_spent": {"name": "lifetime_total_spent", "description": "The total amount of money that the customer has spent on orders across their order history.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "lifetime_total_refunded": {"name": "lifetime_total_refunded", "description": "The total amount of money that the customer has been refunded on orders across their order history.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "lifetime_total_amount": {"name": "lifetime_total_amount", "description": "The total amount of money (minus refunds) that the customer has spent across their order history.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_verified_email": {"name": "is_verified_email", "description": "Whether the customer has verified their email address.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify_holistic_reporting://models/intermediate/int_shopify_holistic_reporting.yml", "compiled_path": "target/compiled/shopify_holistic_reporting/models/intermediate/int__shopify_customer_rollup.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "sk_combo"}, "created_at": 1641410292.881428, "compiled_sql": "with customers as (\n\n select \n *,\n row_number() over(partition by email order by created_timestamp desc) as customer_index\n\n from `dbt-package-testing`.`dbt_transformations`.`shopify__customers`\n\n where email is not null -- nonsensical to include any null emails in this package\n\n), aggregate_customers as (\n\n select\n lower(email) as email,\n source_relation,\n \n string_agg(cast(customer_id as \n string\n), ', ')\n\n as customer_ids,\n \n string_agg(distinct cast(phone as \n string\n), ', ')\n\n as phone_numbers,\n\n max(case when customer_index = 1 then first_name || ' ' || last_name else null end) as full_name,\n\n min(created_timestamp) as first_shopify_account_made_at,\n max(created_timestamp) as last_shopify_account_made_at,\n min(first_order_timestamp) as first_order_at,\n max(most_recent_order_timestamp) as last_order_at,\n max(updated_timestamp) as last_updated_at,\n\n -- sum across accounts\n sum(lifetime_total_spent) as lifetime_total_spent,\n sum(lifetime_total_refunded) as lifetime_total_refunded,\n sum(lifetime_total_amount) as lifetime_total_amount,\n sum(lifetime_count_orders) as lifetime_count_orders,\n case \n when sum(lifetime_count_orders) = 0 then 0\n else sum(lifetime_total_spent) / sum(lifetime_count_orders) end as average_order_value,\n\n -- take true if ever given for boolean fields\n \n\n max( has_accepted_marketing )\n\n as has_accepted_marketing,\n \n\n max( case when customer_index = 1 then is_tax_exempt else null end )\n\n as is_tax_exempt, -- since this changes every year\n \n\n max( is_verified_email )\n\n as is_verified_email,\n\n -- other stuff\n max(case when customer_index = 1 then default_address_id else null end) as default_address_id,\n max(case when customer_index = 1 then account_state else null end) as account_state\n\n -- ok let's get any custom passthrough columns! might want to put all max(Case when)'s in here....\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n , max(case when customer_index = 1 then multipass_identifier else null end) as multipass_identifier\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n from customers \n\n group by 1,2\n\n)\n\nselect *\nfrom aggregate_customers", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_transformations`.`int__shopify_customer_rollup`"}, "model.shopify_holistic_reporting.int__daily_klaviyo_user_metrics": {"raw_sql": "with events as (\n\n select *\n from {{ ref('klaviyo__events') }}\n\n), pivot_out_events as (\n \n select \n cast( {{ dbt_utils.date_trunc('day', 'occurred_at') }} as date) as date_day,\n person_email as email,\n last_touch_campaign_id,\n last_touch_flow_id,\n campaign_name,\n flow_name,\n variation_id,\n campaign_subject_line,\n campaign_type,\n source_relation,\n min(occurred_at) as first_event_at,\n max(occurred_at) as last_event_at\n\n -- sum up the numeric value associated with events (most likely will mean revenue)\n {% for rm in var('klaviyo__sum_revenue_metrics') %}\n , sum(case when lower(type) = '{{ rm | lower }}' then numeric_value else 0 end) \n as {{ 'sum_revenue_' ~ rm | replace(' ', '_') | replace('(', '') | replace(')', '') | lower }} -- removing special characters that I have seen in different integration events\n {% endfor %}\n\n -- count up the number of instances of each metric\n {% for cm in var('klaviyo__count_metrics') %}\n , sum(case when lower(type) = '{{ cm | lower }}' then 1 else 0 end) \n as {{ 'count_' ~ cm | replace(' ', '_') | replace('(', '') | replace(')', '') | lower }} -- removing special characters that I have seen in different integration events\n {% endfor %}\n\n from events\n {{ dbt_utils.group_by(n=10) }}\n)\n\n-- the grain will be person-flow-campaign-variation-day\nselect *\nfrom pivot_out_events", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt_utils.date_trunc", "macro.dbt_utils.group_by"], "nodes": ["model.klaviyo.klaviyo__events"]}, "config": {"enabled": true, "alias": null, "schema": "sk_combo", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_transformations", "fqn": ["shopify_holistic_reporting", "intermediate", "int__daily_klaviyo_user_metrics"], "unique_id": "model.shopify_holistic_reporting.int__daily_klaviyo_user_metrics", "package_name": "shopify_holistic_reporting", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify_holistic_reporting", "path": "intermediate/int__daily_klaviyo_user_metrics.sql", "original_file_path": "models/intermediate/int__daily_klaviyo_user_metrics.sql", "name": "int__daily_klaviyo_user_metrics", "alias": "int__daily_klaviyo_user_metrics", "checksum": {"name": "sha256", "checksum": "4b62c6d1433c3a77e54d74c4925bd3b15d3ff6647be3a0f893d376424ae23852"}, "tags": [], "refs": [["klaviyo__events"]], "sources": [], "description": "", "columns": {"date_day": {"name": "date_day", "description": "Day on which the customer performed these activities.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email": {"name": "email", "description": "Email address of the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_campaign_id": {"name": "last_touch_campaign_id", "description": "Foreign key referencing the CAMPAIGN attributed with these metrics (by the package's attribution model).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_flow_id": {"name": "last_touch_flow_id", "description": "Foreign key referencing the FLOW attributed with these metrics (by the package's attribution model).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_name": {"name": "campaign_name", "description": "Name of the attributed campaign. If not specified, this will default to the subject of the campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_name": {"name": "flow_name", "description": "Name of the attributed flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variation_id": {"name": "variation_id", "description": "Unique ID of the attributed flow or campaign variation group. This does not map onto another table. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_event_at": {"name": "first_event_at", "description": "Timestamp of the first interaction between this campaign/flow and a person on this day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_event_at": {"name": "last_event_at", "description": "Timestamp of the last interaction between this campaign/flow and a person on this day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_subject_line": {"name": "campaign_subject_line", "description": "Email subject line of the Klaviyo campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_type": {"name": "campaign_type", "description": "Type of campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_relation": {"name": "source_relation", "description": "The source where this Klaviyo data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioning together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify_holistic_reporting://models/intermediate/int_shopify_holistic_reporting.yml", "compiled_path": "target/compiled/shopify_holistic_reporting/models/intermediate/int__daily_klaviyo_user_metrics.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "sk_combo"}, "created_at": 1641410292.864119, "compiled_sql": "with events as (\n\n select *\n from `dbt-package-testing`.`dbt_transformations`.`klaviyo__events`\n\n), pivot_out_events as (\n \n select \n cast( \n timestamp_trunc(\n cast(occurred_at as timestamp),\n day\n )\n\n as date) as date_day,\n person_email as email,\n last_touch_campaign_id,\n last_touch_flow_id,\n campaign_name,\n flow_name,\n variation_id,\n campaign_subject_line,\n campaign_type,\n source_relation,\n min(occurred_at) as first_event_at,\n max(occurred_at) as last_event_at\n\n -- sum up the numeric value associated with events (most likely will mean revenue)\n \n , sum(case when lower(type) = 'refunded order' then numeric_value else 0 end) \n as sum_revenue_refunded_order -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'placed order' then numeric_value else 0 end) \n as sum_revenue_placed_order -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'ordered product' then numeric_value else 0 end) \n as sum_revenue_ordered_product -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'checkout started' then numeric_value else 0 end) \n as sum_revenue_checkout_started -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'cancelled order' then numeric_value else 0 end) \n as sum_revenue_cancelled_order -- removing special characters that I have seen in different integration events\n \n\n -- count up the number of instances of each metric\n \n , sum(case when lower(type) = 'active on site' then 1 else 0 end) \n as count_active_on_site -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'viewed product' then 1 else 0 end) \n as count_viewed_product -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'ordered product' then 1 else 0 end) \n as count_ordered_product -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'placed order' then 1 else 0 end) \n as count_placed_order -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'refunded order' then 1 else 0 end) \n as count_refunded_order -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'received email' then 1 else 0 end) \n as count_received_email -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'clicked email' then 1 else 0 end) \n as count_clicked_email -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'opened email' then 1 else 0 end) \n as count_opened_email -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'marked email as spam' then 1 else 0 end) \n as count_marked_email_as_spam -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'unsubscribed' then 1 else 0 end) \n as count_unsubscribed -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'received sms' then 1 else 0 end) \n as count_received_sms -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'clicked sms' then 1 else 0 end) \n as count_clicked_sms -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'sent sms' then 1 else 0 end) \n as count_sent_sms -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'unsubscribed from sms' then 1 else 0 end) \n as count_unsubscribed_from_sms -- removing special characters that I have seen in different integration events\n \n\n from events\n group by 1,2,3,4,5,6,7,8,9,10\n)\n\n-- the grain will be person-flow-campaign-variation-day\nselect *\nfrom pivot_out_events", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_transformations`.`int__daily_klaviyo_user_metrics`"}, "model.shopify_holistic_reporting.int__klaviyo_person_rollup": {"raw_sql": "with persons as (\n\n select\n *,\n row_number() over (partition by email order by created_at desc) as person_index\n \n from {{ ref('klaviyo__persons') }}\n where email is not null -- should never be the case but just in case\n\n), aggregate_persons as (\n\n select \n lower(email) as email,\n source_relation,\n {{ fivetran_utils.string_agg(\"person_id\", \"', '\") }} as person_ids,\n {{ fivetran_utils.string_agg(\"distinct cast(phone_number as \" ~ dbt_utils.type_string() ~ \")\", \"', '\") }} as phone_numbers,\n max( case when person_index = 1 then full_name else null end) as full_name,\n \n min(created_at) as first_klaviyo_account_made_at,\n max(created_at) as last_klaviyo_account_made_at,\n max(updated_at) as last_updated_at,\n min(first_event_at) as first_event_at,\n max(last_event_at) as last_event_at,\n min(first_campaign_touch_at) as first_campaign_touch_at,\n max(last_campaign_touch_at) as last_campaign_touch_at,\n min(first_flow_touch_at) as first_flow_touch_at,\n max(last_flow_touch_at) as last_flow_touch_at,\n\n sum(count_total_campaigns) as count_total_campaigns,\n sum(count_total_flows) as count_total_flows\n\n\n {% set cols = adapter.get_columns_in_relation(ref('klaviyo__persons')) %}\n {% set except_cols = ['_fivetran_synced', 'email', 'source_relation', 'person_id', 'phone_number', 'full_name', 'created_at', 'updated_at', 'count_total_campaigns', 'count_total_flows',\n 'first_event_at', 'last_event_at', 'first_campaign_touch_at', 'last_campaign_touch_at', 'first_flow_touch_at', 'last_flow_touch_at'] %}\n {% for col in cols %}\n {% if col.column|lower not in except_cols %}\n , max(case when person_index = 1 then {{ col.column }} else null end) as {{ col.column }}\n {% endif %}\n {% endfor %}\n\n from persons\n group by 1,2\n)\n\nselect *\nfrom aggregate_persons", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.string_agg", "macro.dbt_utils.type_string"], "nodes": ["model.klaviyo.klaviyo__persons", "model.klaviyo.klaviyo__persons"]}, "config": {"enabled": true, "alias": null, "schema": "sk_combo", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_transformations", "fqn": ["shopify_holistic_reporting", "intermediate", "int__klaviyo_person_rollup"], "unique_id": "model.shopify_holistic_reporting.int__klaviyo_person_rollup", "package_name": "shopify_holistic_reporting", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify_holistic_reporting", "path": "intermediate/int__klaviyo_person_rollup.sql", "original_file_path": "models/intermediate/int__klaviyo_person_rollup.sql", "name": "int__klaviyo_person_rollup", "alias": "int__klaviyo_person_rollup", "checksum": {"name": "sha256", "checksum": "45decc1969fef4f4fe0fb7ec2b4531a4a57a160d1610e2fa5f8029173b50414a"}, "tags": [], "refs": [["klaviyo__persons"], ["klaviyo__persons"]], "sources": [], "description": "Table rolling up Klaviyo person accounts to the email level. In theory, these should certainly be 1:1, but under certain circumstances emails can be sent with multiple person_ids from the Klaviyo API.\n", "columns": {"source_relation": {"name": "source_relation", "description": "The source where this data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioning together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email": {"name": "email", "description": "The email address and the unique identifier for a profile.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "person_ids": {"name": "person_ids", "description": "A comma-separated aggregated list of Klaviyo IDs for the person.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "phone_numbers": {"name": "phone_numbers", "description": "Comma separated aggregated list of unique phone numbers for this person.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "full_name": {"name": "full_name", "description": "Person's full name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_klaviyo_account_made_at": {"name": "first_klaviyo_account_made_at", "description": "Timestamp of when the person's profile was first created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_klaviyo_account_made_at": {"name": "last_klaviyo_account_made_at", "description": "Timestamp of when the person's profile was last created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_updated_at": {"name": "last_updated_at", "description": "Timestamp of when the person profile was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_event_at": {"name": "first_event_at", "description": "Timestamp of when the user first triggered an event (not limited to campaign and flow interactions).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_event_at": {"name": "last_event_at", "description": "Timestamp of when the user last triggered an event (not limited to campaign and flow interactions).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_campaign_touch_at": {"name": "first_campaign_touch_at", "description": "Timestamp of when the user first interacted with a campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_campaign_touch_at": {"name": "last_campaign_touch_at", "description": "Timestamp of when the user last interacted with a campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_flow_touch_at": {"name": "first_flow_touch_at", "description": "Timestamp of when the user first interacted with a flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_flow_touch_at": {"name": "last_flow_touch_at", "description": "Timestamp of when the user last interacted with a flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "count_total_campaigns": {"name": "count_total_campaigns", "description": "Count of the number of campaigns this person has interacted with.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "count_total_flows": {"name": "count_total_flows", "description": "Count of the number of flows this person has interacted with.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "address_1": {"name": "address_1", "description": "First line of the person's address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "address_2": {"name": "address_2", "description": "Second line of the person's address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "city": {"name": "city", "description": "City they live in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "country": {"name": "country", "description": "Country they live in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "zip": {"name": "zip", "description": "Postal code where they live.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "latitude": {"name": "latitude", "description": "Latitude of the person's location.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "longitude": {"name": "longitude", "description": "Longitude of the person's location.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization": {"name": "organization", "description": "Business organization they belong to.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "region": {"name": "region", "description": "Region or state they live in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "timezone": {"name": "timezone", "description": "Timezone they are situated in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "title": {"name": "title", "description": "Title at their business or organization.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify_holistic_reporting://models/intermediate/int_shopify_holistic_reporting.yml", "compiled_path": "target/compiled/shopify_holistic_reporting/models/intermediate/int__klaviyo_person_rollup.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "sk_combo"}, "created_at": 1641410292.892513, "compiled_sql": "with persons as (\n\n select\n *,\n row_number() over (partition by email order by created_at desc) as person_index\n \n from `dbt-package-testing`.`dbt_transformations`.`klaviyo__persons`\n where email is not null -- should never be the case but just in case\n\n), aggregate_persons as (\n\n select \n lower(email) as email,\n source_relation,\n \n string_agg(person_id, ', ')\n\n as person_ids,\n \n string_agg(distinct cast(phone_number as \n string\n), ', ')\n\n as phone_numbers,\n max( case when person_index = 1 then full_name else null end) as full_name,\n \n min(created_at) as first_klaviyo_account_made_at,\n max(created_at) as last_klaviyo_account_made_at,\n max(updated_at) as last_updated_at,\n min(first_event_at) as first_event_at,\n max(last_event_at) as last_event_at,\n min(first_campaign_touch_at) as first_campaign_touch_at,\n max(last_campaign_touch_at) as last_campaign_touch_at,\n min(first_flow_touch_at) as first_flow_touch_at,\n max(last_flow_touch_at) as last_flow_touch_at,\n\n sum(count_total_campaigns) as count_total_campaigns,\n sum(count_total_flows) as count_total_flows\n\n\n \n \n \n \n \n \n , max(case when person_index = 1 then address_1 else null end) as address_1\n \n \n \n , max(case when person_index = 1 then address_2 else null end) as address_2\n \n \n \n , max(case when person_index = 1 then city else null end) as city\n \n \n \n , max(case when person_index = 1 then country else null end) as country\n \n \n \n , max(case when person_index = 1 then zip else null end) as zip\n \n \n \n \n \n \n \n \n \n , max(case when person_index = 1 then latitude else null end) as latitude\n \n \n \n , max(case when person_index = 1 then longitude else null end) as longitude\n \n \n \n , max(case when person_index = 1 then organization else null end) as organization\n \n \n \n \n \n , max(case when person_index = 1 then region else null end) as region\n \n \n \n , max(case when person_index = 1 then timezone else null end) as timezone\n \n \n \n , max(case when person_index = 1 then title else null end) as title\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n , max(case when person_index = 1 then total_sum_revenue_refunded_order else null end) as total_sum_revenue_refunded_order\n \n \n \n , max(case when person_index = 1 then organic_sum_revenue_refunded_order else null end) as organic_sum_revenue_refunded_order\n \n \n \n , max(case when person_index = 1 then total_sum_revenue_placed_order else null end) as total_sum_revenue_placed_order\n \n \n \n , max(case when person_index = 1 then organic_sum_revenue_placed_order else null end) as organic_sum_revenue_placed_order\n \n \n \n , max(case when person_index = 1 then total_sum_revenue_ordered_product else null end) as total_sum_revenue_ordered_product\n \n \n \n , max(case when person_index = 1 then organic_sum_revenue_ordered_product else null end) as organic_sum_revenue_ordered_product\n \n \n \n , max(case when person_index = 1 then total_sum_revenue_checkout_started else null end) as total_sum_revenue_checkout_started\n \n \n \n , max(case when person_index = 1 then organic_sum_revenue_checkout_started else null end) as organic_sum_revenue_checkout_started\n \n \n \n , max(case when person_index = 1 then total_sum_revenue_cancelled_order else null end) as total_sum_revenue_cancelled_order\n \n \n \n , max(case when person_index = 1 then organic_sum_revenue_cancelled_order else null end) as organic_sum_revenue_cancelled_order\n \n \n \n , max(case when person_index = 1 then total_count_active_on_site else null end) as total_count_active_on_site\n \n \n \n , max(case when person_index = 1 then total_count_viewed_product else null end) as total_count_viewed_product\n \n \n \n , max(case when person_index = 1 then total_count_ordered_product else null end) as total_count_ordered_product\n \n \n \n , max(case when person_index = 1 then total_count_placed_order else null end) as total_count_placed_order\n \n \n \n , max(case when person_index = 1 then total_count_refunded_order else null end) as total_count_refunded_order\n \n \n \n , max(case when person_index = 1 then total_count_received_email else null end) as total_count_received_email\n \n \n \n , max(case when person_index = 1 then total_count_clicked_email else null end) as total_count_clicked_email\n \n \n \n , max(case when person_index = 1 then total_count_opened_email else null end) as total_count_opened_email\n \n \n \n , max(case when person_index = 1 then total_count_marked_email_as_spam else null end) as total_count_marked_email_as_spam\n \n \n \n , max(case when person_index = 1 then total_count_unsubscribed else null end) as total_count_unsubscribed\n \n \n \n , max(case when person_index = 1 then total_count_received_sms else null end) as total_count_received_sms\n \n \n \n , max(case when person_index = 1 then total_count_clicked_sms else null end) as total_count_clicked_sms\n \n \n \n , max(case when person_index = 1 then total_count_sent_sms else null end) as total_count_sent_sms\n \n \n \n , max(case when person_index = 1 then total_count_unsubscribed_from_sms else null end) as total_count_unsubscribed_from_sms\n \n \n\n from persons\n group by 1,2\n)\n\nselect *\nfrom aggregate_persons", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_transformations`.`int__klaviyo_person_rollup`"}, "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__customer_customer_id__source_relation.1b2185db25": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_d00da641d0cc06ebef083c43ddfae4be\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["customer_id", "source_relation"], "model": "{{ get_where_subquery(ref('stg_shopify__customer')) }}"}, "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.shopify_source.stg_shopify__customer"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_d00da641d0cc06ebef083c43ddfae4be", "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": "dbt_jamie_dbt_test__audit", "fqn": ["shopify_source", "dbt_utils_unique_combination_of_columns_stg_shopify__customer_customer_id__source_relation"], "unique_id": "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__customer_customer_id__source_relation.1b2185db25", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify_source", "path": "dbt_utils_unique_combination_o_d00da641d0cc06ebef083c43ddfae4be.sql", "original_file_path": "models/stg_shopify.yml", "name": "dbt_utils_unique_combination_of_columns_stg_shopify__customer_customer_id__source_relation", "alias": "dbt_utils_unique_combination_o_d00da641d0cc06ebef083c43ddfae4be", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_shopify__customer"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/stg_shopify.yml/dbt_utils_unique_combination_o_d00da641d0cc06ebef083c43ddfae4be.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_d00da641d0cc06ebef083c43ddfae4be"}, "created_at": 1641410292.1966999, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n customer_id, source_relation\n from `dbt-package-testing`.`dbt_transformations`.`stg_shopify__customer`\n group by customer_id, source_relation\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_shopify__customer"}, "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_line_refund_order_line_refund_id__source_relation.1877420c29": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_33b2f20dc9ea13a94a10a635383becf3\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["order_line_refund_id", "source_relation"], "model": "{{ get_where_subquery(ref('stg_shopify__order_line_refund')) }}"}, "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.shopify_source.stg_shopify__order_line_refund"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_33b2f20dc9ea13a94a10a635383becf3", "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": "dbt_jamie_dbt_test__audit", "fqn": ["shopify_source", "dbt_utils_unique_combination_of_columns_stg_shopify__order_line_refund_order_line_refund_id__source_relation"], "unique_id": "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_line_refund_order_line_refund_id__source_relation.1877420c29", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify_source", "path": "dbt_utils_unique_combination_o_33b2f20dc9ea13a94a10a635383becf3.sql", "original_file_path": "models/stg_shopify.yml", "name": "dbt_utils_unique_combination_of_columns_stg_shopify__order_line_refund_order_line_refund_id__source_relation", "alias": "dbt_utils_unique_combination_o_33b2f20dc9ea13a94a10a635383becf3", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_shopify__order_line_refund"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/stg_shopify.yml/dbt_utils_unique_combination_o_33b2f20dc9ea13a94a10a635383becf3.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_33b2f20dc9ea13a94a10a635383becf3"}, "created_at": 1641410292.212053, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n order_line_refund_id, source_relation\n from `dbt-package-testing`.`dbt_transformations`.`stg_shopify__order_line_refund`\n group by order_line_refund_id, source_relation\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_shopify__order_line_refund"}, "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_line_order_line_id__source_relation.c2797e7a9c": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_d47b5ce640a9316320c17565339223ec\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["order_line_id", "source_relation"], "model": "{{ get_where_subquery(ref('stg_shopify__order_line')) }}"}, "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.shopify_source.stg_shopify__order_line"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_d47b5ce640a9316320c17565339223ec", "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": "dbt_jamie_dbt_test__audit", "fqn": ["shopify_source", "dbt_utils_unique_combination_of_columns_stg_shopify__order_line_order_line_id__source_relation"], "unique_id": "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_line_order_line_id__source_relation.c2797e7a9c", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify_source", "path": "dbt_utils_unique_combination_o_d47b5ce640a9316320c17565339223ec.sql", "original_file_path": "models/stg_shopify.yml", "name": "dbt_utils_unique_combination_of_columns_stg_shopify__order_line_order_line_id__source_relation", "alias": "dbt_utils_unique_combination_o_d47b5ce640a9316320c17565339223ec", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_shopify__order_line"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/stg_shopify.yml/dbt_utils_unique_combination_o_d47b5ce640a9316320c17565339223ec.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_d47b5ce640a9316320c17565339223ec"}, "created_at": 1641410292.217419, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n order_line_id, source_relation\n from `dbt-package-testing`.`dbt_transformations`.`stg_shopify__order_line`\n group by order_line_id, source_relation\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_shopify__order_line"}, "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_order_id__source_relation.81d10381c1": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_3f5201314db17428b709b11583cd0f7e\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["order_id", "source_relation"], "model": "{{ get_where_subquery(ref('stg_shopify__order')) }}"}, "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.shopify_source.stg_shopify__order"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_3f5201314db17428b709b11583cd0f7e", "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": "dbt_jamie_dbt_test__audit", "fqn": ["shopify_source", "dbt_utils_unique_combination_of_columns_stg_shopify__order_order_id__source_relation"], "unique_id": "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_order_id__source_relation.81d10381c1", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify_source", "path": "dbt_utils_unique_combination_o_3f5201314db17428b709b11583cd0f7e.sql", "original_file_path": "models/stg_shopify.yml", "name": "dbt_utils_unique_combination_of_columns_stg_shopify__order_order_id__source_relation", "alias": "dbt_utils_unique_combination_o_3f5201314db17428b709b11583cd0f7e", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_shopify__order"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/stg_shopify.yml/dbt_utils_unique_combination_o_3f5201314db17428b709b11583cd0f7e.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_3f5201314db17428b709b11583cd0f7e"}, "created_at": 1641410292.2238688, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n order_id, source_relation\n from `dbt-package-testing`.`dbt_transformations`.`stg_shopify__order`\n group by order_id, source_relation\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_shopify__order"}, "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__product_product_id__source_relation.48b32ab6a2": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_eb9efccfbdaff32f938da98287403a1d\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["product_id", "source_relation"], "model": "{{ get_where_subquery(ref('stg_shopify__product')) }}"}, "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.shopify_source.stg_shopify__product"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_eb9efccfbdaff32f938da98287403a1d", "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": "dbt_jamie_dbt_test__audit", "fqn": ["shopify_source", "dbt_utils_unique_combination_of_columns_stg_shopify__product_product_id__source_relation"], "unique_id": "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__product_product_id__source_relation.48b32ab6a2", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify_source", "path": "dbt_utils_unique_combination_o_eb9efccfbdaff32f938da98287403a1d.sql", "original_file_path": "models/stg_shopify.yml", "name": "dbt_utils_unique_combination_of_columns_stg_shopify__product_product_id__source_relation", "alias": "dbt_utils_unique_combination_o_eb9efccfbdaff32f938da98287403a1d", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_shopify__product"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/stg_shopify.yml/dbt_utils_unique_combination_o_eb9efccfbdaff32f938da98287403a1d.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_eb9efccfbdaff32f938da98287403a1d"}, "created_at": 1641410292.229833, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n product_id, source_relation\n from `dbt-package-testing`.`dbt_transformations`.`stg_shopify__product`\n group by product_id, source_relation\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_shopify__product"}, "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__product_variant_variant_id__source_relation.7506695ec0": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_84d19b85e52ebcaca03bcefe4191b60e\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["variant_id", "source_relation"], "model": "{{ get_where_subquery(ref('stg_shopify__product_variant')) }}"}, "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.shopify_source.stg_shopify__product_variant"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_84d19b85e52ebcaca03bcefe4191b60e", "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": "dbt_jamie_dbt_test__audit", "fqn": ["shopify_source", "dbt_utils_unique_combination_of_columns_stg_shopify__product_variant_variant_id__source_relation"], "unique_id": "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__product_variant_variant_id__source_relation.7506695ec0", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify_source", "path": "dbt_utils_unique_combination_o_84d19b85e52ebcaca03bcefe4191b60e.sql", "original_file_path": "models/stg_shopify.yml", "name": "dbt_utils_unique_combination_of_columns_stg_shopify__product_variant_variant_id__source_relation", "alias": "dbt_utils_unique_combination_o_84d19b85e52ebcaca03bcefe4191b60e", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_shopify__product_variant"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/stg_shopify.yml/dbt_utils_unique_combination_o_84d19b85e52ebcaca03bcefe4191b60e.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_84d19b85e52ebcaca03bcefe4191b60e"}, "created_at": 1641410292.235425, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n variant_id, source_relation\n from `dbt-package-testing`.`dbt_transformations`.`stg_shopify__product_variant`\n group by variant_id, source_relation\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_shopify__product_variant"}, "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__transaction_transaction_id__source_relation.d55a33652a": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_47aceb0b987e9f3279b4301c10167f92\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["transaction_id", "source_relation"], "model": "{{ get_where_subquery(ref('stg_shopify__transaction')) }}"}, "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.shopify_source.stg_shopify__transaction"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_47aceb0b987e9f3279b4301c10167f92", "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": "dbt_jamie_dbt_test__audit", "fqn": ["shopify_source", "dbt_utils_unique_combination_of_columns_stg_shopify__transaction_transaction_id__source_relation"], "unique_id": "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__transaction_transaction_id__source_relation.d55a33652a", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify_source", "path": "dbt_utils_unique_combination_o_47aceb0b987e9f3279b4301c10167f92.sql", "original_file_path": "models/stg_shopify.yml", "name": "dbt_utils_unique_combination_of_columns_stg_shopify__transaction_transaction_id__source_relation", "alias": "dbt_utils_unique_combination_o_47aceb0b987e9f3279b4301c10167f92", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_shopify__transaction"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/stg_shopify.yml/dbt_utils_unique_combination_o_47aceb0b987e9f3279b4301c10167f92.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_47aceb0b987e9f3279b4301c10167f92"}, "created_at": 1641410292.240716, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n transaction_id, source_relation\n from `dbt-package-testing`.`dbt_transformations`.`stg_shopify__transaction`\n group by transaction_id, source_relation\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_shopify__transaction"}, "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__refund_refund_id__source_relation.cd4dbc2b35": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_b6b83918833e84e9f886aa4151e4e659\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["refund_id", "source_relation"], "model": "{{ get_where_subquery(ref('stg_shopify__refund')) }}"}, "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.shopify_source.stg_shopify__refund"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_b6b83918833e84e9f886aa4151e4e659", "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": "dbt_jamie_dbt_test__audit", "fqn": ["shopify_source", "dbt_utils_unique_combination_of_columns_stg_shopify__refund_refund_id__source_relation"], "unique_id": "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__refund_refund_id__source_relation.cd4dbc2b35", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify_source", "path": "dbt_utils_unique_combination_o_b6b83918833e84e9f886aa4151e4e659.sql", "original_file_path": "models/stg_shopify.yml", "name": "dbt_utils_unique_combination_of_columns_stg_shopify__refund_refund_id__source_relation", "alias": "dbt_utils_unique_combination_o_b6b83918833e84e9f886aa4151e4e659", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_shopify__refund"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/stg_shopify.yml/dbt_utils_unique_combination_o_b6b83918833e84e9f886aa4151e4e659.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_b6b83918833e84e9f886aa4151e4e659"}, "created_at": 1641410292.245882, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n refund_id, source_relation\n from `dbt-package-testing`.`dbt_transformations`.`stg_shopify__refund`\n group by refund_id, source_relation\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_shopify__refund"}, "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_adjustment_order_adjustment_id__source_relation.00b7d10cb0": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_8c4679057a756bef5907cd3799634207\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["order_adjustment_id", "source_relation"], "model": "{{ get_where_subquery(ref('stg_shopify__order_adjustment')) }}"}, "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.shopify_source.stg_shopify__order_adjustment"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_8c4679057a756bef5907cd3799634207", "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": "dbt_jamie_dbt_test__audit", "fqn": ["shopify_source", "dbt_utils_unique_combination_of_columns_stg_shopify__order_adjustment_order_adjustment_id__source_relation"], "unique_id": "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_adjustment_order_adjustment_id__source_relation.00b7d10cb0", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify_source", "path": "dbt_utils_unique_combination_o_8c4679057a756bef5907cd3799634207.sql", "original_file_path": "models/stg_shopify.yml", "name": "dbt_utils_unique_combination_of_columns_stg_shopify__order_adjustment_order_adjustment_id__source_relation", "alias": "dbt_utils_unique_combination_o_8c4679057a756bef5907cd3799634207", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_shopify__order_adjustment"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/stg_shopify.yml/dbt_utils_unique_combination_o_8c4679057a756bef5907cd3799634207.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_8c4679057a756bef5907cd3799634207"}, "created_at": 1641410292.251225, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n order_adjustment_id, source_relation\n from `dbt-package-testing`.`dbt_transformations`.`stg_shopify__order_adjustment`\n group by order_adjustment_id, source_relation\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_shopify__order_adjustment"}, "test.klaviyo_source.not_null_stg_klaviyo__campaign_campaign_id.5dfc47dc1d": {"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_klaviyo__campaign')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.klaviyo_source.stg_klaviyo__campaign"]}, "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": "dbt_jamie_dbt_test__audit", "fqn": ["klaviyo_source", "not_null_stg_klaviyo__campaign_campaign_id"], "unique_id": "test.klaviyo_source.not_null_stg_klaviyo__campaign_campaign_id.5dfc47dc1d", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/klaviyo_source", "path": "not_null_stg_klaviyo__campaign_campaign_id.sql", "original_file_path": "models/stg_klaviyo.yml", "name": "not_null_stg_klaviyo__campaign_campaign_id", "alias": "not_null_stg_klaviyo__campaign_campaign_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_klaviyo__campaign"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo.yml/not_null_stg_klaviyo__campaign_campaign_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1641410292.381693, "compiled_sql": "\n \n \n\nselect *\nfrom `dbt-package-testing`.`dbt_transformations`.`stg_klaviyo__campaign`\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_klaviyo__campaign"}, "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__campaign_campaign_id__source_relation.59158488ff": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_972961dcf9c5c4d5b8e43db578561c26\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["campaign_id", "source_relation"], "model": "{{ get_where_subquery(ref('stg_klaviyo__campaign')) }}"}, "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.klaviyo_source.stg_klaviyo__campaign"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_972961dcf9c5c4d5b8e43db578561c26", "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": "dbt_jamie_dbt_test__audit", "fqn": ["klaviyo_source", "dbt_utils_unique_combination_of_columns_stg_klaviyo__campaign_campaign_id__source_relation"], "unique_id": "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__campaign_campaign_id__source_relation.59158488ff", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/klaviyo_source", "path": "dbt_utils_unique_combination_o_972961dcf9c5c4d5b8e43db578561c26.sql", "original_file_path": "models/stg_klaviyo.yml", "name": "dbt_utils_unique_combination_of_columns_stg_klaviyo__campaign_campaign_id__source_relation", "alias": "dbt_utils_unique_combination_o_972961dcf9c5c4d5b8e43db578561c26", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_klaviyo__campaign"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo.yml/dbt_utils_unique_combination_o_972961dcf9c5c4d5b8e43db578561c26.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_972961dcf9c5c4d5b8e43db578561c26"}, "created_at": 1641410292.3849258, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n campaign_id, source_relation\n from `dbt-package-testing`.`dbt_transformations`.`stg_klaviyo__campaign`\n group by campaign_id, source_relation\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_klaviyo__campaign"}, "test.klaviyo_source.not_null_stg_klaviyo__event_event_id.7a09ac6ec1": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('stg_klaviyo__event')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.klaviyo_source.stg_klaviyo__event"]}, "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": "dbt_jamie_dbt_test__audit", "fqn": ["klaviyo_source", "not_null_stg_klaviyo__event_event_id"], "unique_id": "test.klaviyo_source.not_null_stg_klaviyo__event_event_id.7a09ac6ec1", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/klaviyo_source", "path": "not_null_stg_klaviyo__event_event_id.sql", "original_file_path": "models/stg_klaviyo.yml", "name": "not_null_stg_klaviyo__event_event_id", "alias": "not_null_stg_klaviyo__event_event_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_klaviyo__event"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo.yml/not_null_stg_klaviyo__event_event_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1641410292.391327, "compiled_sql": "\n \n \n\nselect *\nfrom `dbt-package-testing`.`dbt_transformations`.`stg_klaviyo__event`\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_id", "file_key_name": "models.stg_klaviyo__event"}, "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__event_event_id__source_relation.3778c651d7": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_8881439048410324e034ca08f1ef95fa\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["event_id", "source_relation"], "model": "{{ get_where_subquery(ref('stg_klaviyo__event')) }}"}, "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.klaviyo_source.stg_klaviyo__event"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_8881439048410324e034ca08f1ef95fa", "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": "dbt_jamie_dbt_test__audit", "fqn": ["klaviyo_source", "dbt_utils_unique_combination_of_columns_stg_klaviyo__event_event_id__source_relation"], "unique_id": "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__event_event_id__source_relation.3778c651d7", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/klaviyo_source", "path": "dbt_utils_unique_combination_o_8881439048410324e034ca08f1ef95fa.sql", "original_file_path": "models/stg_klaviyo.yml", "name": "dbt_utils_unique_combination_of_columns_stg_klaviyo__event_event_id__source_relation", "alias": "dbt_utils_unique_combination_o_8881439048410324e034ca08f1ef95fa", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_klaviyo__event"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo.yml/dbt_utils_unique_combination_o_8881439048410324e034ca08f1ef95fa.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_8881439048410324e034ca08f1ef95fa"}, "created_at": 1641410292.393609, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n event_id, source_relation\n from `dbt-package-testing`.`dbt_transformations`.`stg_klaviyo__event`\n group by event_id, source_relation\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_klaviyo__event"}, "test.klaviyo_source.not_null_stg_klaviyo__flow_flow_id.a00a897e42": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "flow_id", "model": "{{ get_where_subquery(ref('stg_klaviyo__flow')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.klaviyo_source.stg_klaviyo__flow"]}, "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": "dbt_jamie_dbt_test__audit", "fqn": ["klaviyo_source", "not_null_stg_klaviyo__flow_flow_id"], "unique_id": "test.klaviyo_source.not_null_stg_klaviyo__flow_flow_id.a00a897e42", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/klaviyo_source", "path": "not_null_stg_klaviyo__flow_flow_id.sql", "original_file_path": "models/stg_klaviyo.yml", "name": "not_null_stg_klaviyo__flow_flow_id", "alias": "not_null_stg_klaviyo__flow_flow_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_klaviyo__flow"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo.yml/not_null_stg_klaviyo__flow_flow_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1641410292.3991559, "compiled_sql": "\n \n \n\nselect *\nfrom `dbt-package-testing`.`dbt_transformations`.`stg_klaviyo__flow`\nwhere flow_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "flow_id", "file_key_name": "models.stg_klaviyo__flow"}, "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__flow_flow_id__source_relation.015215d481": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_007bf18d3b6d4b25aebcc986dc772270\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["flow_id", "source_relation"], "model": "{{ get_where_subquery(ref('stg_klaviyo__flow')) }}"}, "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.klaviyo_source.stg_klaviyo__flow"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_007bf18d3b6d4b25aebcc986dc772270", "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": "dbt_jamie_dbt_test__audit", "fqn": ["klaviyo_source", "dbt_utils_unique_combination_of_columns_stg_klaviyo__flow_flow_id__source_relation"], "unique_id": "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__flow_flow_id__source_relation.015215d481", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/klaviyo_source", "path": "dbt_utils_unique_combination_o_007bf18d3b6d4b25aebcc986dc772270.sql", "original_file_path": "models/stg_klaviyo.yml", "name": "dbt_utils_unique_combination_of_columns_stg_klaviyo__flow_flow_id__source_relation", "alias": "dbt_utils_unique_combination_o_007bf18d3b6d4b25aebcc986dc772270", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_klaviyo__flow"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo.yml/dbt_utils_unique_combination_o_007bf18d3b6d4b25aebcc986dc772270.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_007bf18d3b6d4b25aebcc986dc772270"}, "created_at": 1641410292.4014359, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n flow_id, source_relation\n from `dbt-package-testing`.`dbt_transformations`.`stg_klaviyo__flow`\n group by flow_id, source_relation\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_klaviyo__flow"}, "test.klaviyo_source.not_null_stg_klaviyo__integration_integration_id.fe572c5f1b": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "integration_id", "model": "{{ get_where_subquery(ref('stg_klaviyo__integration')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.klaviyo_source.stg_klaviyo__integration"]}, "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": "dbt_jamie_dbt_test__audit", "fqn": ["klaviyo_source", "not_null_stg_klaviyo__integration_integration_id"], "unique_id": "test.klaviyo_source.not_null_stg_klaviyo__integration_integration_id.fe572c5f1b", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/klaviyo_source", "path": "not_null_stg_klaviyo__integration_integration_id.sql", "original_file_path": "models/stg_klaviyo.yml", "name": "not_null_stg_klaviyo__integration_integration_id", "alias": "not_null_stg_klaviyo__integration_integration_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_klaviyo__integration"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo.yml/not_null_stg_klaviyo__integration_integration_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1641410292.4073129, "compiled_sql": "\n \n \n\nselect *\nfrom `dbt-package-testing`.`dbt_transformations`.`stg_klaviyo__integration`\nwhere integration_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "integration_id", "file_key_name": "models.stg_klaviyo__integration"}, "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__integration_integration_id__source_relation.be6158ad21": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_a7f288c54a3281da69034a0f95230596\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["integration_id", "source_relation"], "model": "{{ get_where_subquery(ref('stg_klaviyo__integration')) }}"}, "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.klaviyo_source.stg_klaviyo__integration"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_a7f288c54a3281da69034a0f95230596", "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": "dbt_jamie_dbt_test__audit", "fqn": ["klaviyo_source", "dbt_utils_unique_combination_of_columns_stg_klaviyo__integration_integration_id__source_relation"], "unique_id": "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__integration_integration_id__source_relation.be6158ad21", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/klaviyo_source", "path": "dbt_utils_unique_combination_o_a7f288c54a3281da69034a0f95230596.sql", "original_file_path": "models/stg_klaviyo.yml", "name": "dbt_utils_unique_combination_of_columns_stg_klaviyo__integration_integration_id__source_relation", "alias": "dbt_utils_unique_combination_o_a7f288c54a3281da69034a0f95230596", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_klaviyo__integration"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo.yml/dbt_utils_unique_combination_o_a7f288c54a3281da69034a0f95230596.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_a7f288c54a3281da69034a0f95230596"}, "created_at": 1641410292.4095051, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n integration_id, source_relation\n from `dbt-package-testing`.`dbt_transformations`.`stg_klaviyo__integration`\n group by integration_id, source_relation\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_klaviyo__integration"}, "test.klaviyo_source.not_null_stg_klaviyo__person_person_id.bd77ffc8aa": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "person_id", "model": "{{ get_where_subquery(ref('stg_klaviyo__person')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.klaviyo_source.stg_klaviyo__person"]}, "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": "dbt_jamie_dbt_test__audit", "fqn": ["klaviyo_source", "not_null_stg_klaviyo__person_person_id"], "unique_id": "test.klaviyo_source.not_null_stg_klaviyo__person_person_id.bd77ffc8aa", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/klaviyo_source", "path": "not_null_stg_klaviyo__person_person_id.sql", "original_file_path": "models/stg_klaviyo.yml", "name": "not_null_stg_klaviyo__person_person_id", "alias": "not_null_stg_klaviyo__person_person_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_klaviyo__person"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo.yml/not_null_stg_klaviyo__person_person_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1641410292.4151108, "compiled_sql": "\n \n \n\nselect *\nfrom `dbt-package-testing`.`dbt_transformations`.`stg_klaviyo__person`\nwhere person_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "person_id", "file_key_name": "models.stg_klaviyo__person"}, "test.klaviyo_source.unique_stg_klaviyo__person_email.dc3a98b014": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}{{ config(severity=\"warn\") }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "email", "model": "{{ get_where_subquery(ref('stg_klaviyo__person')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.klaviyo_source.stg_klaviyo__person"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "WARN", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "dbt_jamie_dbt_test__audit", "fqn": ["klaviyo_source", "unique_stg_klaviyo__person_email"], "unique_id": "test.klaviyo_source.unique_stg_klaviyo__person_email.dc3a98b014", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/klaviyo_source", "path": "unique_stg_klaviyo__person_email.sql", "original_file_path": "models/stg_klaviyo.yml", "name": "unique_stg_klaviyo__person_email", "alias": "unique_stg_klaviyo__person_email", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_klaviyo__person"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo.yml/unique_stg_klaviyo__person_email.sql", "build_path": null, "deferred": false, "unrendered_config": {"severity": "WARN"}, "created_at": 1641410292.41739, "compiled_sql": "\n \n \n\nwith dbt_test__target as (\n \n select email as unique_field\n from `dbt-package-testing`.`dbt_transformations`.`stg_klaviyo__person`\n where email 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\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "email", "file_key_name": "models.stg_klaviyo__person"}, "test.klaviyo_source.not_null_stg_klaviyo__person_email.c7094cfe27": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "email", "model": "{{ get_where_subquery(ref('stg_klaviyo__person')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.klaviyo_source.stg_klaviyo__person"]}, "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": "dbt_jamie_dbt_test__audit", "fqn": ["klaviyo_source", "not_null_stg_klaviyo__person_email"], "unique_id": "test.klaviyo_source.not_null_stg_klaviyo__person_email.c7094cfe27", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/klaviyo_source", "path": "not_null_stg_klaviyo__person_email.sql", "original_file_path": "models/stg_klaviyo.yml", "name": "not_null_stg_klaviyo__person_email", "alias": "not_null_stg_klaviyo__person_email", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_klaviyo__person"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo.yml/not_null_stg_klaviyo__person_email.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1641410292.419326, "compiled_sql": "\n \n \n\nselect *\nfrom `dbt-package-testing`.`dbt_transformations`.`stg_klaviyo__person`\nwhere email is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "email", "file_key_name": "models.stg_klaviyo__person"}, "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__person_person_id__source_relation.33a4f9ca24": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_df656836e047bb69a86997735efb3161\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["person_id", "source_relation"], "model": "{{ get_where_subquery(ref('stg_klaviyo__person')) }}"}, "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.klaviyo_source.stg_klaviyo__person"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_df656836e047bb69a86997735efb3161", "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": "dbt_jamie_dbt_test__audit", "fqn": ["klaviyo_source", "dbt_utils_unique_combination_of_columns_stg_klaviyo__person_person_id__source_relation"], "unique_id": "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__person_person_id__source_relation.33a4f9ca24", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/klaviyo_source", "path": "dbt_utils_unique_combination_o_df656836e047bb69a86997735efb3161.sql", "original_file_path": "models/stg_klaviyo.yml", "name": "dbt_utils_unique_combination_of_columns_stg_klaviyo__person_person_id__source_relation", "alias": "dbt_utils_unique_combination_o_df656836e047bb69a86997735efb3161", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_klaviyo__person"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo.yml/dbt_utils_unique_combination_o_df656836e047bb69a86997735efb3161.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_df656836e047bb69a86997735efb3161"}, "created_at": 1641410292.4212868, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n person_id, source_relation\n from `dbt-package-testing`.`dbt_transformations`.`stg_klaviyo__person`\n group by person_id, source_relation\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_klaviyo__person"}, "test.klaviyo_source.not_null_stg_klaviyo__metric_metric_id.4759d62078": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "metric_id", "model": "{{ get_where_subquery(ref('stg_klaviyo__metric')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.klaviyo_source.stg_klaviyo__metric"]}, "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": "dbt_jamie_dbt_test__audit", "fqn": ["klaviyo_source", "not_null_stg_klaviyo__metric_metric_id"], "unique_id": "test.klaviyo_source.not_null_stg_klaviyo__metric_metric_id.4759d62078", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/klaviyo_source", "path": "not_null_stg_klaviyo__metric_metric_id.sql", "original_file_path": "models/stg_klaviyo.yml", "name": "not_null_stg_klaviyo__metric_metric_id", "alias": "not_null_stg_klaviyo__metric_metric_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_klaviyo__metric"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo.yml/not_null_stg_klaviyo__metric_metric_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1641410292.426809, "compiled_sql": "\n \n \n\nselect *\nfrom `dbt-package-testing`.`dbt_transformations`.`stg_klaviyo__metric`\nwhere metric_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "metric_id", "file_key_name": "models.stg_klaviyo__metric"}, "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__metric_metric_id__source_relation.e9f33c04e5": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_45cba7e3442f1bc3264a04c52efb4d58\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["metric_id", "source_relation"], "model": "{{ get_where_subquery(ref('stg_klaviyo__metric')) }}"}, "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.klaviyo_source.stg_klaviyo__metric"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_45cba7e3442f1bc3264a04c52efb4d58", "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": "dbt_jamie_dbt_test__audit", "fqn": ["klaviyo_source", "dbt_utils_unique_combination_of_columns_stg_klaviyo__metric_metric_id__source_relation"], "unique_id": "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__metric_metric_id__source_relation.e9f33c04e5", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/klaviyo_source", "path": "dbt_utils_unique_combination_o_45cba7e3442f1bc3264a04c52efb4d58.sql", "original_file_path": "models/stg_klaviyo.yml", "name": "dbt_utils_unique_combination_of_columns_stg_klaviyo__metric_metric_id__source_relation", "alias": "dbt_utils_unique_combination_o_45cba7e3442f1bc3264a04c52efb4d58", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_klaviyo__metric"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo.yml/dbt_utils_unique_combination_o_45cba7e3442f1bc3264a04c52efb4d58.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_45cba7e3442f1bc3264a04c52efb4d58"}, "created_at": 1641410292.428729, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n metric_id, source_relation\n from `dbt-package-testing`.`dbt_transformations`.`stg_klaviyo__metric`\n group by metric_id, source_relation\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_klaviyo__metric"}, "test.klaviyo.not_null_klaviyo__events_event_id.eada7340ba": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('klaviyo__events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.klaviyo.klaviyo__events"]}, "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": "dbt_jamie_dbt_test__audit", "fqn": ["klaviyo", "not_null_klaviyo__events_event_id"], "unique_id": "test.klaviyo.not_null_klaviyo__events_event_id.eada7340ba", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/klaviyo", "path": "not_null_klaviyo__events_event_id.sql", "original_file_path": "models/klaviyo.yml", "name": "not_null_klaviyo__events_event_id", "alias": "not_null_klaviyo__events_event_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["klaviyo__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo/models/klaviyo.yml/not_null_klaviyo__events_event_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1641410292.510831, "compiled_sql": "\n \n \n\nselect *\nfrom `dbt-package-testing`.`dbt_transformations`.`klaviyo__events`\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_id", "file_key_name": "models.klaviyo__events"}, "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__events_event_id__source_relation.847dad4174": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_8b483e4115ab91fbb579be0d68288d98\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["event_id", "source_relation"], "model": "{{ get_where_subquery(ref('klaviyo__events')) }}"}, "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.klaviyo.klaviyo__events"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_8b483e4115ab91fbb579be0d68288d98", "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": "dbt_jamie_dbt_test__audit", "fqn": ["klaviyo", "dbt_utils_unique_combination_of_columns_klaviyo__events_event_id__source_relation"], "unique_id": "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__events_event_id__source_relation.847dad4174", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/klaviyo", "path": "dbt_utils_unique_combination_o_8b483e4115ab91fbb579be0d68288d98.sql", "original_file_path": "models/klaviyo.yml", "name": "dbt_utils_unique_combination_of_columns_klaviyo__events_event_id__source_relation", "alias": "dbt_utils_unique_combination_o_8b483e4115ab91fbb579be0d68288d98", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["klaviyo__events"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo/models/klaviyo.yml/dbt_utils_unique_combination_o_8b483e4115ab91fbb579be0d68288d98.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_8b483e4115ab91fbb579be0d68288d98"}, "created_at": 1641410292.51344, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n event_id, source_relation\n from `dbt-package-testing`.`dbt_transformations`.`klaviyo__events`\n group by event_id, source_relation\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.klaviyo__events"}, "test.klaviyo.not_null_klaviyo__person_campaign_flow_person_id.e27d13b0f2": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "person_id", "model": "{{ get_where_subquery(ref('klaviyo__person_campaign_flow')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.klaviyo.klaviyo__person_campaign_flow"]}, "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": "dbt_jamie_dbt_test__audit", "fqn": ["klaviyo", "not_null_klaviyo__person_campaign_flow_person_id"], "unique_id": "test.klaviyo.not_null_klaviyo__person_campaign_flow_person_id.e27d13b0f2", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/klaviyo", "path": "not_null_klaviyo__person_campaign_flow_person_id.sql", "original_file_path": "models/klaviyo.yml", "name": "not_null_klaviyo__person_campaign_flow_person_id", "alias": "not_null_klaviyo__person_campaign_flow_person_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["klaviyo__person_campaign_flow"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo/models/klaviyo.yml/not_null_klaviyo__person_campaign_flow_person_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1641410292.519572, "compiled_sql": "\n \n \n\nselect *\nfrom `dbt-package-testing`.`dbt_transformations`.`klaviyo__person_campaign_flow`\nwhere person_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "person_id", "file_key_name": "models.klaviyo__person_campaign_flow"}, "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__person_campaign_flow_person_id__last_touch_campaign_id__last_touch_flow_id__variation_id__source_relation.30e1824079": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_b833c7b8de2dbcac0bfcd913f29d49fd\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["person_id", "last_touch_campaign_id", "last_touch_flow_id", "variation_id", "source_relation"], "model": "{{ get_where_subquery(ref('klaviyo__person_campaign_flow')) }}"}, "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.klaviyo.klaviyo__person_campaign_flow"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_b833c7b8de2dbcac0bfcd913f29d49fd", "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": "dbt_jamie_dbt_test__audit", "fqn": ["klaviyo", "dbt_utils_unique_combination_of_columns_klaviyo__person_campaign_flow_person_id__last_touch_campaign_id__last_touch_flow_id__variation_id__source_relation"], "unique_id": "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__person_campaign_flow_person_id__last_touch_campaign_id__last_touch_flow_id__variation_id__source_relation.30e1824079", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/klaviyo", "path": "dbt_utils_unique_combination_o_b833c7b8de2dbcac0bfcd913f29d49fd.sql", "original_file_path": "models/klaviyo.yml", "name": "dbt_utils_unique_combination_of_columns_klaviyo__person_campaign_flow_person_id__last_touch_campaign_id__last_touch_flow_id__variation_id__source_relation", "alias": "dbt_utils_unique_combination_o_b833c7b8de2dbcac0bfcd913f29d49fd", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["klaviyo__person_campaign_flow"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo/models/klaviyo.yml/dbt_utils_unique_combination_o_b833c7b8de2dbcac0bfcd913f29d49fd.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_b833c7b8de2dbcac0bfcd913f29d49fd"}, "created_at": 1641410292.522443, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n person_id, last_touch_campaign_id, last_touch_flow_id, variation_id, source_relation\n from `dbt-package-testing`.`dbt_transformations`.`klaviyo__person_campaign_flow`\n group by person_id, last_touch_campaign_id, last_touch_flow_id, variation_id, source_relation\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.klaviyo__person_campaign_flow"}, "test.klaviyo.not_null_klaviyo__campaigns_campaign_variation_key.c4588cdadc": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_variation_key", "model": "{{ get_where_subquery(ref('klaviyo__campaigns')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.klaviyo.klaviyo__campaigns"]}, "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": "dbt_jamie_dbt_test__audit", "fqn": ["klaviyo", "not_null_klaviyo__campaigns_campaign_variation_key"], "unique_id": "test.klaviyo.not_null_klaviyo__campaigns_campaign_variation_key.c4588cdadc", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/klaviyo", "path": "not_null_klaviyo__campaigns_campaign_variation_key.sql", "original_file_path": "models/klaviyo.yml", "name": "not_null_klaviyo__campaigns_campaign_variation_key", "alias": "not_null_klaviyo__campaigns_campaign_variation_key", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["klaviyo__campaigns"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo/models/klaviyo.yml/not_null_klaviyo__campaigns_campaign_variation_key.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1641410292.529543, "compiled_sql": "\n \n \n\nselect *\nfrom `dbt-package-testing`.`dbt_transformations`.`klaviyo__campaigns`\nwhere campaign_variation_key is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "campaign_variation_key", "file_key_name": "models.klaviyo__campaigns"}, "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__campaigns_campaign_variation_key__source_relation.e5d14aee28": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_8c02a0c80dd7e19571d353539126fd64\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["campaign_variation_key", "source_relation"], "model": "{{ get_where_subquery(ref('klaviyo__campaigns')) }}"}, "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.klaviyo.klaviyo__campaigns"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_8c02a0c80dd7e19571d353539126fd64", "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": "dbt_jamie_dbt_test__audit", "fqn": ["klaviyo", "dbt_utils_unique_combination_of_columns_klaviyo__campaigns_campaign_variation_key__source_relation"], "unique_id": "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__campaigns_campaign_variation_key__source_relation.e5d14aee28", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/klaviyo", "path": "dbt_utils_unique_combination_o_8c02a0c80dd7e19571d353539126fd64.sql", "original_file_path": "models/klaviyo.yml", "name": "dbt_utils_unique_combination_of_columns_klaviyo__campaigns_campaign_variation_key__source_relation", "alias": "dbt_utils_unique_combination_o_8c02a0c80dd7e19571d353539126fd64", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["klaviyo__campaigns"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo/models/klaviyo.yml/dbt_utils_unique_combination_o_8c02a0c80dd7e19571d353539126fd64.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_8c02a0c80dd7e19571d353539126fd64"}, "created_at": 1641410292.53159, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n campaign_variation_key, source_relation\n from `dbt-package-testing`.`dbt_transformations`.`klaviyo__campaigns`\n group by campaign_variation_key, source_relation\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.klaviyo__campaigns"}, "test.klaviyo.not_null_klaviyo__flows_flow_variation_key.152c0d960b": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "flow_variation_key", "model": "{{ get_where_subquery(ref('klaviyo__flows')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.klaviyo.klaviyo__flows"]}, "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": "dbt_jamie_dbt_test__audit", "fqn": ["klaviyo", "not_null_klaviyo__flows_flow_variation_key"], "unique_id": "test.klaviyo.not_null_klaviyo__flows_flow_variation_key.152c0d960b", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/klaviyo", "path": "not_null_klaviyo__flows_flow_variation_key.sql", "original_file_path": "models/klaviyo.yml", "name": "not_null_klaviyo__flows_flow_variation_key", "alias": "not_null_klaviyo__flows_flow_variation_key", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["klaviyo__flows"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo/models/klaviyo.yml/not_null_klaviyo__flows_flow_variation_key.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1641410292.537004, "compiled_sql": "\n \n \n\nselect *\nfrom `dbt-package-testing`.`dbt_transformations`.`klaviyo__flows`\nwhere flow_variation_key is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "flow_variation_key", "file_key_name": "models.klaviyo__flows"}, "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__flows_flow_variation_key__source_relation.925d4118dc": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_699ce797a4af34c0906f1e96e7e5186e\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["flow_variation_key", "source_relation"], "model": "{{ get_where_subquery(ref('klaviyo__flows')) }}"}, "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.klaviyo.klaviyo__flows"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_699ce797a4af34c0906f1e96e7e5186e", "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": "dbt_jamie_dbt_test__audit", "fqn": ["klaviyo", "dbt_utils_unique_combination_of_columns_klaviyo__flows_flow_variation_key__source_relation"], "unique_id": "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__flows_flow_variation_key__source_relation.925d4118dc", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/klaviyo", "path": "dbt_utils_unique_combination_o_699ce797a4af34c0906f1e96e7e5186e.sql", "original_file_path": "models/klaviyo.yml", "name": "dbt_utils_unique_combination_of_columns_klaviyo__flows_flow_variation_key__source_relation", "alias": "dbt_utils_unique_combination_o_699ce797a4af34c0906f1e96e7e5186e", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["klaviyo__flows"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo/models/klaviyo.yml/dbt_utils_unique_combination_o_699ce797a4af34c0906f1e96e7e5186e.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_699ce797a4af34c0906f1e96e7e5186e"}, "created_at": 1641410292.538788, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n flow_variation_key, source_relation\n from `dbt-package-testing`.`dbt_transformations`.`klaviyo__flows`\n group by flow_variation_key, source_relation\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.klaviyo__flows"}, "test.klaviyo.not_null_klaviyo__persons_person_id.624a41e75a": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "person_id", "model": "{{ get_where_subquery(ref('klaviyo__persons')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.klaviyo.klaviyo__persons"]}, "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": "dbt_jamie_dbt_test__audit", "fqn": ["klaviyo", "not_null_klaviyo__persons_person_id"], "unique_id": "test.klaviyo.not_null_klaviyo__persons_person_id.624a41e75a", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/klaviyo", "path": "not_null_klaviyo__persons_person_id.sql", "original_file_path": "models/klaviyo.yml", "name": "not_null_klaviyo__persons_person_id", "alias": "not_null_klaviyo__persons_person_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["klaviyo__persons"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo/models/klaviyo.yml/not_null_klaviyo__persons_person_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1641410292.544352, "compiled_sql": "\n \n \n\nselect *\nfrom `dbt-package-testing`.`dbt_transformations`.`klaviyo__persons`\nwhere person_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "person_id", "file_key_name": "models.klaviyo__persons"}, "test.klaviyo.unique_klaviyo__persons_email.a330194dd6": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}{{ config(severity=\"warn\") }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "email", "model": "{{ get_where_subquery(ref('klaviyo__persons')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.klaviyo.klaviyo__persons"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "WARN", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "dbt_jamie_dbt_test__audit", "fqn": ["klaviyo", "unique_klaviyo__persons_email"], "unique_id": "test.klaviyo.unique_klaviyo__persons_email.a330194dd6", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/klaviyo", "path": "unique_klaviyo__persons_email.sql", "original_file_path": "models/klaviyo.yml", "name": "unique_klaviyo__persons_email", "alias": "unique_klaviyo__persons_email", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["klaviyo__persons"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo/models/klaviyo.yml/unique_klaviyo__persons_email.sql", "build_path": null, "deferred": false, "unrendered_config": {"severity": "WARN"}, "created_at": 1641410292.58467, "compiled_sql": "\n \n \n\nwith dbt_test__target as (\n \n select email as unique_field\n from `dbt-package-testing`.`dbt_transformations`.`klaviyo__persons`\n where email 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\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "email", "file_key_name": "models.klaviyo__persons"}, "test.klaviyo.not_null_klaviyo__persons_email.072e38d07d": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "email", "model": "{{ get_where_subquery(ref('klaviyo__persons')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.klaviyo.klaviyo__persons"]}, "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": "dbt_jamie_dbt_test__audit", "fqn": ["klaviyo", "not_null_klaviyo__persons_email"], "unique_id": "test.klaviyo.not_null_klaviyo__persons_email.072e38d07d", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/klaviyo", "path": "not_null_klaviyo__persons_email.sql", "original_file_path": "models/klaviyo.yml", "name": "not_null_klaviyo__persons_email", "alias": "not_null_klaviyo__persons_email", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["klaviyo__persons"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo/models/klaviyo.yml/not_null_klaviyo__persons_email.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1641410292.587538, "compiled_sql": "\n \n \n\nselect *\nfrom `dbt-package-testing`.`dbt_transformations`.`klaviyo__persons`\nwhere email is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "email", "file_key_name": "models.klaviyo__persons"}, "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__persons_person_id__source_relation.b223d703b3": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_f8f3a9d3aa76b62bb804805c73d99329\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["person_id", "source_relation"], "model": "{{ get_where_subquery(ref('klaviyo__persons')) }}"}, "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.klaviyo.klaviyo__persons"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_f8f3a9d3aa76b62bb804805c73d99329", "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": "dbt_jamie_dbt_test__audit", "fqn": ["klaviyo", "dbt_utils_unique_combination_of_columns_klaviyo__persons_person_id__source_relation"], "unique_id": "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__persons_person_id__source_relation.b223d703b3", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/klaviyo", "path": "dbt_utils_unique_combination_o_f8f3a9d3aa76b62bb804805c73d99329.sql", "original_file_path": "models/klaviyo.yml", "name": "dbt_utils_unique_combination_of_columns_klaviyo__persons_person_id__source_relation", "alias": "dbt_utils_unique_combination_o_f8f3a9d3aa76b62bb804805c73d99329", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["klaviyo__persons"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo/models/klaviyo.yml/dbt_utils_unique_combination_o_f8f3a9d3aa76b62bb804805c73d99329.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_f8f3a9d3aa76b62bb804805c73d99329"}, "created_at": 1641410292.590548, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n person_id, source_relation\n from `dbt-package-testing`.`dbt_transformations`.`klaviyo__persons`\n group by person_id, source_relation\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.klaviyo__persons"}, "test.klaviyo.not_null_int_klaviyo__event_attribution_event_id.8d186152c4": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('int_klaviyo__event_attribution')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.klaviyo.int_klaviyo__event_attribution"]}, "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": "dbt_jamie_dbt_test__audit", "fqn": ["klaviyo", "intermediate", "not_null_int_klaviyo__event_attribution_event_id"], "unique_id": "test.klaviyo.not_null_int_klaviyo__event_attribution_event_id.8d186152c4", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/klaviyo", "path": "not_null_int_klaviyo__event_attribution_event_id.sql", "original_file_path": "models/intermediate/int_klaviyo.yml", "name": "not_null_int_klaviyo__event_attribution_event_id", "alias": "not_null_int_klaviyo__event_attribution_event_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["int_klaviyo__event_attribution"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo/models/intermediate/int_klaviyo.yml/not_null_int_klaviyo__event_attribution_event_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1641410292.61676, "compiled_sql": "\n \n \n\nselect *\nfrom `dbt-package-testing`.`dbt_transformations`.`int_klaviyo__event_attribution`\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_id", "file_key_name": "models.int_klaviyo__event_attribution"}, "test.klaviyo.dbt_utils_unique_combination_of_columns_int_klaviyo__event_attribution_event_id__source_relation.654b98ad2c": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_a0147e1bc143333a515d11c7f665da10\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["event_id", "source_relation"], "model": "{{ get_where_subquery(ref('int_klaviyo__event_attribution')) }}"}, "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.klaviyo.int_klaviyo__event_attribution"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_a0147e1bc143333a515d11c7f665da10", "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": "dbt_jamie_dbt_test__audit", "fqn": ["klaviyo", "intermediate", "dbt_utils_unique_combination_of_columns_int_klaviyo__event_attribution_event_id__source_relation"], "unique_id": "test.klaviyo.dbt_utils_unique_combination_of_columns_int_klaviyo__event_attribution_event_id__source_relation.654b98ad2c", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/klaviyo", "path": "dbt_utils_unique_combination_o_a0147e1bc143333a515d11c7f665da10.sql", "original_file_path": "models/intermediate/int_klaviyo.yml", "name": "dbt_utils_unique_combination_of_columns_int_klaviyo__event_attribution_event_id__source_relation", "alias": "dbt_utils_unique_combination_o_a0147e1bc143333a515d11c7f665da10", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["int_klaviyo__event_attribution"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo/models/intermediate/int_klaviyo.yml/dbt_utils_unique_combination_o_a0147e1bc143333a515d11c7f665da10.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_a0147e1bc143333a515d11c7f665da10"}, "created_at": 1641410292.6188989, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n event_id, source_relation\n from `dbt-package-testing`.`dbt_transformations`.`int_klaviyo__event_attribution`\n group by event_id, source_relation\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.int_klaviyo__event_attribution"}, "test.klaviyo.dbt_utils_unique_combination_of_columns_int_klaviyo__campaign_flow_metrics_variation_id__source_relation__last_touch_campaign_id__last_touch_flow_id.3ea05faa81": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_e4603c9c1d4c74e9c4571eb9a11c5a61\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["variation_id", "source_relation", "last_touch_campaign_id", "last_touch_flow_id"], "model": "{{ get_where_subquery(ref('int_klaviyo__campaign_flow_metrics')) }}"}, "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.klaviyo.int_klaviyo__campaign_flow_metrics"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_e4603c9c1d4c74e9c4571eb9a11c5a61", "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": "dbt_jamie_dbt_test__audit", "fqn": ["klaviyo", "intermediate", "dbt_utils_unique_combination_of_columns_int_klaviyo__campaign_flow_metrics_variation_id__source_relation__last_touch_campaign_id__last_touch_flow_id"], "unique_id": "test.klaviyo.dbt_utils_unique_combination_of_columns_int_klaviyo__campaign_flow_metrics_variation_id__source_relation__last_touch_campaign_id__last_touch_flow_id.3ea05faa81", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/klaviyo", "path": "dbt_utils_unique_combination_o_e4603c9c1d4c74e9c4571eb9a11c5a61.sql", "original_file_path": "models/intermediate/int_klaviyo.yml", "name": "dbt_utils_unique_combination_of_columns_int_klaviyo__campaign_flow_metrics_variation_id__source_relation__last_touch_campaign_id__last_touch_flow_id", "alias": "dbt_utils_unique_combination_o_e4603c9c1d4c74e9c4571eb9a11c5a61", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["int_klaviyo__campaign_flow_metrics"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo/models/intermediate/int_klaviyo.yml/dbt_utils_unique_combination_o_e4603c9c1d4c74e9c4571eb9a11c5a61.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_e4603c9c1d4c74e9c4571eb9a11c5a61"}, "created_at": 1641410292.624806, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n variation_id, source_relation, last_touch_campaign_id, last_touch_flow_id\n from `dbt-package-testing`.`dbt_transformations`.`int_klaviyo__campaign_flow_metrics`\n group by variation_id, source_relation, last_touch_campaign_id, last_touch_flow_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.int_klaviyo__campaign_flow_metrics"}, "test.klaviyo.not_null_int_klaviyo__person_metrics_person_id.2c0f4e5a67": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "person_id", "model": "{{ get_where_subquery(ref('int_klaviyo__person_metrics')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.klaviyo.int_klaviyo__person_metrics"]}, "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": "dbt_jamie_dbt_test__audit", "fqn": ["klaviyo", "intermediate", "not_null_int_klaviyo__person_metrics_person_id"], "unique_id": "test.klaviyo.not_null_int_klaviyo__person_metrics_person_id.2c0f4e5a67", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/klaviyo", "path": "not_null_int_klaviyo__person_metrics_person_id.sql", "original_file_path": "models/intermediate/int_klaviyo.yml", "name": "not_null_int_klaviyo__person_metrics_person_id", "alias": "not_null_int_klaviyo__person_metrics_person_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["int_klaviyo__person_metrics"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo/models/intermediate/int_klaviyo.yml/not_null_int_klaviyo__person_metrics_person_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1641410292.6316218, "compiled_sql": "\n \n \n\nselect *\nfrom `dbt-package-testing`.`dbt_transformations`.`int_klaviyo__person_metrics`\nwhere person_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "person_id", "file_key_name": "models.int_klaviyo__person_metrics"}, "test.klaviyo.dbt_utils_unique_combination_of_columns_int_klaviyo__person_metrics_person_id__source_relation.4897d57f8b": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_44a55e0600e791676842b0edee32af5c\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["person_id", "source_relation"], "model": "{{ get_where_subquery(ref('int_klaviyo__person_metrics')) }}"}, "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.klaviyo.int_klaviyo__person_metrics"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_44a55e0600e791676842b0edee32af5c", "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": "dbt_jamie_dbt_test__audit", "fqn": ["klaviyo", "intermediate", "dbt_utils_unique_combination_of_columns_int_klaviyo__person_metrics_person_id__source_relation"], "unique_id": "test.klaviyo.dbt_utils_unique_combination_of_columns_int_klaviyo__person_metrics_person_id__source_relation.4897d57f8b", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/klaviyo", "path": "dbt_utils_unique_combination_o_44a55e0600e791676842b0edee32af5c.sql", "original_file_path": "models/intermediate/int_klaviyo.yml", "name": "dbt_utils_unique_combination_of_columns_int_klaviyo__person_metrics_person_id__source_relation", "alias": "dbt_utils_unique_combination_o_44a55e0600e791676842b0edee32af5c", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["int_klaviyo__person_metrics"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo/models/intermediate/int_klaviyo.yml/dbt_utils_unique_combination_o_44a55e0600e791676842b0edee32af5c.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_44a55e0600e791676842b0edee32af5c"}, "created_at": 1641410292.6341949, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n person_id, source_relation\n from `dbt-package-testing`.`dbt_transformations`.`int_klaviyo__person_metrics`\n group by person_id, source_relation\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.int_klaviyo__person_metrics"}, "test.shopify.unique_shopify__customer_cohorts_customer_cohort_id.c5e4855c7a": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "customer_cohort_id", "model": "{{ get_where_subquery(ref('shopify__customer_cohorts')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.shopify.shopify__customer_cohorts"]}, "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": "dbt_jamie_dbt_test__audit", "fqn": ["shopify", "unique_shopify__customer_cohorts_customer_cohort_id"], "unique_id": "test.shopify.unique_shopify__customer_cohorts_customer_cohort_id.c5e4855c7a", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify", "path": "unique_shopify__customer_cohorts_customer_cohort_id.sql", "original_file_path": "models/shopify.yml", "name": "unique_shopify__customer_cohorts_customer_cohort_id", "alias": "unique_shopify__customer_cohorts_customer_cohort_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["shopify__customer_cohorts"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify/models/shopify.yml/unique_shopify__customer_cohorts_customer_cohort_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1641410292.728425, "compiled_sql": "\n \n \n\nwith dbt_test__target as (\n \n select customer_cohort_id as unique_field\n from `dbt-package-testing`.`dbt_transformations`.`shopify__customer_cohorts`\n where customer_cohort_id 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\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "customer_cohort_id", "file_key_name": "models.shopify__customer_cohorts"}, "test.shopify.not_null_shopify__customer_cohorts_customer_cohort_id.88e9c30925": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "customer_cohort_id", "model": "{{ get_where_subquery(ref('shopify__customer_cohorts')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.shopify.shopify__customer_cohorts"]}, "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": "dbt_jamie_dbt_test__audit", "fqn": ["shopify", "not_null_shopify__customer_cohorts_customer_cohort_id"], "unique_id": "test.shopify.not_null_shopify__customer_cohorts_customer_cohort_id.88e9c30925", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify", "path": "not_null_shopify__customer_cohorts_customer_cohort_id.sql", "original_file_path": "models/shopify.yml", "name": "not_null_shopify__customer_cohorts_customer_cohort_id", "alias": "not_null_shopify__customer_cohorts_customer_cohort_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["shopify__customer_cohorts"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify/models/shopify.yml/not_null_shopify__customer_cohorts_customer_cohort_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1641410292.7303848, "compiled_sql": "\n \n \n\nselect *\nfrom `dbt-package-testing`.`dbt_transformations`.`shopify__customer_cohorts`\nwhere customer_cohort_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "customer_cohort_id", "file_key_name": "models.shopify__customer_cohorts"}, "test.shopify.dbt_utils_unique_combination_of_columns_shopify__orders_order_id__source_relation.b2d1eaf63d": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_0e30d4742af59bda60aa3c3f634a72ce\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["order_id", "source_relation"], "model": "{{ get_where_subquery(ref('shopify__orders')) }}"}, "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.shopify.shopify__orders"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_0e30d4742af59bda60aa3c3f634a72ce", "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": "dbt_jamie_dbt_test__audit", "fqn": ["shopify", "dbt_utils_unique_combination_of_columns_shopify__orders_order_id__source_relation"], "unique_id": "test.shopify.dbt_utils_unique_combination_of_columns_shopify__orders_order_id__source_relation.b2d1eaf63d", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify", "path": "dbt_utils_unique_combination_o_0e30d4742af59bda60aa3c3f634a72ce.sql", "original_file_path": "models/shopify.yml", "name": "dbt_utils_unique_combination_of_columns_shopify__orders_order_id__source_relation", "alias": "dbt_utils_unique_combination_o_0e30d4742af59bda60aa3c3f634a72ce", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["shopify__orders"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify/models/shopify.yml/dbt_utils_unique_combination_o_0e30d4742af59bda60aa3c3f634a72ce.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_0e30d4742af59bda60aa3c3f634a72ce"}, "created_at": 1641410292.732438, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n order_id, source_relation\n from `dbt-package-testing`.`dbt_transformations`.`shopify__orders`\n group by order_id, source_relation\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.shopify__orders"}, "test.shopify.dbt_utils_unique_combination_of_columns_shopify__customers_customer_id__source_relation.88d3656469": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_93b849a7493f07ea332b58b74fbb6696\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["customer_id", "source_relation"], "model": "{{ get_where_subquery(ref('shopify__customers')) }}"}, "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.shopify.shopify__customers"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_93b849a7493f07ea332b58b74fbb6696", "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": "dbt_jamie_dbt_test__audit", "fqn": ["shopify", "dbt_utils_unique_combination_of_columns_shopify__customers_customer_id__source_relation"], "unique_id": "test.shopify.dbt_utils_unique_combination_of_columns_shopify__customers_customer_id__source_relation.88d3656469", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify", "path": "dbt_utils_unique_combination_o_93b849a7493f07ea332b58b74fbb6696.sql", "original_file_path": "models/shopify.yml", "name": "dbt_utils_unique_combination_of_columns_shopify__customers_customer_id__source_relation", "alias": "dbt_utils_unique_combination_o_93b849a7493f07ea332b58b74fbb6696", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["shopify__customers"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify/models/shopify.yml/dbt_utils_unique_combination_o_93b849a7493f07ea332b58b74fbb6696.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_93b849a7493f07ea332b58b74fbb6696"}, "created_at": 1641410292.738451, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n customer_id, source_relation\n from `dbt-package-testing`.`dbt_transformations`.`shopify__customers`\n group by customer_id, source_relation\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.shopify__customers"}, "test.shopify.dbt_utils_unique_combination_of_columns_shopify__products_product_id__source_relation.f00b2fb95a": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_64adf669e5f645d81dbdf6d5d3a930fa\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["product_id", "source_relation"], "model": "{{ get_where_subquery(ref('shopify__products')) }}"}, "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.shopify.shopify__products"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_64adf669e5f645d81dbdf6d5d3a930fa", "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": "dbt_jamie_dbt_test__audit", "fqn": ["shopify", "dbt_utils_unique_combination_of_columns_shopify__products_product_id__source_relation"], "unique_id": "test.shopify.dbt_utils_unique_combination_of_columns_shopify__products_product_id__source_relation.f00b2fb95a", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify", "path": "dbt_utils_unique_combination_o_64adf669e5f645d81dbdf6d5d3a930fa.sql", "original_file_path": "models/shopify.yml", "name": "dbt_utils_unique_combination_of_columns_shopify__products_product_id__source_relation", "alias": "dbt_utils_unique_combination_o_64adf669e5f645d81dbdf6d5d3a930fa", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["shopify__products"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify/models/shopify.yml/dbt_utils_unique_combination_o_64adf669e5f645d81dbdf6d5d3a930fa.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_64adf669e5f645d81dbdf6d5d3a930fa"}, "created_at": 1641410292.744459, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n product_id, source_relation\n from `dbt-package-testing`.`dbt_transformations`.`shopify__products`\n group by product_id, source_relation\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.shopify__products"}, "test.shopify.dbt_utils_unique_combination_of_columns_shopify__order_lines_order_line_id__source_relation.2483d5ef95": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_0bd7a3e6d2ce7dc1c5c09d9f9d5f6b40\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["order_line_id", "source_relation"], "model": "{{ get_where_subquery(ref('shopify__order_lines')) }}"}, "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.shopify.shopify__order_lines"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_0bd7a3e6d2ce7dc1c5c09d9f9d5f6b40", "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": "dbt_jamie_dbt_test__audit", "fqn": ["shopify", "dbt_utils_unique_combination_of_columns_shopify__order_lines_order_line_id__source_relation"], "unique_id": "test.shopify.dbt_utils_unique_combination_of_columns_shopify__order_lines_order_line_id__source_relation.2483d5ef95", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify", "path": "dbt_utils_unique_combination_o_0bd7a3e6d2ce7dc1c5c09d9f9d5f6b40.sql", "original_file_path": "models/shopify.yml", "name": "dbt_utils_unique_combination_of_columns_shopify__order_lines_order_line_id__source_relation", "alias": "dbt_utils_unique_combination_o_0bd7a3e6d2ce7dc1c5c09d9f9d5f6b40", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["shopify__order_lines"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify/models/shopify.yml/dbt_utils_unique_combination_o_0bd7a3e6d2ce7dc1c5c09d9f9d5f6b40.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_0bd7a3e6d2ce7dc1c5c09d9f9d5f6b40"}, "created_at": 1641410292.750259, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n order_line_id, source_relation\n from `dbt-package-testing`.`dbt_transformations`.`shopify__order_lines`\n group by order_line_id, source_relation\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.shopify__order_lines"}, "test.shopify.dbt_utils_unique_combination_of_columns_shopify__transactions_transaction_id__source_relation.7341b755c0": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_8e8f17b2e5241cc1e3a33f9fa479a3fb\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["transaction_id", "source_relation"], "model": "{{ get_where_subquery(ref('shopify__transactions')) }}"}, "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.shopify.shopify__transactions"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_8e8f17b2e5241cc1e3a33f9fa479a3fb", "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": "dbt_jamie_dbt_test__audit", "fqn": ["shopify", "dbt_utils_unique_combination_of_columns_shopify__transactions_transaction_id__source_relation"], "unique_id": "test.shopify.dbt_utils_unique_combination_of_columns_shopify__transactions_transaction_id__source_relation.7341b755c0", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify", "path": "dbt_utils_unique_combination_o_8e8f17b2e5241cc1e3a33f9fa479a3fb.sql", "original_file_path": "models/shopify.yml", "name": "dbt_utils_unique_combination_of_columns_shopify__transactions_transaction_id__source_relation", "alias": "dbt_utils_unique_combination_o_8e8f17b2e5241cc1e3a33f9fa479a3fb", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["shopify__transactions"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify/models/shopify.yml/dbt_utils_unique_combination_o_8e8f17b2e5241cc1e3a33f9fa479a3fb.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_8e8f17b2e5241cc1e3a33f9fa479a3fb"}, "created_at": 1641410292.7563179, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n transaction_id, source_relation\n from `dbt-package-testing`.`dbt_transformations`.`shopify__transactions`\n group by transaction_id, source_relation\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.shopify__transactions"}, "test.shopify.dbt_utils_unique_combination_of_columns_shopify__customers__order_aggregates_customer_id__source_relation.5a5e85c8a9": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_4d1af0d9338b2b5b246e23c580e294e3\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["customer_id", "source_relation"], "model": "{{ get_where_subquery(ref('shopify__customers__order_aggregates')) }}"}, "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.shopify.shopify__customers__order_aggregates"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_4d1af0d9338b2b5b246e23c580e294e3", "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": "dbt_jamie_dbt_test__audit", "fqn": ["shopify", "intermediate", "dbt_utils_unique_combination_of_columns_shopify__customers__order_aggregates_customer_id__source_relation"], "unique_id": "test.shopify.dbt_utils_unique_combination_of_columns_shopify__customers__order_aggregates_customer_id__source_relation.5a5e85c8a9", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify", "path": "dbt_utils_unique_combination_o_4d1af0d9338b2b5b246e23c580e294e3.sql", "original_file_path": "models/intermediate/intermediate.yml", "name": "dbt_utils_unique_combination_of_columns_shopify__customers__order_aggregates_customer_id__source_relation", "alias": "dbt_utils_unique_combination_o_4d1af0d9338b2b5b246e23c580e294e3", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["shopify__customers__order_aggregates"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify/models/intermediate/intermediate.yml/dbt_utils_unique_combination_o_4d1af0d9338b2b5b246e23c580e294e3.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_4d1af0d9338b2b5b246e23c580e294e3"}, "created_at": 1641410292.763608, "compiled_sql": "\n\n\n\n\n\nwith __dbt__cte__shopify__customers__order_aggregates as (\nwith orders as (\n\n select *\n from `dbt-package-testing`.`dbt_transformations`.`stg_shopify__order`\n\n), transactions as (\n\n select *\n from `dbt-package-testing`.`dbt_transformations`.`shopify__transactions`\n where lower(status) = 'success'\n\n), aggregated as (\n\n select\n orders.customer_id,\n orders.source_relation,\n min(orders.created_timestamp) as first_order_timestamp,\n max(orders.created_timestamp) as most_recent_order_timestamp,\n avg(case when lower(transactions.kind) in ('sale','capture') then transactions.currency_exchange_calculated_amount end) as average_order_value,\n sum(case when lower(transactions.kind) in ('sale','capture') then transactions.currency_exchange_calculated_amount end) as lifetime_total_spent,\n sum(case when lower(transactions.kind) in ('refund') then transactions.currency_exchange_calculated_amount end) as lifetime_total_refunded,\n count(distinct orders.order_id) as lifetime_count_orders\n from orders\n left join transactions\n using (order_id, source_relation)\n where customer_id is not null\n group by 1,2\n\n)\n\nselect *\nfrom aggregated\n),validation_errors as (\n\n select\n customer_id, source_relation\n from __dbt__cte__shopify__customers__order_aggregates\n group by customer_id, source_relation\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.shopify.shopify__customers__order_aggregates", "sql": " __dbt__cte__shopify__customers__order_aggregates as (\nwith orders as (\n\n select *\n from `dbt-package-testing`.`dbt_transformations`.`stg_shopify__order`\n\n), transactions as (\n\n select *\n from `dbt-package-testing`.`dbt_transformations`.`shopify__transactions`\n where lower(status) = 'success'\n\n), aggregated as (\n\n select\n orders.customer_id,\n orders.source_relation,\n min(orders.created_timestamp) as first_order_timestamp,\n max(orders.created_timestamp) as most_recent_order_timestamp,\n avg(case when lower(transactions.kind) in ('sale','capture') then transactions.currency_exchange_calculated_amount end) as average_order_value,\n sum(case when lower(transactions.kind) in ('sale','capture') then transactions.currency_exchange_calculated_amount end) as lifetime_total_spent,\n sum(case when lower(transactions.kind) in ('refund') then transactions.currency_exchange_calculated_amount end) as lifetime_total_refunded,\n count(distinct orders.order_id) as lifetime_count_orders\n from orders\n left join transactions\n using (order_id, source_relation)\n where customer_id is not null\n group by 1,2\n\n)\n\nselect *\nfrom aggregated\n)"}], "relation_name": null, "column_name": null, "file_key_name": "models.shopify__customers__order_aggregates"}, "test.shopify.dbt_utils_unique_combination_of_columns_shopify__orders__order_line_aggregates_order_id__source_relation.09d921d473": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_3ae1e43ee344b59ccef000bf524f1f04\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["order_id", "source_relation"], "model": "{{ get_where_subquery(ref('shopify__orders__order_line_aggregates')) }}"}, "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.shopify.shopify__orders__order_line_aggregates"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_3ae1e43ee344b59ccef000bf524f1f04", "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": "dbt_jamie_dbt_test__audit", "fqn": ["shopify", "intermediate", "dbt_utils_unique_combination_of_columns_shopify__orders__order_line_aggregates_order_id__source_relation"], "unique_id": "test.shopify.dbt_utils_unique_combination_of_columns_shopify__orders__order_line_aggregates_order_id__source_relation.09d921d473", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify", "path": "dbt_utils_unique_combination_o_3ae1e43ee344b59ccef000bf524f1f04.sql", "original_file_path": "models/intermediate/intermediate.yml", "name": "dbt_utils_unique_combination_of_columns_shopify__orders__order_line_aggregates_order_id__source_relation", "alias": "dbt_utils_unique_combination_o_3ae1e43ee344b59ccef000bf524f1f04", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["shopify__orders__order_line_aggregates"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify/models/intermediate/intermediate.yml/dbt_utils_unique_combination_o_3ae1e43ee344b59ccef000bf524f1f04.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_3ae1e43ee344b59ccef000bf524f1f04"}, "created_at": 1641410292.7692711, "compiled_sql": "\n\n\n\n\n\nwith __dbt__cte__shopify__orders__order_line_aggregates as (\nwith order_line as (\n\n select *\n from `dbt-package-testing`.`dbt_transformations`.`stg_shopify__order_line`\n\n), aggregated as (\n\n select \n order_id,\n source_relation,\n count(*) as line_item_count\n from order_line\n group by 1,2\n\n)\n\nselect *\nfrom aggregated\n),validation_errors as (\n\n select\n order_id, source_relation\n from __dbt__cte__shopify__orders__order_line_aggregates\n group by order_id, source_relation\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.shopify.shopify__orders__order_line_aggregates", "sql": " __dbt__cte__shopify__orders__order_line_aggregates as (\nwith order_line as (\n\n select *\n from `dbt-package-testing`.`dbt_transformations`.`stg_shopify__order_line`\n\n), aggregated as (\n\n select \n order_id,\n source_relation,\n count(*) as line_item_count\n from order_line\n group by 1,2\n\n)\n\nselect *\nfrom aggregated\n)"}], "relation_name": null, "column_name": null, "file_key_name": "models.shopify__orders__order_line_aggregates"}, "test.shopify_holistic_reporting.dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__customer_enhanced_email__klaviyo_source_relation__shopify_source_relation.2ea9394109": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_6d96dafa6cfb9bf7095ffd278a75adbc\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["email", "klaviyo_source_relation", "shopify_source_relation"], "model": "{{ get_where_subquery(ref('shopify_holistic_reporting__customer_enhanced')) }}"}, "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.shopify_holistic_reporting.shopify_holistic_reporting__customer_enhanced"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_6d96dafa6cfb9bf7095ffd278a75adbc", "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": "dbt_jamie_dbt_test__audit", "fqn": ["shopify_holistic_reporting", "dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__customer_enhanced_email__klaviyo_source_relation__shopify_source_relation"], "unique_id": "test.shopify_holistic_reporting.dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__customer_enhanced_email__klaviyo_source_relation__shopify_source_relation.2ea9394109", "package_name": "shopify_holistic_reporting", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify_holistic_reporting", "path": "dbt_utils_unique_combination_o_6d96dafa6cfb9bf7095ffd278a75adbc.sql", "original_file_path": "models/shopify_holistic_reporting.yml", "name": "dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__customer_enhanced_email__klaviyo_source_relation__shopify_source_relation", "alias": "dbt_utils_unique_combination_o_6d96dafa6cfb9bf7095ffd278a75adbc", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["shopify_holistic_reporting__customer_enhanced"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_holistic_reporting/models/shopify_holistic_reporting.yml/dbt_utils_unique_combination_o_6d96dafa6cfb9bf7095ffd278a75adbc.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_6d96dafa6cfb9bf7095ffd278a75adbc"}, "created_at": 1641410292.842269, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n email, klaviyo_source_relation, shopify_source_relation\n from `dbt-package-testing`.`dbt_transformations`.`shopify_holistic_reporting__customer_enhanced`\n group by email, klaviyo_source_relation, shopify_source_relation\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.shopify_holistic_reporting__customer_enhanced"}, "test.shopify_holistic_reporting.dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__daily_customer_metrics_date_day__email__klaviyo_source_relation__shopify_source_relation__campaign_id__flow_id__variation_id.0489c190fd": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_4b14da03db00d67d51bb9e9f7e8b766f\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["date_day", "email", "klaviyo_source_relation", "shopify_source_relation", "campaign_id", "flow_id", "variation_id"], "model": "{{ get_where_subquery(ref('shopify_holistic_reporting__daily_customer_metrics')) }}"}, "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.shopify_holistic_reporting.shopify_holistic_reporting__daily_customer_metrics"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_4b14da03db00d67d51bb9e9f7e8b766f", "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": "dbt_jamie_dbt_test__audit", "fqn": ["shopify_holistic_reporting", "dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__daily_customer_metrics_date_day__email__klaviyo_source_relation__shopify_source_relation__campaign_id__flow_id__variation_id"], "unique_id": "test.shopify_holistic_reporting.dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__daily_customer_metrics_date_day__email__klaviyo_source_relation__shopify_source_relation__campaign_id__flow_id__variation_id.0489c190fd", "package_name": "shopify_holistic_reporting", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify_holistic_reporting", "path": "dbt_utils_unique_combination_o_4b14da03db00d67d51bb9e9f7e8b766f.sql", "original_file_path": "models/shopify_holistic_reporting.yml", "name": "dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__daily_customer_metrics_date_day__email__klaviyo_source_relation__shopify_source_relation__campaign_id__flow_id__variation_id", "alias": "dbt_utils_unique_combination_o_4b14da03db00d67d51bb9e9f7e8b766f", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["shopify_holistic_reporting__daily_customer_metrics"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_holistic_reporting/models/shopify_holistic_reporting.yml/dbt_utils_unique_combination_o_4b14da03db00d67d51bb9e9f7e8b766f.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_4b14da03db00d67d51bb9e9f7e8b766f"}, "created_at": 1641410292.8479779, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n date_day, email, klaviyo_source_relation, shopify_source_relation, campaign_id, flow_id, variation_id\n from `dbt-package-testing`.`dbt_transformations`.`shopify_holistic_reporting__daily_customer_metrics`\n group by date_day, email, klaviyo_source_relation, shopify_source_relation, campaign_id, flow_id, variation_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.shopify_holistic_reporting__daily_customer_metrics"}, "test.shopify_holistic_reporting.dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__orders_attribution_order_id__shopify_source_relation.0eb46743bb": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_ed10bd87338124f135be382dd44f7c6a\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["order_id", "shopify_source_relation"], "model": "{{ get_where_subquery(ref('shopify_holistic_reporting__orders_attribution')) }}"}, "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.shopify_holistic_reporting.shopify_holistic_reporting__orders_attribution"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_ed10bd87338124f135be382dd44f7c6a", "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": "dbt_jamie_dbt_test__audit", "fqn": ["shopify_holistic_reporting", "dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__orders_attribution_order_id__shopify_source_relation"], "unique_id": "test.shopify_holistic_reporting.dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__orders_attribution_order_id__shopify_source_relation.0eb46743bb", "package_name": "shopify_holistic_reporting", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify_holistic_reporting", "path": "dbt_utils_unique_combination_o_ed10bd87338124f135be382dd44f7c6a.sql", "original_file_path": "models/shopify_holistic_reporting.yml", "name": "dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__orders_attribution_order_id__shopify_source_relation", "alias": "dbt_utils_unique_combination_o_ed10bd87338124f135be382dd44f7c6a", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["shopify_holistic_reporting__orders_attribution"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_holistic_reporting/models/shopify_holistic_reporting.yml/dbt_utils_unique_combination_o_ed10bd87338124f135be382dd44f7c6a.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_ed10bd87338124f135be382dd44f7c6a"}, "created_at": 1641410292.8550909, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n order_id, shopify_source_relation\n from `dbt-package-testing`.`dbt_transformations`.`shopify_holistic_reporting__orders_attribution`\n group by order_id, shopify_source_relation\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.shopify_holistic_reporting__orders_attribution"}}, "sources": {"source.shopify_source.shopify.order": {"fqn": ["shopify_source", "shopify", "order"], "database": "fivetran-db", "schema": "shopify", "unique_id": "source.shopify_source.shopify.order", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify_source", "path": "models/src_shopify.yml", "original_file_path": "models/src_shopify.yml", "name": "order", "source_name": "shopify", "source_description": "", "loader": "", "identifier": "order", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": true, "column": null}, "loaded_at_field": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents an order in Shopify.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "app_id": {"name": "app_id", "description": "The ID of the app that created the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_address_1": {"name": "billing_address_address_1", "description": "The street address of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_address_2": {"name": "billing_address_address_2", "description": "An optional additional field for the street address of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_city": {"name": "billing_address_city", "description": "The city, town, or village of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_company": {"name": "billing_address_company", "description": "The company of the person associated with the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_country": {"name": "billing_address_country", "description": "The name of the country of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_country_code": {"name": "billing_address_country_code", "description": "The two-letter code (ISO 3166-1 format) for the country of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_first_name": {"name": "billing_address_first_name", "description": "The first name of the person associated with the payment method.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_last_name": {"name": "billing_address_last_name", "description": "The last name of the person associated with the payment method.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_latitude": {"name": "billing_address_latitude", "description": "The latitude of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_longitude": {"name": "billing_address_longitude", "description": "The longitude of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_name": {"name": "billing_address_name", "description": "The full name of the person associated with the payment method.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_phone": {"name": "billing_address_phone", "description": "The phone number at the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_province": {"name": "billing_address_province", "description": "The name of the region (province, state, prefecture, \u2026) of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_province_code": {"name": "billing_address_province_code", "description": "The two-letter abbreviation of the region of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_zip": {"name": "billing_address_zip", "description": "The postal code (zip, postcode, Eircode, \u2026) of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "browser_ip": {"name": "browser_ip", "description": "The IP address of the browser used by the customer when they placed the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "buyer_accepts_marketing": {"name": "buyer_accepts_marketing", "description": "Whether the customer consented to receive email updates from the shop.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "cancel_reason": {"name": "cancel_reason", "description": "The reason why the order was canceled.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "cancelled_at": {"name": "cancelled_at", "description": "The date and time when the order was canceled.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "cart_token": {"name": "cart_token", "description": "The ID of the cart that's associated with the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "closed_at": {"name": "closed_at", "description": "The date and time when the order was closed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "The autogenerated date and time when the order was created in Shopify.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "The three-letter code for the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "customer_id": {"name": "customer_id", "description": "The ID of the order's customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email": {"name": "email", "description": "The customer's email address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "financial_status": {"name": "financial_status", "description": "The status of payments associated with the order. Can only be set when the order is created", "meta": {}, "data_type": null, "quote": null, "tags": []}, "fulfillment_status": {"name": "fulfillment_status", "description": "The order's status in terms of fulfilled line items.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "id": {"name": "id", "description": "The ID of the order, used for API purposes. This is different from the order_number property, which is the ID used by the shop owner and customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "landing_site_base_url": {"name": "landing_site_base_url", "description": "The URL for the page where the buyer landed when they entered the shop.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "location_id": {"name": "location_id", "description": "The ID of the physical location where the order was processed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "name": {"name": "name", "description": "The order name, generated by combining the order_number property with the order prefix and suffix that are set in the merchant's general settings.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "note": {"name": "note", "description": "An optional note that a shop owner can attach to the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "number": {"name": "number", "description": "The order's position in the shop's count of orders. Numbers are sequential and start at 1.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_number": {"name": "order_number", "description": "The order 's position in the shop's count of orders starting at 1001. Order numbers are sequential and start at 1001.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "processed_at": {"name": "processed_at", "description": "The date and time when an order was processed. This value is the date that appears on your orders and that's used in the analytic reports.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "processing_method": {"name": "processing_method", "description": "How the payment was processed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "referring_site": {"name": "referring_site", "description": "The website where the customer clicked a link to the shop.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_address_1": {"name": "shipping_address_address_1", "description": "The street address of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_address_2": {"name": "shipping_address_address_2", "description": "An optional additional field for the street address of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_city": {"name": "shipping_address_city", "description": "The city, town, or village of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_company": {"name": "shipping_address_company", "description": "The company of the person associated with the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_country": {"name": "shipping_address_country", "description": "The name of the country of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_country_code": {"name": "shipping_address_country_code", "description": "The two-letter code (ISO 3166-1 format) for the country of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_first_name": {"name": "shipping_address_first_name", "description": "The first name of the person associated with the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_last_name": {"name": "shipping_address_last_name", "description": "The last name of the person associated with the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_latitude": {"name": "shipping_address_latitude", "description": "The latitude of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_longitude": {"name": "shipping_address_longitude", "description": "The longitude of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_name": {"name": "shipping_address_name", "description": "The full name of the person associated with the payment method.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_phone": {"name": "shipping_address_phone", "description": "The phone number at the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_province": {"name": "shipping_address_province", "description": "The name of the region (province, state, prefecture, \u2026) of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_province_code": {"name": "shipping_address_province_code", "description": "The two-letter abbreviation of the region of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_zip": {"name": "shipping_address_zip", "description": "The postal code (zip, postcode, Eircode, \u2026) of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_name": {"name": "source_name", "description": "Where the order originated. Can be set only during order creation, and is not writeable afterwards.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "subtotal_price": {"name": "subtotal_price", "description": "The price of the order in the shop currency after discounts but before shipping, taxes, and tips.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taxes_included": {"name": "taxes_included", "description": "Whether taxes are included in the order subtotal.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "test": {"name": "test", "description": "Whether this is a test order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "token": {"name": "token", "description": "A unique token for the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_discounts": {"name": "total_discounts", "description": "The total discounts applied to the price of the order in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_line_items_price": {"name": "total_line_items_price", "description": "The sum of all line item prices in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_price": {"name": "total_price", "description": "The sum of all line item prices, discounts, shipping, taxes, and tips in the shop currency. Must be positive.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_tax": {"name": "total_tax", "description": "The sum of all the taxes applied to the order in th shop currency. Must be positive).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_weight": {"name": "total_weight", "description": "The sum of all line item weights in grams.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_at": {"name": "updated_at", "description": "The date and time (ISO 8601 format) when the order was last modified.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "user_id": {"name": "user_id", "description": "The ID of the user logged into Shopify POS who processed the order, if applicable.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`fivetran-db`.`shopify`.`order`", "created_at": 1641410292.8929799}, "source.shopify_source.shopify.customer": {"fqn": ["shopify_source", "shopify", "customer"], "database": "fivetran-db", "schema": "shopify", "unique_id": "source.shopify_source.shopify.customer", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify_source", "path": "models/src_shopify.yml", "original_file_path": "models/src_shopify.yml", "name": "customer", "source_name": "shopify", "source_description": "", "loader": "", "identifier": "customer", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a customer in Shopify.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "accepts_marketing": {"name": "accepts_marketing", "description": "Whether the customer has consented to receive marketing material via email.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "The date and time when the customer was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "default_address_id": {"name": "default_address_id", "description": "The default address for the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email": {"name": "email", "description": "The unique email address of the customer. Attempting to assign the same email address to multiple customers returns an error.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_name": {"name": "first_name", "description": "The customer's first name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "id": {"name": "id", "description": "A unique identifier for the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_name": {"name": "last_name", "description": "The customer's last name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "orders_count": {"name": "orders_count", "description": "The number of orders associated with this customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "phone": {"name": "phone", "description": "The unique phone number (E.164 format) for this customer. Attempting to assign the same phone number to multiple customers returns an error.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "state": {"name": "state", "description": "The state of the customer's account with a shop.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tax_exempt": {"name": "tax_exempt", "description": "Whether the customer is exempt from paying taxes on their order. If true, then taxes won't be applied to an order at checkout. If false, then taxes will be applied at checkout.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_spent": {"name": "total_spent", "description": "The total amount of money that the customer has spent across their order history.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_at": {"name": "updated_at", "description": "The date and time when the customer information was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "verified_email": {"name": "verified_email", "description": "Whether the customer has verified their email address.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`fivetran-db`.`shopify`.`customer`", "created_at": 1641410292.893197}, "source.shopify_source.shopify.order_line": {"fqn": ["shopify_source", "shopify", "order_line"], "database": "fivetran-db", "schema": "shopify", "unique_id": "source.shopify_source.shopify.order_line", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify_source", "path": "models/src_shopify.yml", "original_file_path": "models/src_shopify.yml", "name": "order_line", "source_name": "shopify", "source_description": "", "loader": "", "identifier": "order_line", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a line item for an order in Shopify.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "fulfillable_quantity": {"name": "fulfillable_quantity", "description": "The amount available to fulfill, calculated as follows: quantity - max(refunded_quantity, fulfilled_quantity) - pending_fulfilled_quantity - open_fulfilled_quantity", "meta": {}, "data_type": null, "quote": null, "tags": []}, "fulfillment_service": {"name": "fulfillment_service", "description": "The service provider that's fulfilling the item.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "fulfillment_status": {"name": "fulfillment_status", "description": "How far along an order is in terms line items fulfilled.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "gift_card": {"name": "gift_card", "description": "Whether the item is a gift card. If true, then the item is not taxed or considered for shipping charges.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "grams": {"name": "grams", "description": "The weight of the item in grams.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "id": {"name": "id", "description": "The ID of the line item.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "name": {"name": "name", "description": "The name of the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_id": {"name": "order_id", "description": "The ID of the related order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "price": {"name": "price", "description": "The price of the item before discounts have been applied in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "product_id": {"name": "product_id", "description": "The ID of the product that the line item belongs to. Can be null if the original product associated with the order is deleted at a later date.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "quantity": {"name": "quantity", "description": "The number of items that were purchased.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "requires_shipping": {"name": "requires_shipping", "description": "Whether the item requires shipping.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "sku": {"name": "sku", "description": "The item's SKU (stock keeping unit).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taxable": {"name": "taxable", "description": "Whether the item was taxable.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "title": {"name": "title", "description": "The title of the product.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_discount": {"name": "total_discount", "description": "The total amount of the discount allocated to the line item in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_id": {"name": "variant_id", "description": "The ID of the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "vendor": {"name": "vendor", "description": "The name of the item's supplier.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`fivetran-db`.`shopify`.`order_line`", "created_at": 1641410292.893585}, "source.shopify_source.shopify.order_line_refund": {"fqn": ["shopify_source", "shopify", "order_line_refund"], "database": "fivetran-db", "schema": "shopify", "unique_id": "source.shopify_source.shopify.order_line_refund", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify_source", "path": "models/src_shopify.yml", "original_file_path": "models/src_shopify.yml", "name": "order_line_refund", "source_name": "shopify", "source_description": "", "loader": "", "identifier": "order_line_refund", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a line item refund in Shopify.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "id": {"name": "id", "description": "The unique identifier of the line item in the refund.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "location_id": {"name": "location_id", "description": "TThe unique identifier of the location where the items will be restockedBD", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_line_id": {"name": "order_line_id", "description": "The ID of the related line item in the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "quantity": {"name": "quantity", "description": "The quantity of the associated line item that was returned.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refund_id": {"name": "refund_id", "description": "The ID of the related refund.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "restock_type": {"name": "restock_type", "description": "How this refund line item affects inventory levels.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "subtotal": {"name": "subtotal", "description": "Subtotal amount of the order line refund", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_tax": {"name": "total_tax", "description": "The total tax applied to the refund.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`fivetran-db`.`shopify`.`order_line_refund`", "created_at": 1641410292.8938649}, "source.shopify_source.shopify.product": {"fqn": ["shopify_source", "shopify", "product"], "database": "fivetran-db", "schema": "shopify", "unique_id": "source.shopify_source.shopify.product", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify_source", "path": "models/src_shopify.yml", "original_file_path": "models/src_shopify.yml", "name": "product", "source_name": "shopify", "source_description": "", "loader": "", "identifier": "product", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a product in Shopify.", "columns": {"_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Whether the record has been deleted in the source system.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "The date and time when the product was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "handle": {"name": "handle", "description": "A unique human-friendly string for the product. Automatically generated from the product's title.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "id": {"name": "id", "description": "An unsigned 64-bit integer that's used as a unique identifier for the product. Each id is unique across the Shopify system. No two products will have the same id, even if they're from different shops.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "product_type": {"name": "product_type", "description": "A categorization for the product used for filtering and searching products.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "published_at": {"name": "published_at", "description": "The date and time (ISO 8601 format) when the product was published. Can be set to null to unpublish the product from the Online Store channel.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "published_scope": {"name": "published_scope", "description": "Whether the product is published to the Point of Sale channel.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "title": {"name": "title", "description": "The name of the product.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_at": {"name": "updated_at", "description": "The date and time when the product was last modified.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "vendor": {"name": "vendor", "description": "The name of the product's vendor.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`fivetran-db`.`shopify`.`product`", "created_at": 1641410292.8940449}, "source.shopify_source.shopify.product_variant": {"fqn": ["shopify_source", "shopify", "product_variant"], "database": "fivetran-db", "schema": "shopify", "unique_id": "source.shopify_source.shopify.product_variant", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify_source", "path": "models/src_shopify.yml", "original_file_path": "models/src_shopify.yml", "name": "product_variant", "source_name": "shopify", "source_description": "", "loader": "", "identifier": "product_variant", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a product variant in Shopify", "columns": {"barcode": {"name": "barcode", "description": "The barcode, UPC, or ISBN number for the product.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "compare_at_price": {"name": "compare_at_price", "description": "The original price of the item before an adjustment or a sale.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "The date and time (ISO 8601 format) when the product variant was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "fulfillment_service": {"name": "fulfillment_service", "description": "The fulfillment service associated with the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "grams": {"name": "grams", "description": "The weight of the product variant in grams.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "id": {"name": "id", "description": "The unique numeric identifier for the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "image_id": {"name": "image_id", "description": "The unique numeric identifier for a product's image. The image must be associated to the same product as the variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "inventory_item_id": {"name": "inventory_item_id", "description": "The unique identifier for the inventory item, which is used in the Inventory API to query for inventory information.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "inventory_management": {"name": "inventory_management", "description": "The fulfillment service that tracks the number of items in stock for the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "inventory_policy": {"name": "inventory_policy", "description": "Whether customers are allowed to place an order for the product variant when it's out of stock.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "inventory_quantity": {"name": "inventory_quantity", "description": "An aggregate of inventory across all locations. To adjust inventory at a specific location, use the InventoryLevel resource.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "old_inventory_quantity": {"name": "old_inventory_quantity", "description": "This property is deprecated. Use the InventoryLevel resource instead.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "option_1": {"name": "option_1", "description": "The custom properties that a shop owner uses to define product variants. You can define three options for a product variant: option1, option2, option3.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "option_2": {"name": "option_2", "description": "The custom properties that a shop owner uses to define product variants. You can define three options for a product variant: option1, option2, option3.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "option_3": {"name": "option_3", "description": "The custom properties that a shop owner uses to define product variants. You can define three options for a product variant: option1, option2, option3.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "position": {"name": "position", "description": "The order of the product variant in the list of product variants. The first position in the list is 1. The position of variants is indicated by the order in which they are listed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "price": {"name": "price", "description": "The price of the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "product_id": {"name": "product_id", "description": "The unique numeric identifier for the product.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "requires_shipping": {"name": "requires_shipping", "description": "This property is deprecated. Use the `requires_shipping` property on the InventoryItem resource instead.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "sku": {"name": "sku", "description": "A unique identifier for the product variant in the shop. Required in order to connect to a FulfillmentService.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taxable": {"name": "taxable", "description": "Whether a tax is charged when the product variant is sold.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tax_code": {"name": "tax_code", "description": "This parameter applies only to the stores that have the Avalara AvaTax app installed. Specifies the Avalara tax code for the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "title": {"name": "title", "description": "The title of the product variant. The title field is a concatenation of the option1, option2, and option3 fields. You can only update title indirectly using the option fields.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_at": {"name": "updated_at", "description": "The date and time when the product variant was last modified. Gets returned in ISO 8601 format.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "weight": {"name": "weight", "description": "The weight of the product variant in the unit system specified with weight_unit.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "weight_unit": {"name": "weight_unit", "description": "The unit of measurement that applies to the product variant's weight. If you don't specify a value for weight_unit, then the shop's default unit of measurement is applied. Valid values: g, kg, oz, and lb.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_shipping_price_set": {"name": "total_shipping_price_set", "description": "The total shipping price set for the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "index": {"name": "index", "description": "The index associated with the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "pre_tax_price": {"name": "pre_tax_price", "description": "The total pre tax price of the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`fivetran-db`.`shopify`.`product_variant`", "created_at": 1641410292.894254}, "source.shopify_source.shopify.transaction": {"fqn": ["shopify_source", "shopify", "transaction"], "database": "fivetran-db", "schema": "shopify", "unique_id": "source.shopify_source.shopify.transaction", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify_source", "path": "models/src_shopify.yml", "original_file_path": "models/src_shopify.yml", "name": "transaction", "source_name": "shopify", "source_description": "", "loader": "", "identifier": "transaction", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a transaction in Shopify.", "columns": {"transaction_id": {"name": "transaction_id", "description": "The ID for the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_id": {"name": "order_id", "description": "The ID for the order that the transaction is associated with.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refund_id": {"name": "refund_id", "description": "The ID associated with a refund in the refund table.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "amount": {"name": "amount", "description": "The amount of money included in the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "authorization": {"name": "authorization", "description": "The authorization code associated with the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_timestamp": {"name": "created_timestamp", "description": "The date and time when the transaction was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "processed_timestamp": {"name": "processed_timestamp", "description": "The date and time when a transaction was processed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "device_id": {"name": "device_id", "description": "The ID for the device.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "gateway": {"name": "gateway", "description": "The name of the gateway the transaction was issued through.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_name": {"name": "source_name", "description": "The origin of the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "message": {"name": "message", "description": "A string generated by the payment provider with additional information about why the transaction succeeded or failed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "The three-letter code (ISO 4217 format) for the currency used for the payment.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "location_id": {"name": "location_id", "description": "The ID of the physical location where the transaction was processed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "parent_id": {"name": "parent_id", "description": "The ID of an associated transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payment_avs_result_code": {"name": "payment_avs_result_code", "description": "The response code from the address verification system.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payment_credit_card_bin": {"name": "payment_credit_card_bin", "description": "The issuer identification number (IIN), formerly known as bank identification number (BIN) of the customer's credit card.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payment_cvv_result_code": {"name": "payment_cvv_result_code", "description": "The response code from the credit card company indicating whether the customer entered the card security code, or card verification value, correctly.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payment_credit_card_number": {"name": "payment_credit_card_number", "description": "The customer's credit card number, with most of the leading digits redacted.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payment_credit_card_company": {"name": "payment_credit_card_company", "description": "The name of the company that issued the customer's credit card.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "kind": {"name": "kind", "description": "The transaction's type.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "receipt": {"name": "receipt", "description": "A transaction receipt attached to the transaction by the gateway.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency_exchange_id": {"name": "currency_exchange_id", "description": "The ID of the adjustment.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency_exchange_adjustment": {"name": "currency_exchange_adjustment", "description": "The difference between the amounts on the associated transaction and the parent transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency_exchange_original_amount": {"name": "currency_exchange_original_amount", "description": "The amount of the parent transaction in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency_exchange_final_amount": {"name": "currency_exchange_final_amount", "description": "The amount of the associated transaction in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency_exchange_currency": {"name": "currency_exchange_currency", "description": "The shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "error_code": {"name": "error_code", "description": "A standardized error code, independent of the payment provider.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status": {"name": "status", "description": "The status of the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "test": {"name": "test", "description": "Whether the transaction is a test transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "user_id": {"name": "user_id", "description": "The ID for the user who was logged into the Shopify POS device when the order was processed, if applicable.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`fivetran-db`.`shopify`.`transaction`", "created_at": 1641410292.894463}, "source.shopify_source.shopify.refund": {"fqn": ["shopify_source", "shopify", "refund"], "database": "fivetran-db", "schema": "shopify", "unique_id": "source.shopify_source.shopify.refund", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify_source", "path": "models/src_shopify.yml", "original_file_path": "models/src_shopify.yml", "name": "refund", "source_name": "shopify", "source_description": "", "loader": "", "identifier": "refund", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a refund within Shopify.", "columns": {"id": {"name": "id", "description": "The unique numeric identifier for the refund.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "Timestamp of the date when the refund was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "processed_at": {"name": "processed_at", "description": "Timestamp of the date when the refund was processed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "note": {"name": "note", "description": "User generated note attached to the refund.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "restock": {"name": "restock", "description": "Boolean indicating if the refund is a result of a restock.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "user_id": {"name": "user_id", "description": "Reference to the user id which generated the refund.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_duties_set": {"name": "total_duties_set", "description": "Record representing total duties set for the refund.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_id": {"name": "order_id", "description": "Reference to the order which the refund is associated.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`fivetran-db`.`shopify`.`refund`", "created_at": 1641410292.8946218}, "source.shopify_source.shopify.order_adjustment": {"fqn": ["shopify_source", "shopify", "order_adjustment"], "database": "fivetran-db", "schema": "shopify", "unique_id": "source.shopify_source.shopify.order_adjustment", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify_source", "path": "models/src_shopify.yml", "original_file_path": "models/src_shopify.yml", "name": "order_adjustment", "source_name": "shopify", "source_description": "", "loader": "", "identifier": "order_adjustment", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents and adjustment to and order within Shopify.", "columns": {"id": {"name": "id", "description": "The unique numeric identifier for the order adjustment.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_id": {"name": "order_id", "description": "Reference to the order which the adjustment is associated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refund_id": {"name": "refund_id", "description": "Reference to the refund which the adjustment is associated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "amount": {"name": "amount", "description": "Amount of the adjustment.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tax_amount": {"name": "tax_amount", "description": "Tax amount applied to the order adjustment.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "kind": {"name": "kind", "description": "The kind of order adjustment (eg. refund, restock, etc.).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "reason": {"name": "reason", "description": "The reason for the order adjustment.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "amount_set": {"name": "amount_set", "description": "Amount set towards the order adjustment", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tax_amount_set": {"name": "tax_amount_set", "description": "Tax amount set towards the order adjustment.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`fivetran-db`.`shopify`.`order_adjustment`", "created_at": 1641410292.8947809}, "source.klaviyo_source.klaviyo.campaign": {"fqn": ["klaviyo_source", "klaviyo", "campaign"], "database": "fivetran-db", "schema": "klaviyo", "unique_id": "source.klaviyo_source.klaviyo.campaign", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/klaviyo_source", "path": "models/src_klaviyo.yml", "original_file_path": "models/src_klaviyo.yml", "name": "campaign", "source_name": "klaviyo", "source_description": "", "loader": "fivetran", "identifier": "campaign", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 72, "period": "hour"}, "error_after": {"count": 96, "period": "hour"}, "filter": null}, "external": null, "description": "Table capturing email campaigns in Klaviyo. \n", "columns": {"_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean that is true if the campaign has been soft-deleted.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_type": {"name": "campaign_type", "description": "Type of campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created": {"name": "created", "description": "Timestamp of when the campaign was created, in UTC.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email_template_id": {"name": "email_template_id", "description": "Foreign key referencing the ID of the `email_template` object that will be the content of this campaign. Note the Email Template is copied when creating this campaign, so future changes to that Email Template will not alter the content of this campaign.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "from_email": {"name": "from_email", "description": "The email address your email will be sent from and will be used in the reply-to header.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "from_name": {"name": "from_name", "description": "The name or label associated with the email address you're sending from.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "id": {"name": "id", "description": "Unique ID of the campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_segmented": {"name": "is_segmented", "description": "Boolean that is true if the campaign is directed at a Klaviyo segment (not a list).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "name": {"name": "name", "description": "A name for this campaign. If not specified, this will default to the subject of the campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "send_time": {"name": "send_time", "description": "Timestamp of when the campaign is scheduled to be sent in the future, if [\"smart send time\"](https://help.klaviyo.com/hc/en-us/articles/360029794371-Smart-Send-Time-in-Klaviyo#how-to-utilize-smart-send-time3) is used. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "sent_at": {"name": "sent_at", "description": "Timestamp of when the campaign was first sent out to users.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status": {"name": "status", "description": "Current status of the campaign. Either \"draft\", \"scheduled\", \"sent\", or \"cancelled\".", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status_id": {"name": "status_id", "description": "Corresponding ID to the current status.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status_label": {"name": "status_label", "description": "The label of the status as it appears in the UI (should be the same as `status`).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "subject": {"name": "subject", "description": "The subject line of the campaign's email.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated": {"name": "updated", "description": "Timestamp of when the campaign was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`fivetran-db`.`klaviyo`.`campaign`", "created_at": 1641410292.895089}, "source.klaviyo_source.klaviyo.event": {"fqn": ["klaviyo_source", "klaviyo", "event"], "database": "fivetran-db", "schema": "klaviyo", "unique_id": "source.klaviyo_source.klaviyo.event", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/klaviyo_source", "path": "models/src_klaviyo.yml", "original_file_path": "models/src_klaviyo.yml", "name": "event", "source_name": "klaviyo", "source_description": "", "loader": "fivetran", "identifier": "event", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 72, "period": "hour"}, "error_after": {"count": 96, "period": "hour"}, "filter": null}, "external": null, "description": "Table of events (and metrics) triggered in Klaviyo or via its integrations. Custom columns can be passed through to downstream models via the `klaviyo__event_pass_through_columns` variable (see README for details).\n", "columns": {"_variation": {"name": "_variation", "description": "Unique ID of the attributed flow or campaign variation group. This does not map onto another table. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Foreign key referencing the CAMPAIGN that the event is attributed to.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "datetime": {"name": "datetime", "description": "Timestamp of when the event was recorded in Klaviyo. Should be the same/nominally off from `timestamp`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "timestamp": {"name": "timestamp", "description": "Timestamp of when the event was triggered. Should be the same/nominally off from `datetime`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_id": {"name": "flow_id", "description": "Foreign key referencing the FLOW that the event is attributed to.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_message_id": {"name": "flow_message_id", "description": "Unique ID of the FLOW_MESSAGE that the event is attributed to. This does not map onto another table.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "id": {"name": "id", "description": "Unique ID of the event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "metric_id": {"name": "metric_id", "description": "Foreign key referencing the metric being captured.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "person_id": {"name": "person_id", "description": "Foreign key referencing the PERSON who triggered the event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "type": {"name": "type", "description": "Type of event that was triggered. This is the same as the METRIC name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "uuid": {"name": "uuid", "description": "Universally Unique Identifier of the event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "property_value": {"name": "property_value", "description": "Numeric value associated with the event (ie the dollars associated with a purchase).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean that is true if the campaign has been soft-deleted.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`fivetran-db`.`klaviyo`.`event`", "created_at": 1641410292.8952692}, "source.klaviyo_source.klaviyo.flow": {"fqn": ["klaviyo_source", "klaviyo", "flow"], "database": "fivetran-db", "schema": "klaviyo", "unique_id": "source.klaviyo_source.klaviyo.flow", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/klaviyo_source", "path": "models/src_klaviyo.yml", "original_file_path": "models/src_klaviyo.yml", "name": "flow", "source_name": "klaviyo", "source_description": "", "loader": "fivetran", "identifier": "flow", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 72, "period": "hour"}, "error_after": {"count": 96, "period": "hour"}, "filter": null}, "external": null, "description": "Table of automated, triggered flow sequences in Klaviyo.", "columns": {"created": {"name": "created", "description": "Timestamp of when the flow was first created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "id": {"name": "id", "description": "Unique ID of the flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "name": {"name": "name", "description": "Name of the flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status": {"name": "status", "description": "Current status of the flow. Either 'manual', 'live', or 'draft'. Read more [here](https://help.klaviyo.com/hc/en-us/articles/115002774932-Getting-Started-with-Flows#the-flow-action-status9).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "trigger": {"name": "trigger", "description": "JSON of metric, segment, list, and/or date-property filters that will trigger this flow. These are applied to the **event level**.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated": {"name": "updated", "description": "Timestamp of when the flow was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "customer_filter": {"name": "customer_filter", "description": "JSON of flow filters placed on the **person level** that will trigger this flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean that is true if the campaign has been soft-deleted.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`fivetran-db`.`klaviyo`.`flow`", "created_at": 1641410292.8954298}, "source.klaviyo_source.klaviyo.integration": {"fqn": ["klaviyo_source", "klaviyo", "integration"], "database": "fivetran-db", "schema": "klaviyo", "unique_id": "source.klaviyo_source.klaviyo.integration", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/klaviyo_source", "path": "models/src_klaviyo.yml", "original_file_path": "models/src_klaviyo.yml", "name": "integration", "source_name": "klaviyo", "source_description": "", "loader": "fivetran", "identifier": "integration", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 72, "period": "hour"}, "error_after": {"count": 96, "period": "hour"}, "filter": null}, "external": null, "description": "Table storing third-party platforms integrated into Klaviyo.", "columns": {"category": {"name": "category", "description": "Use-case category of the integrated platform.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "id": {"name": "id", "description": "Unique ID of the integration.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "name": {"name": "name", "description": "Name of the integrated platform.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean that is true if the campaign has been soft-deleted.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`fivetran-db`.`klaviyo`.`integration`", "created_at": 1641410292.8955789}, "source.klaviyo_source.klaviyo.person": {"fqn": ["klaviyo_source", "klaviyo", "person"], "database": "fivetran-db", "schema": "klaviyo", "unique_id": "source.klaviyo_source.klaviyo.person", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/klaviyo_source", "path": "models/src_klaviyo.yml", "original_file_path": "models/src_klaviyo.yml", "name": "person", "source_name": "klaviyo", "source_description": "", "loader": "fivetran", "identifier": "person", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 72, "period": "hour"}, "error_after": {"count": 96, "period": "hour"}, "filter": null}, "external": null, "description": "Table storing the profiles of all people/users interacted with. Custom columns can be passed through to downstream models via the `klaviyo__person_pass_through_columns` variable (see README for details).\n", "columns": {"id": {"name": "id", "description": "Unique ID of the user if you use your own unique identifier. Otherwise, Klaviyo recommends using the email as the primary key. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "address_1": {"name": "address_1", "description": "First line of the person's address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "address_2": {"name": "address_2", "description": "Second line of the person's address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "city": {"name": "city", "description": "City they live in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "country": {"name": "country", "description": "Country they live in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "zip": {"name": "zip", "description": "Postal code where they live.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created": {"name": "created", "description": "Timestamp of when the person's profile was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email": {"name": "email", "description": "The email address and the unique identifier for a profile.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_name": {"name": "first_name", "description": "Person's first name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_name": {"name": "last_name", "description": "Person's surname.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "latitude": {"name": "latitude", "description": "Latitude of the person's location.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "longitude": {"name": "longitude", "description": "Longitude of the person's location.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization": {"name": "organization", "description": "Business organization they belong to.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "phone_number": {"name": "phone_number", "description": "Associated phone number.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "region": {"name": "region", "description": "Region or state they live in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "timezone": {"name": "timezone", "description": "Timezone they are situated in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "title": {"name": "title", "description": "Title at their business or organization.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated": {"name": "updated", "description": "Timestamp of when the person profile was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean that is true if the campaign has been soft-deleted.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`fivetran-db`.`klaviyo`.`person`", "created_at": 1641410292.8957582}, "source.klaviyo_source.klaviyo.metric": {"fqn": ["klaviyo_source", "klaviyo", "metric"], "database": "fivetran-db", "schema": "klaviyo", "unique_id": "source.klaviyo_source.klaviyo.metric", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/klaviyo_source", "path": "models/src_klaviyo.yml", "original_file_path": "models/src_klaviyo.yml", "name": "metric", "source_name": "klaviyo", "source_description": "", "loader": "fivetran", "identifier": "metric", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 72, "period": "hour"}, "error_after": {"count": 96, "period": "hour"}, "filter": null}, "external": null, "description": "Table of tracked metrics across integrations in Klaviyo.", "columns": {"created": {"name": "created", "description": "Timestamp of when the metric was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "id": {"name": "id", "description": "Unique ID of the metric being tracked.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "integration_id": {"name": "integration_id", "description": "Foreign key referencing the INTEGRATION that the metric is being pulled from.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "name": {"name": "name", "description": "Name of the metric (same as `EVENT.type`)", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated": {"name": "updated", "description": "Timestamp of when the metric was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean that is true if the campaign has been soft-deleted.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`fivetran-db`.`klaviyo`.`metric`", "created_at": 1641410292.895912}}, "macros": {"macro.dbt_bigquery.date_sharded_table": {"unique_id": "macro.dbt_bigquery.date_sharded_table", "package_name": "dbt_bigquery", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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}, "patch_path": null, "arguments": [], "created_at": 1641410289.781721}, "macro.dbt_bigquery.grant_access_to": {"unique_id": "macro.dbt_bigquery.grant_access_to", "package_name": "dbt_bigquery", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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}, "patch_path": null, "arguments": [], "created_at": 1641410289.782382}, "macro.dbt_bigquery.get_partitions_metadata": {"unique_id": "macro.dbt_bigquery.get_partitions_metadata", "package_name": "dbt_bigquery", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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}, "patch_path": null, "arguments": [], "created_at": 1641410289.7830489}, "macro.dbt_bigquery.bigquery__get_catalog": {"unique_id": "macro.dbt_bigquery.bigquery__get_catalog", "package_name": "dbt_bigquery", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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_utils.replace", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1641410289.790015}, "macro.dbt_bigquery.partition_by": {"unique_id": "macro.dbt_bigquery.partition_by", "package_name": "dbt_bigquery", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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}, "patch_path": null, "arguments": [], "created_at": 1641410289.800321}, "macro.dbt_bigquery.cluster_by": {"unique_id": "macro.dbt_bigquery.cluster_by", "package_name": "dbt_bigquery", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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}, "patch_path": null, "arguments": [], "created_at": 1641410289.80124}, "macro.dbt_bigquery.bigquery_options": {"unique_id": "macro.dbt_bigquery.bigquery_options", "package_name": "dbt_bigquery", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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}, "patch_path": null, "arguments": [], "created_at": 1641410289.802169}, "macro.dbt_bigquery.bigquery_table_options": {"unique_id": "macro.dbt_bigquery.bigquery_table_options", "package_name": "dbt_bigquery", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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}, "patch_path": null, "arguments": [], "created_at": 1641410289.802793}, "macro.dbt_bigquery.bigquery__create_table_as": {"unique_id": "macro.dbt_bigquery.bigquery__create_table_as", "package_name": "dbt_bigquery", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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, 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 {{ sql }}\n );\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"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1641410289.804544}, "macro.dbt_bigquery.bigquery_view_options": {"unique_id": "macro.dbt_bigquery.bigquery_view_options", "package_name": "dbt_bigquery", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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}, "patch_path": null, "arguments": [], "created_at": 1641410289.8051462}, "macro.dbt_bigquery.bigquery__create_view_as": {"unique_id": "macro.dbt_bigquery.bigquery__create_view_as", "package_name": "dbt_bigquery", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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}, "patch_path": null, "arguments": [], "created_at": 1641410289.805891}, "macro.dbt_bigquery.bigquery__create_schema": {"unique_id": "macro.dbt_bigquery.bigquery__create_schema", "package_name": "dbt_bigquery", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery__create_schema", "macro_sql": "{% macro bigquery__create_schema(relation) -%}\n {{ adapter.create_schema(relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1641410289.806205}, "macro.dbt_bigquery.bigquery__drop_schema": {"unique_id": "macro.dbt_bigquery.bigquery__drop_schema", "package_name": "dbt_bigquery", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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}, "patch_path": null, "arguments": [], "created_at": 1641410289.806515}, "macro.dbt_bigquery.bigquery__drop_relation": {"unique_id": "macro.dbt_bigquery.bigquery__drop_relation", "package_name": "dbt_bigquery", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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}, "patch_path": null, "arguments": [], "created_at": 1641410289.8069901}, "macro.dbt_bigquery.bigquery__get_columns_in_relation": {"unique_id": "macro.dbt_bigquery.bigquery__get_columns_in_relation", "package_name": "dbt_bigquery", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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}, "patch_path": null, "arguments": [], "created_at": 1641410289.807348}, "macro.dbt_bigquery.bigquery__list_relations_without_caching": {"unique_id": "macro.dbt_bigquery.bigquery__list_relations_without_caching", "package_name": "dbt_bigquery", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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}, "patch_path": null, "arguments": [], "created_at": 1641410289.8077068}, "macro.dbt_bigquery.bigquery__current_timestamp": {"unique_id": "macro.dbt_bigquery.bigquery__current_timestamp", "package_name": "dbt_bigquery", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.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": 1641410289.8078878}, "macro.dbt_bigquery.bigquery__snapshot_string_as_time": {"unique_id": "macro.dbt_bigquery.bigquery__snapshot_string_as_time", "package_name": "dbt_bigquery", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.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}, "patch_path": null, "arguments": [], "created_at": 1641410289.8083122}, "macro.dbt_bigquery.bigquery__list_schemas": {"unique_id": "macro.dbt_bigquery.bigquery__list_schemas", "package_name": "dbt_bigquery", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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}, "patch_path": null, "arguments": [], "created_at": 1641410289.808664}, "macro.dbt_bigquery.bigquery__check_schema_exists": {"unique_id": "macro.dbt_bigquery.bigquery__check_schema_exists", "package_name": "dbt_bigquery", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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}, "patch_path": null, "arguments": [], "created_at": 1641410289.809226}, "macro.dbt_bigquery.bigquery__persist_docs": {"unique_id": "macro.dbt_bigquery.bigquery__persist_docs", "package_name": "dbt_bigquery", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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}, "patch_path": null, "arguments": [], "created_at": 1641410289.809878}, "macro.dbt_bigquery.bigquery__alter_column_comment": {"unique_id": "macro.dbt_bigquery.bigquery__alter_column_comment", "package_name": "dbt_bigquery", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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}, "patch_path": null, "arguments": [], "created_at": 1641410289.810251}, "macro.dbt_bigquery.bigquery__rename_relation": {"unique_id": "macro.dbt_bigquery.bigquery__rename_relation", "package_name": "dbt_bigquery", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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}, "patch_path": null, "arguments": [], "created_at": 1641410289.810616}, "macro.dbt_bigquery.bigquery__alter_relation_add_columns": {"unique_id": "macro.dbt_bigquery.bigquery__alter_relation_add_columns", "package_name": "dbt_bigquery", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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}, "patch_path": null, "arguments": [], "created_at": 1641410289.81155}, "macro.dbt_bigquery.bigquery__alter_relation_drop_columns": {"unique_id": "macro.dbt_bigquery.bigquery__alter_relation_drop_columns", "package_name": "dbt_bigquery", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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}, "patch_path": null, "arguments": [], "created_at": 1641410289.8124769}, "macro.dbt_bigquery.bigquery__alter_column_type": {"unique_id": "macro.dbt_bigquery.bigquery__alter_column_type", "package_name": "dbt_bigquery", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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}, "patch_path": null, "arguments": [], "created_at": 1641410289.814025}, "macro.dbt_bigquery.bigquery__test_unique": {"unique_id": "macro.dbt_bigquery.bigquery__test_unique", "package_name": "dbt_bigquery", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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}, "patch_path": null, "arguments": [], "created_at": 1641410289.8144262}, "macro.dbt_bigquery.bigquery__create_csv_table": {"unique_id": "macro.dbt_bigquery.bigquery__create_csv_table", "package_name": "dbt_bigquery", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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}, "patch_path": null, "arguments": [], "created_at": 1641410289.815268}, "macro.dbt_bigquery.bigquery__reset_csv_table": {"unique_id": "macro.dbt_bigquery.bigquery__reset_csv_table", "package_name": "dbt_bigquery", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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}, "patch_path": null, "arguments": [], "created_at": 1641410289.8156438}, "macro.dbt_bigquery.bigquery__load_csv_rows": {"unique_id": "macro.dbt_bigquery.bigquery__load_csv_rows", "package_name": "dbt_bigquery", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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}, "patch_path": null, "arguments": [], "created_at": 1641410289.8170419}, "macro.dbt_bigquery.bigquery__handle_existing_table": {"unique_id": "macro.dbt_bigquery.bigquery__handle_existing_table", "package_name": "dbt_bigquery", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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}, "patch_path": null, "arguments": [], "created_at": 1641410289.818363}, "macro.dbt_bigquery.materialization_view_bigquery": {"unique_id": "macro.dbt_bigquery.materialization_view_bigquery", "package_name": "dbt_bigquery", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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 {% set to_return = create_or_replace_view() %}\n\n {% set target_relation = this.incorporate(type='view') %}\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}, "patch_path": null, "arguments": [], "created_at": 1641410289.820215}, "macro.dbt_bigquery.materialization_table_bigquery": {"unique_id": "macro.dbt_bigquery.materialization_table_bigquery", "package_name": "dbt_bigquery", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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' -%}\n\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 {{ 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 {% call statement('main') -%}\n {{ create_table_as(False, target_relation, sql) }}\n {% endcall -%}\n\n {{ run_hooks(post_hooks) }}\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.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1641410289.8250098}, "macro.dbt_bigquery.materialization_copy_bigquery": {"unique_id": "macro.dbt_bigquery.materialization_copy_bigquery", "package_name": "dbt_bigquery", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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's 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 {{ adapter.commit() }}\n\n {{ return({'relations': [destination]}) }}\n{%- endmaterialization %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_hooks"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1641410289.8278358}, "macro.dbt_bigquery.declare_dbt_max_partition": {"unique_id": "macro.dbt_bigquery.declare_dbt_max_partition", "package_name": "dbt_bigquery", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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, sql) %}\n\n {% if '_dbt_max_partition' in 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}, "patch_path": null, "arguments": [], "created_at": 1641410289.831836}, "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": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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\", default=\"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}, "patch_path": null, "arguments": [], "created_at": 1641410289.832891}, "macro.dbt_bigquery.bq_insert_overwrite": {"unique_id": "macro.dbt_bigquery.bq_insert_overwrite", "package_name": "dbt_bigquery", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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 {{ 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, sql) }}\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 {#\n TODO: include_sql_header is a hack; consider a better approach that includes\n the sql_header at the materialization-level instead\n #}\n -- 3. run the merge statement\n {{ get_insert_overwrite_merge_sql(target_relation, source_sql, dest_columns, [predicate], include_sql_header=false) }};\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}, "patch_path": null, "arguments": [], "created_at": 1641410289.8359501}, "macro.dbt_bigquery.bq_generate_incremental_build_sql": {"unique_id": "macro.dbt_bigquery.bq_generate_incremental_build_sql", "package_name": "dbt_bigquery", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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, on_schema_change\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}, "patch_path": null, "arguments": [], "created_at": 1641410289.838065}, "macro.dbt_bigquery.materialization_incremental_bigquery": {"unique_id": "macro.dbt_bigquery.materialization_incremental_bigquery", "package_name": "dbt_bigquery", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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' -%}\n\n {%- set unique_key = config.get('unique_key') -%}\n {%- set full_refresh_mode = (should_full_refresh()) -%}\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 {{ run_hooks(pre_hooks) }}\n\n {% if existing_relation is none %}\n {% set build_sql = create_table_as(False, target_relation, sql) %}\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 {% set build_sql = create_table_as(False, target_relation, sql) %}\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 {% set build_sql = create_table_as(False, target_relation, sql) %}\n \n {% else %}\n {% set tmp_relation_exists = false %}\n {% if on_schema_change != 'ignore' %} {# Check first, since otherwise we may not build a temp table #}\n {% do run_query(\n declare_dbt_max_partition(this, partition_by, sql) + create_table_as(True, tmp_relation, sql)\n ) %}\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 {% 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, sql, unique_key, partition_by, partitions, dest_columns, tmp_relation_exists\n ) %}\n\n {% endif %}\n\n {%- call statement('main') -%}\n {{ build_sql }}\n {% endcall %}\n\n {{ run_hooks(post_hooks) }}\n\n {% set target_relation = this.incorporate(type='table') %}\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.create_table_as", "macro.dbt.run_query", "macro.dbt_bigquery.declare_dbt_max_partition", "macro.dbt.process_schema_changes", "macro.dbt_bigquery.bq_generate_incremental_build_sql", "macro.dbt.statement", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1641410289.844537}, "macro.dbt_bigquery.bigquery__snapshot_hash_arguments": {"unique_id": "macro.dbt_bigquery.bigquery__snapshot_hash_arguments", "package_name": "dbt_bigquery", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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}, "patch_path": null, "arguments": [], "created_at": 1641410289.845629}, "macro.dbt_bigquery.bigquery__create_columns": {"unique_id": "macro.dbt_bigquery.bigquery__create_columns", "package_name": "dbt_bigquery", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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}, "patch_path": null, "arguments": [], "created_at": 1641410289.84607}, "macro.dbt_bigquery.bigquery__post_snapshot": {"unique_id": "macro.dbt_bigquery.bigquery__post_snapshot", "package_name": "dbt_bigquery", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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}, "patch_path": null, "arguments": [], "created_at": 1641410289.8463821}, "macro.dbt.run_hooks": {"unique_id": "macro.dbt.run_hooks", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410289.84879}, "macro.dbt.make_hook_config": {"unique_id": "macro.dbt.make_hook_config", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410289.849239}, "macro.dbt.before_begin": {"unique_id": "macro.dbt.before_begin", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410289.8495722}, "macro.dbt.in_transaction": {"unique_id": "macro.dbt.in_transaction", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410289.849903}, "macro.dbt.after_commit": {"unique_id": "macro.dbt.after_commit", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410289.850236}, "macro.dbt.set_sql_header": {"unique_id": "macro.dbt.set_sql_header", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410289.8512352}, "macro.dbt.should_full_refresh": {"unique_id": "macro.dbt.should_full_refresh", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410289.8519711}, "macro.dbt.should_store_failures": {"unique_id": "macro.dbt.should_store_failures", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410289.852748}, "macro.dbt.snapshot_merge_sql": {"unique_id": "macro.dbt.snapshot_merge_sql", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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}, "patch_path": null, "arguments": [], "created_at": 1641410289.853821}, "macro.dbt.default__snapshot_merge_sql": {"unique_id": "macro.dbt.default__snapshot_merge_sql", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410289.854741}, "macro.dbt.strategy_dispatch": {"unique_id": "macro.dbt.strategy_dispatch", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410289.861676}, "macro.dbt.snapshot_hash_arguments": {"unique_id": "macro.dbt.snapshot_hash_arguments", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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}, "patch_path": null, "arguments": [], "created_at": 1641410289.862071}, "macro.dbt.default__snapshot_hash_arguments": {"unique_id": "macro.dbt.default__snapshot_hash_arguments", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410289.862615}, "macro.dbt.snapshot_get_time": {"unique_id": "macro.dbt.snapshot_get_time", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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.default__snapshot_get_time"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1641410289.862956}, "macro.dbt.default__snapshot_get_time": {"unique_id": "macro.dbt.default__snapshot_get_time", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410289.863192}, "macro.dbt.snapshot_timestamp_strategy": {"unique_id": "macro.dbt.snapshot_timestamp_strategy", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410289.865193}, "macro.dbt.snapshot_string_as_time": {"unique_id": "macro.dbt.snapshot_string_as_time", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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}, "patch_path": null, "arguments": [], "created_at": 1641410289.865597}, "macro.dbt.default__snapshot_string_as_time": {"unique_id": "macro.dbt.default__snapshot_string_as_time", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410289.866004}, "macro.dbt.snapshot_check_all_get_existing_columns": {"unique_id": "macro.dbt.snapshot_check_all_get_existing_columns", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410289.8684642}, "macro.dbt.snapshot_check_strategy": {"unique_id": "macro.dbt.snapshot_check_strategy", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410289.8729239}, "macro.dbt.create_columns": {"unique_id": "macro.dbt.create_columns", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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}, "patch_path": null, "arguments": [], "created_at": 1641410289.879034}, "macro.dbt.default__create_columns": {"unique_id": "macro.dbt.default__create_columns", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410289.87972}, "macro.dbt.post_snapshot": {"unique_id": "macro.dbt.post_snapshot", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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}, "patch_path": null, "arguments": [], "created_at": 1641410289.8801239}, "macro.dbt.default__post_snapshot": {"unique_id": "macro.dbt.default__post_snapshot", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410289.880348}, "macro.dbt.snapshot_staging_table": {"unique_id": "macro.dbt.snapshot_staging_table", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410289.880841}, "macro.dbt.default__snapshot_staging_table": {"unique_id": "macro.dbt.default__snapshot_staging_table", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410289.882839}, "macro.dbt.build_snapshot_table": {"unique_id": "macro.dbt.build_snapshot_table", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410289.883349}, "macro.dbt.default__build_snapshot_table": {"unique_id": "macro.dbt.default__build_snapshot_table", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410289.883946}, "macro.dbt.build_snapshot_staging_table": {"unique_id": "macro.dbt.build_snapshot_staging_table", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410289.8849778}, "macro.dbt.materialization_snapshot_default": {"unique_id": "macro.dbt.materialization_snapshot_default", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410289.899174}, "macro.dbt.materialization_test_default": {"unique_id": "macro.dbt.materialization_test_default", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410289.9039738}, "macro.dbt.get_test_sql": {"unique_id": "macro.dbt.get_test_sql", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410289.9051661}, "macro.dbt.default__get_test_sql": {"unique_id": "macro.dbt.default__get_test_sql", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410289.905945}, "macro.dbt.get_where_subquery": {"unique_id": "macro.dbt.get_where_subquery", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410289.90704}, "macro.dbt.default__get_where_subquery": {"unique_id": "macro.dbt.default__get_where_subquery", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410289.9079921}, "macro.dbt.get_quoted_csv": {"unique_id": "macro.dbt.get_quoted_csv", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410289.909931}, "macro.dbt.diff_columns": {"unique_id": "macro.dbt.diff_columns", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410289.911236}, "macro.dbt.diff_column_data_types": {"unique_id": "macro.dbt.diff_column_data_types", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410289.912676}, "macro.dbt.get_merge_sql": {"unique_id": "macro.dbt.get_merge_sql", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410289.9181519}, "macro.dbt.default__get_merge_sql": {"unique_id": "macro.dbt.default__get_merge_sql", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410289.9210181}, "macro.dbt.get_delete_insert_merge_sql": {"unique_id": "macro.dbt.get_delete_insert_merge_sql", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410289.9215958}, "macro.dbt.default__get_delete_insert_merge_sql": {"unique_id": "macro.dbt.default__get_delete_insert_merge_sql", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410289.922789}, "macro.dbt.get_insert_overwrite_merge_sql": {"unique_id": "macro.dbt.get_insert_overwrite_merge_sql", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410289.923419}, "macro.dbt.default__get_insert_overwrite_merge_sql": {"unique_id": "macro.dbt.default__get_insert_overwrite_merge_sql", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410289.924893}, "macro.dbt.is_incremental": {"unique_id": "macro.dbt.is_incremental", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410289.926626}, "macro.dbt.materialization_incremental_default": {"unique_id": "macro.dbt.materialization_incremental_default", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410289.937689}, "macro.dbt.incremental_validate_on_schema_change": {"unique_id": "macro.dbt.incremental_validate_on_schema_change", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410289.946816}, "macro.dbt.check_for_schema_changes": {"unique_id": "macro.dbt.check_for_schema_changes", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410289.949762}, "macro.dbt.sync_column_schemas": {"unique_id": "macro.dbt.sync_column_schemas", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410289.9525928}, "macro.dbt.process_schema_changes": {"unique_id": "macro.dbt.process_schema_changes", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410289.954636}, "macro.dbt.materialization_table_default": {"unique_id": "macro.dbt.materialization_table_default", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410289.963205}, "macro.dbt.get_create_table_as_sql": {"unique_id": "macro.dbt.get_create_table_as_sql", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410289.964345}, "macro.dbt.default__get_create_table_as_sql": {"unique_id": "macro.dbt.default__get_create_table_as_sql", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410289.964782}, "macro.dbt.create_table_as": {"unique_id": "macro.dbt.create_table_as", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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_bigquery.bigquery__create_table_as"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1641410289.965258}, "macro.dbt.default__create_table_as": {"unique_id": "macro.dbt.default__create_table_as", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410289.966204}, "macro.dbt.materialization_view_default": {"unique_id": "macro.dbt.materialization_view_default", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410289.9740238}, "macro.dbt.handle_existing_table": {"unique_id": "macro.dbt.handle_existing_table", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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}, "patch_path": null, "arguments": [], "created_at": 1641410289.9749079}, "macro.dbt.default__handle_existing_table": {"unique_id": "macro.dbt.default__handle_existing_table", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410289.975431}, "macro.dbt.create_or_replace_view": {"unique_id": "macro.dbt.create_or_replace_view", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410289.9782069}, "macro.dbt.get_create_view_as_sql": {"unique_id": "macro.dbt.get_create_view_as_sql", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410289.979247}, "macro.dbt.default__get_create_view_as_sql": {"unique_id": "macro.dbt.default__get_create_view_as_sql", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410289.9796429}, "macro.dbt.create_view_as": {"unique_id": "macro.dbt.create_view_as", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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}, "patch_path": null, "arguments": [], "created_at": 1641410289.980078}, "macro.dbt.default__create_view_as": {"unique_id": "macro.dbt.default__create_view_as", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410289.980742}, "macro.dbt.materialization_seed_default": {"unique_id": "macro.dbt.materialization_seed_default", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410289.988499}, "macro.dbt.create_csv_table": {"unique_id": "macro.dbt.create_csv_table", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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}, "patch_path": null, "arguments": [], "created_at": 1641410289.996709}, "macro.dbt.default__create_csv_table": {"unique_id": "macro.dbt.default__create_csv_table", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410289.998849}, "macro.dbt.reset_csv_table": {"unique_id": "macro.dbt.reset_csv_table", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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}, "patch_path": null, "arguments": [], "created_at": 1641410289.999398}, "macro.dbt.default__reset_csv_table": {"unique_id": "macro.dbt.default__reset_csv_table", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410290.000753}, "macro.dbt.get_binding_char": {"unique_id": "macro.dbt.get_binding_char", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410290.001119}, "macro.dbt.default__get_binding_char": {"unique_id": "macro.dbt.default__get_binding_char", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410290.0014458}, "macro.dbt.get_batch_size": {"unique_id": "macro.dbt.get_batch_size", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410290.002004}, "macro.dbt.default__get_batch_size": {"unique_id": "macro.dbt.default__get_batch_size", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410290.002409}, "macro.dbt.get_seed_column_quoted_csv": {"unique_id": "macro.dbt.get_seed_column_quoted_csv", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410290.003592}, "macro.dbt.load_csv_rows": {"unique_id": "macro.dbt.load_csv_rows", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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}, "patch_path": null, "arguments": [], "created_at": 1641410290.004035}, "macro.dbt.default__load_csv_rows": {"unique_id": "macro.dbt.default__load_csv_rows", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410290.007189}, "macro.dbt.generate_alias_name": {"unique_id": "macro.dbt.generate_alias_name", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410290.0083551}, "macro.dbt.default__generate_alias_name": {"unique_id": "macro.dbt.default__generate_alias_name", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410290.008969}, "macro.dbt.generate_schema_name": {"unique_id": "macro.dbt.generate_schema_name", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410290.010368}, "macro.dbt.default__generate_schema_name": {"unique_id": "macro.dbt.default__generate_schema_name", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410290.0111518}, "macro.dbt.generate_schema_name_for_env": {"unique_id": "macro.dbt.generate_schema_name_for_env", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410290.012081}, "macro.dbt.generate_database_name": {"unique_id": "macro.dbt.generate_database_name", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410290.0133052}, "macro.dbt.default__generate_database_name": {"unique_id": "macro.dbt.default__generate_database_name", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410290.013921}, "macro.dbt.default__test_relationships": {"unique_id": "macro.dbt.default__test_relationships", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410290.014899}, "macro.dbt.default__test_not_null": {"unique_id": "macro.dbt.default__test_not_null", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410290.015473}, "macro.dbt.default__test_unique": {"unique_id": "macro.dbt.default__test_unique", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410290.016172}, "macro.dbt.default__test_accepted_values": {"unique_id": "macro.dbt.default__test_accepted_values", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410290.017751}, "macro.dbt.statement": {"unique_id": "macro.dbt.statement", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410290.020951}, "macro.dbt.noop_statement": {"unique_id": "macro.dbt.noop_statement", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410290.023063}, "macro.dbt.run_query": {"unique_id": "macro.dbt.run_query", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410290.023922}, "macro.dbt.convert_datetime": {"unique_id": "macro.dbt.convert_datetime", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410290.0276082}, "macro.dbt.dates_in_range": {"unique_id": "macro.dbt.dates_in_range", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410290.0304582}, "macro.dbt.partition_range": {"unique_id": "macro.dbt.partition_range", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410290.032348}, "macro.dbt.py_current_timestring": {"unique_id": "macro.dbt.py_current_timestring", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410290.032949}, "macro.dbt.create_schema": {"unique_id": "macro.dbt.create_schema", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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_bigquery.bigquery__create_schema"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1641410290.033942}, "macro.dbt.default__create_schema": {"unique_id": "macro.dbt.default__create_schema", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410290.034431}, "macro.dbt.drop_schema": {"unique_id": "macro.dbt.drop_schema", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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}, "patch_path": null, "arguments": [], "created_at": 1641410290.034818}, "macro.dbt.default__drop_schema": {"unique_id": "macro.dbt.default__drop_schema", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410290.035257}, "macro.dbt.get_create_index_sql": {"unique_id": "macro.dbt.get_create_index_sql", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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}, "patch_path": null, "arguments": [], "created_at": 1641410290.036381}, "macro.dbt.default__get_create_index_sql": {"unique_id": "macro.dbt.default__get_create_index_sql", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410290.036752}, "macro.dbt.create_indexes": {"unique_id": "macro.dbt.create_indexes", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410290.037125}, "macro.dbt.default__create_indexes": {"unique_id": "macro.dbt.default__create_indexes", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410290.038232}, "macro.dbt.make_temp_relation": {"unique_id": "macro.dbt.make_temp_relation", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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}, "patch_path": null, "arguments": [], "created_at": 1641410290.04164}, "macro.dbt.default__make_temp_relation": {"unique_id": "macro.dbt.default__make_temp_relation", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410290.042367}, "macro.dbt.drop_relation": {"unique_id": "macro.dbt.drop_relation", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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}, "patch_path": null, "arguments": [], "created_at": 1641410290.0428019}, "macro.dbt.default__drop_relation": {"unique_id": "macro.dbt.default__drop_relation", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410290.043498}, "macro.dbt.truncate_relation": {"unique_id": "macro.dbt.truncate_relation", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410290.043942}, "macro.dbt.default__truncate_relation": {"unique_id": "macro.dbt.default__truncate_relation", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410290.044343}, "macro.dbt.rename_relation": {"unique_id": "macro.dbt.rename_relation", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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}, "patch_path": null, "arguments": [], "created_at": 1641410290.04496}, "macro.dbt.default__rename_relation": {"unique_id": "macro.dbt.default__rename_relation", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410290.045631}, "macro.dbt.get_or_create_relation": {"unique_id": "macro.dbt.get_or_create_relation", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410290.0462139}, "macro.dbt.default__get_or_create_relation": {"unique_id": "macro.dbt.default__get_or_create_relation", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410290.047498}, "macro.dbt.load_relation": {"unique_id": "macro.dbt.load_relation", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410290.048028}, "macro.dbt.drop_relation_if_exists": {"unique_id": "macro.dbt.drop_relation_if_exists", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410290.048492}, "macro.dbt.current_timestamp": {"unique_id": "macro.dbt.current_timestamp", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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_utils.bigquery__current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1641410290.04962}, "macro.dbt.default__current_timestamp": {"unique_id": "macro.dbt.default__current_timestamp", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410290.04997}, "macro.dbt.collect_freshness": {"unique_id": "macro.dbt.collect_freshness", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410290.050507}, "macro.dbt.default__collect_freshness": {"unique_id": "macro.dbt.default__collect_freshness", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410290.0517309}, "macro.dbt.alter_column_comment": {"unique_id": "macro.dbt.alter_column_comment", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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}, "patch_path": null, "arguments": [], "created_at": 1641410290.053924}, "macro.dbt.default__alter_column_comment": {"unique_id": "macro.dbt.default__alter_column_comment", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410290.054749}, "macro.dbt.alter_relation_comment": {"unique_id": "macro.dbt.alter_relation_comment", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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}, "patch_path": null, "arguments": [], "created_at": 1641410290.055497}, "macro.dbt.default__alter_relation_comment": {"unique_id": "macro.dbt.default__alter_relation_comment", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410290.055924}, "macro.dbt.persist_docs": {"unique_id": "macro.dbt.persist_docs", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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}, "patch_path": null, "arguments": [], "created_at": 1641410290.056587}, "macro.dbt.default__persist_docs": {"unique_id": "macro.dbt.default__persist_docs", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410290.0577831}, "macro.dbt.get_catalog": {"unique_id": "macro.dbt.get_catalog", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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}, "patch_path": null, "arguments": [], "created_at": 1641410290.060899}, "macro.dbt.default__get_catalog": {"unique_id": "macro.dbt.default__get_catalog", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410290.061522}, "macro.dbt.information_schema_name": {"unique_id": "macro.dbt.information_schema_name", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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}, "patch_path": null, "arguments": [], "created_at": 1641410290.06196}, "macro.dbt.default__information_schema_name": {"unique_id": "macro.dbt.default__information_schema_name", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410290.062339}, "macro.dbt.list_schemas": {"unique_id": "macro.dbt.list_schemas", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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}, "patch_path": null, "arguments": [], "created_at": 1641410290.062773}, "macro.dbt.default__list_schemas": {"unique_id": "macro.dbt.default__list_schemas", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410290.063396}, "macro.dbt.check_schema_exists": {"unique_id": "macro.dbt.check_schema_exists", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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}, "patch_path": null, "arguments": [], "created_at": 1641410290.0638971}, "macro.dbt.default__check_schema_exists": {"unique_id": "macro.dbt.default__check_schema_exists", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410290.0648289}, "macro.dbt.list_relations_without_caching": {"unique_id": "macro.dbt.list_relations_without_caching", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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}, "patch_path": null, "arguments": [], "created_at": 1641410290.0652642}, "macro.dbt.default__list_relations_without_caching": {"unique_id": "macro.dbt.default__list_relations_without_caching", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410290.0656419}, "macro.dbt.get_columns_in_relation": {"unique_id": "macro.dbt.get_columns_in_relation", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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}, "patch_path": null, "arguments": [], "created_at": 1641410290.069033}, "macro.dbt.default__get_columns_in_relation": {"unique_id": "macro.dbt.default__get_columns_in_relation", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410290.069406}, "macro.dbt.sql_convert_columns_in_relation": {"unique_id": "macro.dbt.sql_convert_columns_in_relation", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410290.070136}, "macro.dbt.get_columns_in_query": {"unique_id": "macro.dbt.get_columns_in_query", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410290.0705678}, "macro.dbt.default__get_columns_in_query": {"unique_id": "macro.dbt.default__get_columns_in_query", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410290.071363}, "macro.dbt.alter_column_type": {"unique_id": "macro.dbt.alter_column_type", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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}, "patch_path": null, "arguments": [], "created_at": 1641410290.0719411}, "macro.dbt.default__alter_column_type": {"unique_id": "macro.dbt.default__alter_column_type", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410290.0734699}, "macro.dbt.alter_relation_add_remove_columns": {"unique_id": "macro.dbt.alter_relation_add_remove_columns", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410290.074089}, "macro.dbt.default__alter_relation_add_remove_columns": {"unique_id": "macro.dbt.default__alter_relation_add_remove_columns", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410290.076267}, "macro.dbt.test_unique": {"unique_id": "macro.dbt.test_unique", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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}, "patch_path": null, "arguments": [], "created_at": 1641410290.077686}, "macro.dbt.test_not_null": {"unique_id": "macro.dbt.test_not_null", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410290.078259}, "macro.dbt.test_accepted_values": {"unique_id": "macro.dbt.test_accepted_values", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410290.0789309}, "macro.dbt.test_relationships": {"unique_id": "macro.dbt.test_relationships", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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": 1641410290.079584}, "macro.shopify_source.get_order_columns": {"unique_id": "macro.shopify_source.get_order_columns", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify_source", "path": "macros/staging_columns.sql", "original_file_path": "macros/staging_columns.sql", "name": "get_order_columns", "macro_sql": "{% macro get_order_columns() %}\n\n{% set columns = [\n {\"name\": \"id\", \"datatype\": dbt_utils.type_numeric(), \"alias\": \"order_id\"},\n {\"name\": \"processed_at\", \"datatype\": dbt_utils.type_timestamp(), \"alias\": \"processed_timestamp\"},\n {\"name\": \"updated_at\", \"datatype\": dbt_utils.type_timestamp(), \"alias\": \"updated_timestamp\"},\n {\"name\": \"user_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"total_discounts\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"total_line_items_price\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"total_price\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"total_tax\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"source_name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"subtotal_price\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"taxes_included\", \"datatype\": \"boolean\", \"alias\": \"has_taxes_included\"},\n {\"name\": \"total_weight\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"landing_site_base_url\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"location_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"note\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"number\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"order_number\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"cancel_reason\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"cancelled_at\", \"datatype\": dbt_utils.type_timestamp(), \"alias\": \"cancelled_timestamp\"},\n {\"name\": \"cart_token\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"checkout_token\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"closed_at\", \"datatype\": dbt_utils.type_timestamp(), \"alias\": \"closed_timestamp\"},\n {\"name\": \"created_at\", \"datatype\": dbt_utils.type_timestamp(), \"alias\": \"created_timestamp\"},\n {\"name\": \"currency\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"customer_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"email\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"financial_status\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"fulfillment_status\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"processing_method\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"referring_site\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"billing_address_address_1\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"billing_address_address_2\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"billing_address_city\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"billing_address_company\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"billing_address_country\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"billing_address_country_code\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"billing_address_first_name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"billing_address_last_name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"billing_address_latitude\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"billing_address_longitude\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"billing_address_name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"billing_address_phone\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"billing_address_province\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"billing_address_province_code\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"billing_address_zip\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"browser_ip\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"buyer_accepts_marketing\", \"datatype\": \"boolean\", \"alias\": \"has_buyer_accepted_marketing\"},\n {\"name\": \"total_shipping_price_set\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"shipping_address_address_1\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"shipping_address_address_2\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"shipping_address_city\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"shipping_address_company\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"shipping_address_country\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"shipping_address_country_code\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"shipping_address_first_name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"shipping_address_last_name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"shipping_address_latitude\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"shipping_address_longitude\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"shipping_address_name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"shipping_address_phone\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"shipping_address_province\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"shipping_address_province_code\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"shipping_address_zip\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"test\", \"datatype\": \"boolean\", \"alias\": \"is_test_order\"},\n {\"name\": \"token\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_numeric", "macro.dbt_utils.type_timestamp", "macro.dbt_utils.type_float", "macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1641410290.1130922}, "macro.shopify_source.get_customer_columns": {"unique_id": "macro.shopify_source.get_customer_columns", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify_source", "path": "macros/staging_columns.sql", "original_file_path": "macros/staging_columns.sql", "name": "get_customer_columns", "macro_sql": "{% macro get_customer_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"accepts_marketing\", \"datatype\": \"boolean\", \"alias\": \"has_accepted_marketing\"},\n {\"name\": \"created_at\", \"datatype\": dbt_utils.type_timestamp(), \"alias\": \"created_timestamp\"},\n {\"name\": \"default_address_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"email\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"first_name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"id\", \"datatype\": dbt_utils.type_numeric(), \"alias\": \"customer_id\"},\n {\"name\": \"last_name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"orders_count\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"phone\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"state\", \"datatype\": dbt_utils.type_string(), \"alias\": \"account_state\"},\n {\"name\": \"tax_exempt\", \"datatype\": \"boolean\", \"alias\": \"is_tax_exempt\"},\n {\"name\": \"total_spent\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"updated_at\", \"datatype\": dbt_utils.type_timestamp(), \"alias\": \"updated_timestamp\"},\n {\"name\": \"verified_email\", \"datatype\": \"boolean\", \"alias\": \"is_verified_email\"}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_timestamp", "macro.dbt_utils.type_numeric", "macro.dbt_utils.type_string", "macro.dbt_utils.type_float"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1641410290.117067}, "macro.shopify_source.get_order_line_refund_columns": {"unique_id": "macro.shopify_source.get_order_line_refund_columns", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify_source", "path": "macros/staging_columns.sql", "original_file_path": "macros/staging_columns.sql", "name": "get_order_line_refund_columns", "macro_sql": "{% macro get_order_line_refund_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt_utils.type_numeric(), \"alias\": \"order_line_refund_id\"},\n {\"name\": \"location_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"order_line_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"subtotal\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"total_tax\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"quantity\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"refund_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"restock_type\", \"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_numeric", "macro.dbt_utils.type_float", "macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1641410290.1195798}, "macro.shopify_source.get_order_line_columns": {"unique_id": "macro.shopify_source.get_order_line_columns", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify_source", "path": "macros/staging_columns.sql", "original_file_path": "macros/staging_columns.sql", "name": "get_order_line_columns", "macro_sql": "{% macro get_order_line_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"fulfillable_quantity\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"fulfillment_service\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"fulfillment_status\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"gift_card\", \"datatype\": \"boolean\", \"alias\": \"is_gift_card\"},\n {\"name\": \"grams\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"id\", \"datatype\": dbt_utils.type_numeric(), \"alias\": \"order_line_id\"},\n {\"name\": \"index\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"order_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"pre_tax_price\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"price\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"product_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"property_charge_interval_frequency\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"property_for_shipping_jan_3_rd_2020\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"property_shipping_interval_frequency\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"property_shipping_interval_unit_type\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"property_subscription_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"quantity\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"requires_shipping\", \"datatype\": \"boolean\", \"alias\": \"is_requiring_shipping\"},\n {\"name\": \"sku\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"taxable\", \"datatype\": \"boolean\", \"alias\": \"is_taxable\"},\n {\"name\": \"title\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"total_discount\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"variant_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"vendor\", \"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_numeric", "macro.dbt_utils.type_string", "macro.dbt_utils.type_float"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1641410290.1257422}, "macro.shopify_source.get_product_columns": {"unique_id": "macro.shopify_source.get_product_columns", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify_source", "path": "macros/staging_columns.sql", "original_file_path": "macros/staging_columns.sql", "name": "get_product_columns", "macro_sql": "{% macro get_product_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"created_at\", \"datatype\": dbt_utils.type_timestamp(), \"alias\": \"created_timestamp\"},\n {\"name\": \"handle\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"id\", \"datatype\": dbt_utils.type_numeric(), \"alias\": \"product_id\"},\n {\"name\": \"product_type\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"published_at\", \"datatype\": dbt_utils.type_timestamp(), \"alias\": \"published_timestamp\"},\n {\"name\": \"published_scope\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"title\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"updated_at\", \"datatype\": dbt_utils.type_timestamp(), \"alias\": \"updated_timestamp\"},\n {\"name\": \"vendor\", \"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_numeric"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1641410290.128692}, "macro.shopify_source.get_product_variant_columns": {"unique_id": "macro.shopify_source.get_product_variant_columns", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify_source", "path": "macros/staging_columns.sql", "original_file_path": "macros/staging_columns.sql", "name": "get_product_variant_columns", "macro_sql": "{% macro get_product_variant_columns() %}\n\n{% set columns = [\n {\"name\": \"id\", \"datatype\": dbt_utils.type_numeric(), \"alias\": \"variant_id\"},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"created_at\", \"datatype\": dbt_utils.type_timestamp(), \"alias\": \"created_timestamp\"},\n {\"name\": \"updated_at\", \"datatype\": dbt_utils.type_timestamp(), \"alias\": \"updated_timestamp\"},\n {\"name\": \"product_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"inventory_item_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"image_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"title\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"price\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"sku\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"position\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"inventory_policy\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"compare_at_price\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"fulfillment_service\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"inventory_management\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"taxable\", \"datatype\": \"boolean\", \"alias\": \"is_taxable\"},\n {\"name\": \"barcode\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"grams\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"inventory_quantity\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"weight\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"weight_unit\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"option_1\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"option_2\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"option_3\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"tax_code\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"old_inventory_quantity\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"requires_shipping\", \"datatype\": \"boolean\", \"alias\": \"is_requiring_shipping\"}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_numeric", "macro.dbt_utils.type_timestamp", "macro.dbt_utils.type_string", "macro.dbt_utils.type_float"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1641410290.134419}, "macro.shopify_source.get_transaction_columns": {"unique_id": "macro.shopify_source.get_transaction_columns", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify_source", "path": "macros/staging_columns.sql", "original_file_path": "macros/staging_columns.sql", "name": "get_transaction_columns", "macro_sql": "{% macro get_transaction_columns() %}\n\n{% set columns = [\n {\"name\": \"id\", \"datatype\": dbt_utils.type_numeric(), \"alias\": \"transaction_id\"},\n {\"name\": \"order_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"refund_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"amount\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"created_at\", \"datatype\": dbt_utils.type_timestamp(), \"alias\": \"created_timestamp\"},\n {\"name\": \"processed_at\", \"datatype\": dbt_utils.type_timestamp(), \"alias\": \"processed_timestamp\"},\n {\"name\": \"device_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"gateway\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"source_name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"message\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"currency\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"location_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"parent_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"payment_avs_result_code\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"payment_credit_card_bin\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"payment_cvv_result_code\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"payment_credit_card_number\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"payment_credit_card_company\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"kind\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"receipt\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"currency_exchange_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"currency_exchange_adjustment\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"currency_exchange_original_amount\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"currency_exchange_final_amount\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"currency_exchange_currency\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"error_code\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"status\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"test\", \"datatype\": \"boolean\"},\n {\"name\": \"user_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()}\n] %}\n\n{% if target.type in ('redshift','postgres') %}\n {{ columns.append({\"name\": \"authorization\", \"datatype\": dbt_utils.type_string(), \"quote\": True, \"alias\": \"authorization\"}) }}\n{% else %}\n {\"name\": \"authorization\", \"datatype\": dbt_utils.type_string()}\n{% endif %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_numeric", "macro.dbt_utils.type_timestamp", "macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1641410290.141911}, "macro.shopify_source.get_refund_columns": {"unique_id": "macro.shopify_source.get_refund_columns", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify_source", "path": "macros/staging_columns.sql", "original_file_path": "macros/staging_columns.sql", "name": "get_refund_columns", "macro_sql": "{% macro get_refund_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"created_at\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt_utils.type_numeric(), \"alias\": \"refund_id\"},\n {\"name\": \"note\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"order_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"processed_at\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"restock\", \"datatype\": \"boolean\"},\n {\"name\": \"user_id\", \"datatype\": dbt_utils.type_numeric()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_timestamp", "macro.dbt_utils.type_numeric", "macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1641410290.1439118}, "macro.shopify_source.get_order_adjustment_columns": {"unique_id": "macro.shopify_source.get_order_adjustment_columns", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify_source", "path": "macros/staging_columns.sql", "original_file_path": "macros/staging_columns.sql", "name": "get_order_adjustment_columns", "macro_sql": "{% macro get_order_adjustment_columns() %}\n\n{% set columns = [\n {\"name\": \"id\", \"datatype\": dbt_utils.type_numeric(), \"alias\": \"order_adjustment_id\"},\n {\"name\": \"order_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"refund_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"amount\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"tax_amount\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"kind\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"reason\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_numeric", "macro.dbt_utils.type_float", "macro.dbt_utils.type_string", "macro.dbt_utils.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1641410290.146057}, "macro.dbt_utils.except": {"unique_id": "macro.dbt_utils.except", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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.bigquery__except"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1641410290.16146}, "macro.dbt_utils.default__except": {"unique_id": "macro.dbt_utils.default__except", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.16199}, "macro.dbt_utils.bigquery__except": {"unique_id": "macro.dbt_utils.bigquery__except", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.162387}, "macro.dbt_utils.replace": {"unique_id": "macro.dbt_utils.replace", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.1641011}, "macro.dbt_utils.default__replace": {"unique_id": "macro.dbt_utils.default__replace", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.164848}, "macro.dbt_utils.concat": {"unique_id": "macro.dbt_utils.concat", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.1661708}, "macro.dbt_utils.default__concat": {"unique_id": "macro.dbt_utils.default__concat", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.166635}, "macro.dbt_utils.type_string": {"unique_id": "macro.dbt_utils.type_string", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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.default__type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1641410290.1688268}, "macro.dbt_utils.default__type_string": {"unique_id": "macro.dbt_utils.default__type_string", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.169106}, "macro.dbt_utils.redshift__type_string": {"unique_id": "macro.dbt_utils.redshift__type_string", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.1693718}, "macro.dbt_utils.postgres__type_string": {"unique_id": "macro.dbt_utils.postgres__type_string", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.169635}, "macro.dbt_utils.snowflake__type_string": {"unique_id": "macro.dbt_utils.snowflake__type_string", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.1699}, "macro.dbt_utils.type_timestamp": {"unique_id": "macro.dbt_utils.type_timestamp", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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.default__type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1641410290.17043}, "macro.dbt_utils.default__type_timestamp": {"unique_id": "macro.dbt_utils.default__type_timestamp", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.170658}, "macro.dbt_utils.snowflake__type_timestamp": {"unique_id": "macro.dbt_utils.snowflake__type_timestamp", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.170958}, "macro.dbt_utils.type_float": {"unique_id": "macro.dbt_utils.type_float", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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.bigquery__type_float"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1641410290.171467}, "macro.dbt_utils.default__type_float": {"unique_id": "macro.dbt_utils.default__type_float", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.171701}, "macro.dbt_utils.bigquery__type_float": {"unique_id": "macro.dbt_utils.bigquery__type_float", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.1719239}, "macro.dbt_utils.type_numeric": {"unique_id": "macro.dbt_utils.type_numeric", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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.bigquery__type_numeric"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1641410290.172401}, "macro.dbt_utils.default__type_numeric": {"unique_id": "macro.dbt_utils.default__type_numeric", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.172627}, "macro.dbt_utils.bigquery__type_numeric": {"unique_id": "macro.dbt_utils.bigquery__type_numeric", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.172844}, "macro.dbt_utils.type_bigint": {"unique_id": "macro.dbt_utils.type_bigint", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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.bigquery__type_bigint"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1641410290.1734972}, "macro.dbt_utils.default__type_bigint": {"unique_id": "macro.dbt_utils.default__type_bigint", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.173724}, "macro.dbt_utils.bigquery__type_bigint": {"unique_id": "macro.dbt_utils.bigquery__type_bigint", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.173941}, "macro.dbt_utils.type_int": {"unique_id": "macro.dbt_utils.type_int", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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.bigquery__type_int"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1641410290.1744099}, "macro.dbt_utils.default__type_int": {"unique_id": "macro.dbt_utils.default__type_int", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.1746309}, "macro.dbt_utils.bigquery__type_int": {"unique_id": "macro.dbt_utils.bigquery__type_int", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.174849}, "macro.dbt_utils._is_relation": {"unique_id": "macro.dbt_utils._is_relation", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.176197}, "macro.dbt_utils.length": {"unique_id": "macro.dbt_utils.length", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.177088}, "macro.dbt_utils.default__length": {"unique_id": "macro.dbt_utils.default__length", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.17737}, "macro.dbt_utils.redshift__length": {"unique_id": "macro.dbt_utils.redshift__length", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.17764}, "macro.dbt_utils.dateadd": {"unique_id": "macro.dbt_utils.dateadd", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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.bigquery__dateadd"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1641410290.179026}, "macro.dbt_utils.default__dateadd": {"unique_id": "macro.dbt_utils.default__dateadd", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.179473}, "macro.dbt_utils.bigquery__dateadd": {"unique_id": "macro.dbt_utils.bigquery__dateadd", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.1799061}, "macro.dbt_utils.postgres__dateadd": {"unique_id": "macro.dbt_utils.postgres__dateadd", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.180326}, "macro.dbt_utils.redshift__dateadd": {"unique_id": "macro.dbt_utils.redshift__dateadd", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.180825}, "macro.dbt_utils.intersect": {"unique_id": "macro.dbt_utils.intersect", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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.bigquery__intersect"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1641410290.181698}, "macro.dbt_utils.default__intersect": {"unique_id": "macro.dbt_utils.default__intersect", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.181887}, "macro.dbt_utils.bigquery__intersect": {"unique_id": "macro.dbt_utils.bigquery__intersect", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.182071}, "macro.dbt_utils.right": {"unique_id": "macro.dbt_utils.right", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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.bigquery__right"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1641410290.183298}, "macro.dbt_utils.default__right": {"unique_id": "macro.dbt_utils.default__right", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.183622}, "macro.dbt_utils.bigquery__right": {"unique_id": "macro.dbt_utils.bigquery__right", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.184014}, "macro.dbt_utils.snowflake__right": {"unique_id": "macro.dbt_utils.snowflake__right", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.184461}, "macro.dbt_utils.datediff": {"unique_id": "macro.dbt_utils.datediff", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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.bigquery__datediff"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1641410290.190489}, "macro.dbt_utils.default__datediff": {"unique_id": "macro.dbt_utils.default__datediff", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.190957}, "macro.dbt_utils.bigquery__datediff": {"unique_id": "macro.dbt_utils.bigquery__datediff", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.191336}, "macro.dbt_utils.postgres__datediff": {"unique_id": "macro.dbt_utils.postgres__datediff", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.196191}, "macro.dbt_utils.redshift__datediff": {"unique_id": "macro.dbt_utils.redshift__datediff", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.1966999}, "macro.dbt_utils.safe_cast": {"unique_id": "macro.dbt_utils.safe_cast", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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.bigquery__safe_cast"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1641410290.197718}, "macro.dbt_utils.default__safe_cast": {"unique_id": "macro.dbt_utils.default__safe_cast", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.198055}, "macro.dbt_utils.snowflake__safe_cast": {"unique_id": "macro.dbt_utils.snowflake__safe_cast", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.198368}, "macro.dbt_utils.bigquery__safe_cast": {"unique_id": "macro.dbt_utils.bigquery__safe_cast", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.1986802}, "macro.dbt_utils.hash": {"unique_id": "macro.dbt_utils.hash", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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.bigquery__hash"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1641410290.199483}, "macro.dbt_utils.default__hash": {"unique_id": "macro.dbt_utils.default__hash", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.199819}, "macro.dbt_utils.bigquery__hash": {"unique_id": "macro.dbt_utils.bigquery__hash", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.2001312}, "macro.dbt_utils.cast_bool_to_text": {"unique_id": "macro.dbt_utils.cast_bool_to_text", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.201031}, "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/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.2013729}, "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/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.2016761}, "macro.dbt_utils.identifier": {"unique_id": "macro.dbt_utils.identifier", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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.bigquery__identifier"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1641410290.202928}, "macro.dbt_utils.default__identifier": {"unique_id": "macro.dbt_utils.default__identifier", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.2032378}, "macro.dbt_utils.bigquery__identifier": {"unique_id": "macro.dbt_utils.bigquery__identifier", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.203486}, "macro.dbt_utils.position": {"unique_id": "macro.dbt_utils.position", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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.bigquery__position"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1641410290.2043982}, "macro.dbt_utils.default__position": {"unique_id": "macro.dbt_utils.default__position", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.204716}, "macro.dbt_utils.bigquery__position": {"unique_id": "macro.dbt_utils.bigquery__position", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.205034}, "macro.dbt_utils.string_literal": {"unique_id": "macro.dbt_utils.string_literal", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.205838}, "macro.dbt_utils.default__string_literal": {"unique_id": "macro.dbt_utils.default__string_literal", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.20609}, "macro.dbt_utils.current_timestamp": {"unique_id": "macro.dbt_utils.current_timestamp", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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.bigquery__current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1641410290.207337}, "macro.dbt_utils.default__current_timestamp": {"unique_id": "macro.dbt_utils.default__current_timestamp", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.2076101}, "macro.dbt_utils.redshift__current_timestamp": {"unique_id": "macro.dbt_utils.redshift__current_timestamp", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.207788}, "macro.dbt_utils.bigquery__current_timestamp": {"unique_id": "macro.dbt_utils.bigquery__current_timestamp", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.207962}, "macro.dbt_utils.current_timestamp_in_utc": {"unique_id": "macro.dbt_utils.current_timestamp_in_utc", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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.default__current_timestamp_in_utc"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1641410290.2087219}, "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/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.209059}, "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/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.209402}, "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/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.209665}, "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/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.209971}, "macro.dbt_utils.width_bucket": {"unique_id": "macro.dbt_utils.width_bucket", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.2127302}, "macro.dbt_utils.default__width_bucket": {"unique_id": "macro.dbt_utils.default__width_bucket", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.21388}, "macro.dbt_utils.redshift__width_bucket": {"unique_id": "macro.dbt_utils.redshift__width_bucket", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.214966}, "macro.dbt_utils.snowflake__width_bucket": {"unique_id": "macro.dbt_utils.snowflake__width_bucket", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.2155101}, "macro.dbt_utils.last_day": {"unique_id": "macro.dbt_utils.last_day", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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.default__last_day"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1641410290.216824}, "macro.dbt_utils.default_last_day": {"unique_id": "macro.dbt_utils.default_last_day", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.217449}, "macro.dbt_utils.default__last_day": {"unique_id": "macro.dbt_utils.default__last_day", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.217803}, "macro.dbt_utils.postgres__last_day": {"unique_id": "macro.dbt_utils.postgres__last_day", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.21873}, "macro.dbt_utils.redshift__last_day": {"unique_id": "macro.dbt_utils.redshift__last_day", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.21915}, "macro.dbt_utils.split_part": {"unique_id": "macro.dbt_utils.split_part", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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.bigquery__split_part"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1641410290.220495}, "macro.dbt_utils.default__split_part": {"unique_id": "macro.dbt_utils.default__split_part", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.220901}, "macro.dbt_utils.bigquery__split_part": {"unique_id": "macro.dbt_utils.bigquery__split_part", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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 split(\n {{ string_text }},\n {{ delimiter_text }}\n )[safe_offset({{ part_number - 1 }})]\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1641410290.221329}, "macro.dbt_utils.date_trunc": {"unique_id": "macro.dbt_utils.date_trunc", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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.bigquery__date_trunc"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1641410290.222244}, "macro.dbt_utils.default__date_trunc": {"unique_id": "macro.dbt_utils.default__date_trunc", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.222569}, "macro.dbt_utils.bigquery__date_trunc": {"unique_id": "macro.dbt_utils.bigquery__date_trunc", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.222889}, "macro.dbt_utils._is_ephemeral": {"unique_id": "macro.dbt_utils._is_ephemeral", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.2249758}, "macro.dbt_utils.get_period_boundaries": {"unique_id": "macro.dbt_utils.get_period_boundaries", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.236463}, "macro.dbt_utils.default__get_period_boundaries": {"unique_id": "macro.dbt_utils.default__get_period_boundaries", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.2378418}, "macro.dbt_utils.get_period_sql": {"unique_id": "macro.dbt_utils.get_period_sql", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.238687}, "macro.dbt_utils.default__get_period_sql": {"unique_id": "macro.dbt_utils.default__get_period_sql", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.239894}, "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/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.252428}, "macro.dbt_utils.get_url_host": {"unique_id": "macro.dbt_utils.get_url_host", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.254454}, "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/Documents/github_repos/jamie_dbt_dev/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": 1641410290.255599}, "macro.dbt_utils.get_url_path": {"unique_id": "macro.dbt_utils.get_url_path", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.256938}, "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/Documents/github_repos/jamie_dbt_dev/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": 1641410290.258603}, "macro.dbt_utils.get_url_parameter": {"unique_id": "macro.dbt_utils.get_url_parameter", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.2594812}, "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/Documents/github_repos/jamie_dbt_dev/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": 1641410290.260216}, "macro.dbt_utils.pretty_log_format": {"unique_id": "macro.dbt_utils.pretty_log_format", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.2610219}, "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/Documents/github_repos/jamie_dbt_dev/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": 1641410290.261405}, "macro.dbt_utils.pretty_time": {"unique_id": "macro.dbt_utils.pretty_time", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.262152}, "macro.dbt_utils.default__pretty_time": {"unique_id": "macro.dbt_utils.default__pretty_time", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.2627351}, "macro.dbt_utils.log_info": {"unique_id": "macro.dbt_utils.log_info", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.263466}, "macro.dbt_utils.default__log_info": {"unique_id": "macro.dbt_utils.default__log_info", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.2638779}, "macro.dbt_utils.slugify": {"unique_id": "macro.dbt_utils.slugify", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.265097}, "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/Documents/github_repos/jamie_dbt_dev/dbt_packages/dbt_utils", "path": "macros/schema_tests/fewer_rows_than.sql", "original_file_path": "macros/schema_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": 1641410290.266342}, "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/Documents/github_repos/jamie_dbt_dev/dbt_packages/dbt_utils", "path": "macros/schema_tests/fewer_rows_than.sql", "original_file_path": "macros/schema_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": 1641410290.2669098}, "macro.dbt_utils.test_equal_rowcount": {"unique_id": "macro.dbt_utils.test_equal_rowcount", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/dbt_utils", "path": "macros/schema_tests/equal_rowcount.sql", "original_file_path": "macros/schema_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": 1641410290.267912}, "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/Documents/github_repos/jamie_dbt_dev/dbt_packages/dbt_utils", "path": "macros/schema_tests/equal_rowcount.sql", "original_file_path": "macros/schema_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": 1641410290.268615}, "macro.dbt_utils.test_relationships_where": {"unique_id": "macro.dbt_utils.test_relationships_where", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/dbt_utils", "path": "macros/schema_tests/relationships_where.sql", "original_file_path": "macros/schema_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": 1641410290.27007}, "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/Documents/github_repos/jamie_dbt_dev/dbt_packages/dbt_utils", "path": "macros/schema_tests/relationships_where.sql", "original_file_path": "macros/schema_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": 1641410290.2709079}, "macro.dbt_utils.test_recency": {"unique_id": "macro.dbt_utils.test_recency", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/dbt_utils", "path": "macros/schema_tests/recency.sql", "original_file_path": "macros/schema_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": 1641410290.271927}, "macro.dbt_utils.default__test_recency": {"unique_id": "macro.dbt_utils.default__test_recency", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/dbt_utils", "path": "macros/schema_tests/recency.sql", "original_file_path": "macros/schema_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": 1641410290.272884}, "macro.dbt_utils.test_not_constant": {"unique_id": "macro.dbt_utils.test_not_constant", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/dbt_utils", "path": "macros/schema_tests/not_constant.sql", "original_file_path": "macros/schema_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": 1641410290.273738}, "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/Documents/github_repos/jamie_dbt_dev/dbt_packages/dbt_utils", "path": "macros/schema_tests/not_constant.sql", "original_file_path": "macros/schema_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": 1641410290.274152}, "macro.dbt_utils.test_accepted_range": {"unique_id": "macro.dbt_utils.test_accepted_range", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/dbt_utils", "path": "macros/schema_tests/accepted_range.sql", "original_file_path": "macros/schema_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": 1641410290.2756999}, "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/Documents/github_repos/jamie_dbt_dev/dbt_packages/dbt_utils", "path": "macros/schema_tests/accepted_range.sql", "original_file_path": "macros/schema_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": 1641410290.2768269}, "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/Documents/github_repos/jamie_dbt_dev/dbt_packages/dbt_utils", "path": "macros/schema_tests/not_accepted_values.sql", "original_file_path": "macros/schema_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": 1641410290.278316}, "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/Documents/github_repos/jamie_dbt_dev/dbt_packages/dbt_utils", "path": "macros/schema_tests/not_accepted_values.sql", "original_file_path": "macros/schema_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": 1641410290.279231}, "macro.dbt_utils.test_unique_where": {"unique_id": "macro.dbt_utils.test_unique_where", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/dbt_utils", "path": "macros/schema_tests/test_unique_where.sql", "original_file_path": "macros/schema_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": 1641410290.280315}, "macro.dbt_utils.default__test_unique_where": {"unique_id": "macro.dbt_utils.default__test_unique_where", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/dbt_utils", "path": "macros/schema_tests/test_unique_where.sql", "original_file_path": "macros/schema_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": 1641410290.280714}, "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/Documents/github_repos/jamie_dbt_dev/dbt_packages/dbt_utils", "path": "macros/schema_tests/at_least_one.sql", "original_file_path": "macros/schema_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": 1641410290.281588}, "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/Documents/github_repos/jamie_dbt_dev/dbt_packages/dbt_utils", "path": "macros/schema_tests/at_least_one.sql", "original_file_path": "macros/schema_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": 1641410290.282015}, "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/Documents/github_repos/jamie_dbt_dev/dbt_packages/dbt_utils", "path": "macros/schema_tests/unique_combination_of_columns.sql", "original_file_path": "macros/schema_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": 1641410290.283485}, "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/Documents/github_repos/jamie_dbt_dev/dbt_packages/dbt_utils", "path": "macros/schema_tests/unique_combination_of_columns.sql", "original_file_path": "macros/schema_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": 1641410290.2851892}, "macro.dbt_utils.test_cardinality_equality": {"unique_id": "macro.dbt_utils.test_cardinality_equality", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/dbt_utils", "path": "macros/schema_tests/cardinality_equality.sql", "original_file_path": "macros/schema_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": 1641410290.286606}, "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/Documents/github_repos/jamie_dbt_dev/dbt_packages/dbt_utils", "path": "macros/schema_tests/cardinality_equality.sql", "original_file_path": "macros/schema_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": 1641410290.2878258}, "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/Documents/github_repos/jamie_dbt_dev/dbt_packages/dbt_utils", "path": "macros/schema_tests/expression_is_true.sql", "original_file_path": "macros/schema_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": 1641410290.289289}, "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/Documents/github_repos/jamie_dbt_dev/dbt_packages/dbt_utils", "path": "macros/schema_tests/expression_is_true.sql", "original_file_path": "macros/schema_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": 1641410290.29}, "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/Documents/github_repos/jamie_dbt_dev/dbt_packages/dbt_utils", "path": "macros/schema_tests/not_null_proportion.sql", "original_file_path": "macros/schema_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": 1641410290.291357}, "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/Documents/github_repos/jamie_dbt_dev/dbt_packages/dbt_utils", "path": "macros/schema_tests/not_null_proportion.sql", "original_file_path": "macros/schema_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": 1641410290.292922}, "macro.dbt_utils.test_sequential_values": {"unique_id": "macro.dbt_utils.test_sequential_values", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/dbt_utils", "path": "macros/schema_tests/sequential_values.sql", "original_file_path": "macros/schema_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": 1641410290.294545}, "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/Documents/github_repos/jamie_dbt_dev/dbt_packages/dbt_utils", "path": "macros/schema_tests/sequential_values.sql", "original_file_path": "macros/schema_tests/sequential_values.sql", "name": "default__test_sequential_values", "macro_sql": "{% macro default__test_sequential_values(model, column_name, interval=1, datepart=None) %}\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.type_timestamp", "macro.dbt_utils.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1641410290.2960372}, "macro.dbt_utils.test_not_null_where": {"unique_id": "macro.dbt_utils.test_not_null_where", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/dbt_utils", "path": "macros/schema_tests/test_not_null_where.sql", "original_file_path": "macros/schema_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": 1641410290.297135}, "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/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/dbt_utils", "path": "macros/schema_tests/test_not_null_where.sql", "original_file_path": "macros/schema_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": 1641410290.297528}, "macro.dbt_utils.test_equality": {"unique_id": "macro.dbt_utils.test_equality", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/dbt_utils", "path": "macros/schema_tests/equality.sql", "original_file_path": "macros/schema_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": 1641410290.299198}, "macro.dbt_utils.default__test_equality": {"unique_id": "macro.dbt_utils.default__test_equality", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/dbt_utils", "path": "macros/schema_tests/equality.sql", "original_file_path": "macros/schema_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": 1641410290.301325}, "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/Documents/github_repos/jamie_dbt_dev/dbt_packages/dbt_utils", "path": "macros/schema_tests/mutually_exclusive_ranges.sql", "original_file_path": "macros/schema_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": 1641410290.3070579}, "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/Documents/github_repos/jamie_dbt_dev/dbt_packages/dbt_utils", "path": "macros/schema_tests/mutually_exclusive_ranges.sql", "original_file_path": "macros/schema_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": 1641410290.310785}, "macro.dbt_utils.get_intervals_between": {"unique_id": "macro.dbt_utils.get_intervals_between", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.312902}, "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/Documents/github_repos/jamie_dbt_dev/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": 1641410290.314385}, "macro.dbt_utils.date_spine": {"unique_id": "macro.dbt_utils.date_spine", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.314931}, "macro.dbt_utils.default__date_spine": {"unique_id": "macro.dbt_utils.default__date_spine", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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/*\ncall 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*/\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": 1641410290.315808}, "macro.dbt_utils.nullcheck_table": {"unique_id": "macro.dbt_utils.nullcheck_table", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.3168159}, "macro.dbt_utils.default__nullcheck_table": {"unique_id": "macro.dbt_utils.default__nullcheck_table", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.317636}, "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/Documents/github_repos/jamie_dbt_dev/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": 1641410290.319255}, "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/Documents/github_repos/jamie_dbt_dev/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": 1641410290.322175}, "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/Documents/github_repos/jamie_dbt_dev/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": 1641410290.324069}, "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/Documents/github_repos/jamie_dbt_dev/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": 1641410290.325063}, "macro.dbt_utils.generate_series": {"unique_id": "macro.dbt_utils.generate_series", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.325509}, "macro.dbt_utils.default__generate_series": {"unique_id": "macro.dbt_utils.default__generate_series", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.3267279}, "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/Documents/github_repos/jamie_dbt_dev/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": 1641410290.3283358}, "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/Documents/github_repos/jamie_dbt_dev/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": 1641410290.330457}, "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/Documents/github_repos/jamie_dbt_dev/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": 1641410290.331757}, "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/Documents/github_repos/jamie_dbt_dev/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": 1641410290.332414}, "macro.dbt_utils.star": {"unique_id": "macro.dbt_utils.star", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.334086}, "macro.dbt_utils.default__star": {"unique_id": "macro.dbt_utils.default__star", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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 include_cols = [] %}\n {%- set cols = adapter.get_columns_in_relation(from) -%}\n {%- set except = except | map(\"lower\") | list %}\n {%- for col in cols -%}\n\n {%- if col.column|lower not in except -%}\n {% do include_cols.append(col.column) %}\n\n {%- endif %}\n {%- endfor %}\n\n {%- for col in include_cols %}\n\n {%- if relation_alias %}{{ relation_alias }}.{% else %}{%- endif -%}{{ adapter.quote(col)|trim }} as {{ adapter.quote(prefix ~ col ~ suffix)|trim }}\n {%- if not loop.last %},{{ '\\n ' }}{% endif %}\n\n {%- endfor -%}\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": 1641410290.336694}, "macro.dbt_utils.unpivot": {"unique_id": "macro.dbt_utils.unpivot", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.3406131}, "macro.dbt_utils.default__unpivot": {"unique_id": "macro.dbt_utils.default__unpivot", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.346497}, "macro.dbt_utils.union_relations": {"unique_id": "macro.dbt_utils.union_relations", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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') -%}\n {{ return(adapter.dispatch('union_relations', 'dbt_utils')(relations, column_override, include, exclude, source_column_name)) }}\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": 1641410290.349809}, "macro.dbt_utils.default__union_relations": {"unique_id": "macro.dbt_utils.default__union_relations", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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') -%}\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\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\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": 1641410290.357002}, "macro.dbt_utils.group_by": {"unique_id": "macro.dbt_utils.group_by", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.357975}, "macro.dbt_utils.default__group_by": {"unique_id": "macro.dbt_utils.default__group_by", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.358565}, "macro.dbt_utils.surrogate_key": {"unique_id": "macro.dbt_utils.surrogate_key", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.35994}, "macro.dbt_utils.default__surrogate_key": {"unique_id": "macro.dbt_utils.default__surrogate_key", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.362085}, "macro.dbt_utils.safe_add": {"unique_id": "macro.dbt_utils.safe_add", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.3632052}, "macro.dbt_utils.default__safe_add": {"unique_id": "macro.dbt_utils.default__safe_add", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.363886}, "macro.dbt_utils.nullcheck": {"unique_id": "macro.dbt_utils.nullcheck", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.364782}, "macro.dbt_utils.default__nullcheck": {"unique_id": "macro.dbt_utils.default__nullcheck", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.365561}, "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/Documents/github_repos/jamie_dbt_dev/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}, "patch_path": null, "arguments": [], "created_at": 1641410290.368795}, "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/Documents/github_repos/jamie_dbt_dev/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 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 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": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1641410290.369372}, "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/Documents/github_repos/jamie_dbt_dev/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 case table_type\n when 'BASE TABLE' then 'table'\n else lower(table_type)\n end as table_type\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"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1641410290.3710861}, "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/Documents/github_repos/jamie_dbt_dev/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": 1641410290.3722801}, "macro.dbt_utils.get_column_values": {"unique_id": "macro.dbt_utils.get_column_values", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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) -%}\n {{ return(adapter.dispatch('get_column_values', 'dbt_utils')(table, column, order_by, max_records, default)) }}\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": 1641410290.374788}, "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/Documents/github_repos/jamie_dbt_dev/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) -%}\n{% if default is none %}\n {% set default = [] %}\n{% endif %}\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(default) }}\n {% endif %}\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 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.load_relation", "macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1641410290.378766}, "macro.dbt_utils.pivot": {"unique_id": "macro.dbt_utils.pivot", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.3811882}, "macro.dbt_utils.default__pivot": {"unique_id": "macro.dbt_utils.default__pivot", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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 v in values %}\n {{ agg }}(\n {% if distinct %} distinct {% endif %}\n case\n when {{ column }} {{ cmp }} '{{ v }}'\n then {{ then_value }}\n else {{ else_value }}\n end\n )\n {% if alias %}\n {% if quote_identifiers %}\n as {{ adapter.quote(prefix ~ v ~ suffix) }}\n {% else %}\n as {{ dbt_utils.slugify(prefix ~ v ~ 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.slugify"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1641410290.38316}, "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/Documents/github_repos/jamie_dbt_dev/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": 1641410290.384595}, "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/Documents/github_repos/jamie_dbt_dev/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": 1641410290.386614}, "macro.dbt_utils.degrees_to_radians": {"unique_id": "macro.dbt_utils.degrees_to_radians", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.389164}, "macro.dbt_utils.haversine_distance": {"unique_id": "macro.dbt_utils.haversine_distance", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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}, "patch_path": null, "arguments": [], "created_at": 1641410290.390702}, "macro.dbt_utils.default__haversine_distance": {"unique_id": "macro.dbt_utils.default__haversine_distance", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.392464}, "macro.dbt_utils.bigquery__haversine_distance": {"unique_id": "macro.dbt_utils.bigquery__haversine_distance", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.394729}, "macro.klaviyo_source.get_campaign_columns": {"unique_id": "macro.klaviyo_source.get_campaign_columns", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/klaviyo_source", "path": "macros/get_campaign_columns.sql", "original_file_path": "macros/get_campaign_columns.sql", "name": "get_campaign_columns", "macro_sql": "{% macro get_campaign_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"campaign_type\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"created\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"email_template_id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"from_email\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"from_name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"is_segmented\", \"datatype\": \"boolean\"},\n {\"name\": \"name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"send_time\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"sent_at\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"status\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"status_id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"status_label\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"subject\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"updated\", \"datatype\": dbt_utils.type_timestamp()}\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"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1641410290.399913}, "macro.klaviyo_source.get_metric_columns": {"unique_id": "macro.klaviyo_source.get_metric_columns", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/klaviyo_source", "path": "macros/get_metric_columns.sql", "original_file_path": "macros/get_metric_columns.sql", "name": "get_metric_columns", "macro_sql": "{% macro get_metric_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"created\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"integration_id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"updated\", \"datatype\": dbt_utils.type_timestamp()}\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"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1641410290.402831}, "macro.klaviyo_source.get_flow_columns": {"unique_id": "macro.klaviyo_source.get_flow_columns", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/klaviyo_source", "path": "macros/get_flow_columns.sql", "original_file_path": "macros/get_flow_columns.sql", "name": "get_flow_columns", "macro_sql": "{% macro get_flow_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"created\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"status\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"trigger\", \"datatype\": dbt_utils.type_string(), \"quote\": True},\n {\"name\": \"updated\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"customer_filter\", \"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"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1641410290.405867}, "macro.klaviyo_source.get_integration_columns": {"unique_id": "macro.klaviyo_source.get_integration_columns", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/klaviyo_source", "path": "macros/get_integration_columns.sql", "original_file_path": "macros/get_integration_columns.sql", "name": "get_integration_columns", "macro_sql": "{% macro get_integration_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"category\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"name\", \"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"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1641410290.407844}, "macro.klaviyo_source.get_person_columns": {"unique_id": "macro.klaviyo_source.get_person_columns", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/klaviyo_source", "path": "macros/get_person_columns.sql", "original_file_path": "macros/get_person_columns.sql", "name": "get_person_columns", "macro_sql": "{% macro get_person_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"address_1\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"address_2\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"city\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"country\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"created\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"email\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"first_name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"last_name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"latitude\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"longitude\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"organization\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"phone_number\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"region\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"timezone\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"title\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"updated\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"zip\", \"datatype\": dbt_utils.type_string()}\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('klaviyo__person_pass_through_columns')) }}\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_float", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1641410290.4142878}, "macro.klaviyo_source.get_event_columns": {"unique_id": "macro.klaviyo_source.get_event_columns", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/klaviyo_source", "path": "macros/get_event_columns.sql", "original_file_path": "macros/get_event_columns.sql", "name": "get_event_columns", "macro_sql": "{% macro get_event_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"_variation\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"campaign_id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"datetime\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"flow_id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"flow_message_id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"metric_id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"person_id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"timestamp\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"type\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"uuid\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"property_value\", \"datatype\": dbt_utils.type_string()}\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('klaviyo__event_pass_through_columns')) }}\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.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1641410290.418644}, "macro.spark_utils.get_tables": {"unique_id": "macro.spark_utils.get_tables", "package_name": "spark_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.429746}, "macro.spark_utils.get_delta_tables": {"unique_id": "macro.spark_utils.get_delta_tables", "package_name": "spark_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.4314291}, "macro.spark_utils.get_statistic_columns": {"unique_id": "macro.spark_utils.get_statistic_columns", "package_name": "spark_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.433564}, "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/Documents/github_repos/jamie_dbt_dev/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": 1641410290.435324}, "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/Documents/github_repos/jamie_dbt_dev/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": 1641410290.4371269}, "macro.spark_utils.spark_analyze_tables": {"unique_id": "macro.spark_utils.spark_analyze_tables", "package_name": "spark_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.439413}, "macro.spark_utils.spark__concat": {"unique_id": "macro.spark_utils.spark__concat", "package_name": "spark_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.440078}, "macro.spark_utils.spark__type_numeric": {"unique_id": "macro.spark_utils.spark__type_numeric", "package_name": "spark_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.4405088}, "macro.spark_utils.spark__dateadd": {"unique_id": "macro.spark_utils.spark__dateadd", "package_name": "spark_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.446795}, "macro.spark_utils.spark__datediff": {"unique_id": "macro.spark_utils.spark__datediff", "package_name": "spark_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.461977}, "macro.spark_utils.spark__current_timestamp": {"unique_id": "macro.spark_utils.spark__current_timestamp", "package_name": "spark_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.462516}, "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/Documents/github_repos/jamie_dbt_dev/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": 1641410290.462703}, "macro.spark_utils.spark__split_part": {"unique_id": "macro.spark_utils.spark__split_part", "package_name": "spark_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.464098}, "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/Documents/github_repos/jamie_dbt_dev/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": 1641410290.467652}, "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/Documents/github_repos/jamie_dbt_dev/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": 1641410290.468427}, "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/Documents/github_repos/jamie_dbt_dev/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": 1641410290.4690619}, "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/Documents/github_repos/jamie_dbt_dev/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": 1641410290.469836}, "macro.spark_utils.assert_not_null": {"unique_id": "macro.spark_utils.assert_not_null", "package_name": "spark_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.47072}, "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/Documents/github_repos/jamie_dbt_dev/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": 1641410290.471209}, "macro.spark_utils.spark__convert_timezone": {"unique_id": "macro.spark_utils.spark__convert_timezone", "package_name": "spark_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.471884}, "macro.fivetran_utils.enabled_vars": {"unique_id": "macro.fivetran_utils.enabled_vars", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.472944}, "macro.fivetran_utils.percentile": {"unique_id": "macro.fivetran_utils.percentile", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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}, "patch_path": null, "arguments": [], "created_at": 1641410290.47489}, "macro.fivetran_utils.default__percentile": {"unique_id": "macro.fivetran_utils.default__percentile", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.475296}, "macro.fivetran_utils.redshift__percentile": {"unique_id": "macro.fivetran_utils.redshift__percentile", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.475683}, "macro.fivetran_utils.bigquery__percentile": {"unique_id": "macro.fivetran_utils.bigquery__percentile", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.476066}, "macro.fivetran_utils.postgres__percentile": {"unique_id": "macro.fivetran_utils.postgres__percentile", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.476445}, "macro.fivetran_utils.spark__percentile": {"unique_id": "macro.fivetran_utils.spark__percentile", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.4768279}, "macro.fivetran_utils.pivot_json_extract": {"unique_id": "macro.fivetran_utils.pivot_json_extract", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.478036}, "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/Documents/github_repos/jamie_dbt_dev/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) %}\n\n{% if var(pass_through_variable, none) %}\n {% for field in var(pass_through_variable) %}\n , {{ 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": 1641410290.479042}, "macro.fivetran_utils.json_parse": {"unique_id": "macro.fivetran_utils.json_parse", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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}, "patch_path": null, "arguments": [], "created_at": 1641410290.481514}, "macro.fivetran_utils.default__json_parse": {"unique_id": "macro.fivetran_utils.default__json_parse", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.48223}, "macro.fivetran_utils.redshift__json_parse": {"unique_id": "macro.fivetran_utils.redshift__json_parse", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.482847}, "macro.fivetran_utils.bigquery__json_parse": {"unique_id": "macro.fivetran_utils.bigquery__json_parse", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.48352}, "macro.fivetran_utils.postgres__json_parse": {"unique_id": "macro.fivetran_utils.postgres__json_parse", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.484115}, "macro.fivetran_utils.snowflake__json_parse": {"unique_id": "macro.fivetran_utils.snowflake__json_parse", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.484737}, "macro.fivetran_utils.spark__json_parse": {"unique_id": "macro.fivetran_utils.spark__json_parse", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.485659}, "macro.fivetran_utils.max_bool": {"unique_id": "macro.fivetran_utils.max_bool", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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}, "patch_path": null, "arguments": [], "created_at": 1641410290.487422}, "macro.fivetran_utils.default__max_bool": {"unique_id": "macro.fivetran_utils.default__max_bool", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.487905}, "macro.fivetran_utils.snowflake__max_bool": {"unique_id": "macro.fivetran_utils.snowflake__max_bool", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.488168}, "macro.fivetran_utils.bigquery__max_bool": {"unique_id": "macro.fivetran_utils.bigquery__max_bool", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.488414}, "macro.fivetran_utils.calculated_fields": {"unique_id": "macro.fivetran_utils.calculated_fields", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.4894762}, "macro.fivetran_utils.seed_data_helper": {"unique_id": "macro.fivetran_utils.seed_data_helper", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.491138}, "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/Documents/github_repos/jamie_dbt_dev/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": 1641410290.492894}, "macro.fivetran_utils.string_agg": {"unique_id": "macro.fivetran_utils.string_agg", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.494038}, "macro.fivetran_utils.default__string_agg": {"unique_id": "macro.fivetran_utils.default__string_agg", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.494364}, "macro.fivetran_utils.snowflake__string_agg": {"unique_id": "macro.fivetran_utils.snowflake__string_agg", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.4948359}, "macro.fivetran_utils.redshift__string_agg": {"unique_id": "macro.fivetran_utils.redshift__string_agg", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.495171}, "macro.fivetran_utils.spark__string_agg": {"unique_id": "macro.fivetran_utils.spark__string_agg", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.4955032}, "macro.fivetran_utils.timestamp_diff": {"unique_id": "macro.fivetran_utils.timestamp_diff", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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}, "patch_path": null, "arguments": [], "created_at": 1641410290.502058}, "macro.fivetran_utils.default__timestamp_diff": {"unique_id": "macro.fivetran_utils.default__timestamp_diff", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.5024729}, "macro.fivetran_utils.redshift__timestamp_diff": {"unique_id": "macro.fivetran_utils.redshift__timestamp_diff", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.502858}, "macro.fivetran_utils.bigquery__timestamp_diff": {"unique_id": "macro.fivetran_utils.bigquery__timestamp_diff", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.503236}, "macro.fivetran_utils.postgres__timestamp_diff": {"unique_id": "macro.fivetran_utils.postgres__timestamp_diff", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.507628}, "macro.fivetran_utils.generate_columns_macro": {"unique_id": "macro.fivetran_utils.generate_columns_macro", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/fivetran_utils", "path": "macros/generate_columns_macro.sql", "original_file_path": "macros/generate_columns_macro.sql", "name": "generate_columns_macro", "macro_sql": "{% macro generate_columns_macro(table_name, schema_name, database_name=target.database) %}\n\n{% set columns = get_columns_for_macro(table_name, schema_name, database_name) %}\n\n{% set jinja_macro=[] %}\n\n{% do jinja_macro.append('{% macro get_' ~ table_name ~ '_columns() %}') %}\n{% do jinja_macro.append('') %}\n{% do jinja_macro.append('{% set columns = [') %}\n\n{% for col in columns %}\n{% do jinja_macro.append(' ' ~ col ~ (',' if not loop.last)) %}\n{% endfor %}\n\n{% do jinja_macro.append('] %}') %}\n{% do jinja_macro.append('') %}\n{% do jinja_macro.append('{{ return(columns) }}') %}\n{% do jinja_macro.append('') %}\n{% do jinja_macro.append('{% endmacro %}') %}\n\n{% if execute %}\n\n {% set joined = jinja_macro | join ('\\n') %}\n {{ log(joined, info=True) }}\n {% do return(joined) %}\n\n{% endif %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.get_columns_for_macro"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1641410290.512498}, "macro.fivetran_utils.source_relation": {"unique_id": "macro.fivetran_utils.source_relation", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.514286}, "macro.fivetran_utils.default__source_relation": {"unique_id": "macro.fivetran_utils.default__source_relation", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.515865}, "macro.fivetran_utils.first_value": {"unique_id": "macro.fivetran_utils.first_value", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.517291}, "macro.fivetran_utils.default__first_value": {"unique_id": "macro.fivetran_utils.default__first_value", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.517856}, "macro.fivetran_utils.redshift__first_value": {"unique_id": "macro.fivetran_utils.redshift__first_value", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.51843}, "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/Documents/github_repos/jamie_dbt_dev/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": 1641410290.519288}, "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/Documents/github_repos/jamie_dbt_dev/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": 1641410290.521755}, "macro.fivetran_utils.staging_models_automation": {"unique_id": "macro.fivetran_utils.staging_models_automation", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/fivetran_utils", "path": "macros/staging_models_automation.sql", "original_file_path": "macros/staging_models_automation.sql", "name": "staging_models_automation", "macro_sql": "{% macro staging_models_automation(package, source_schema, source_database, tables) %}\n\n{% set package = \"\"~ package ~\"\" %}\n{% set source_schema = \"\"~ source_schema ~\"\" %}\n{% set source_database = \"\"~ source_database ~\"\" %}\n\n{% set zsh_command = \"source dbt_modules/fivetran_utils/columns_setup.sh '../dbt_\"\"\"~ package ~\"\"\"_source' stg_\"\"\"~ package ~\"\"\" \"\"\"~ source_database ~\"\"\" \"\"\"~ source_schema ~\"\"\" \" %}\n\n{% for t in tables %}\n {% if t != tables[-1] %}\n {% set help_command = zsh_command + t + \" && \\n\" %}\n\n {% else %}\n {% set help_command = zsh_command + t %}\n\n {% endif %}\n {{ log(help_command, info=True) }}\n\n{% endfor %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1641410290.5245981}, "macro.fivetran_utils.union_relations": {"unique_id": "macro.fivetran_utils.union_relations", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.534154}, "macro.fivetran_utils.union_tables": {"unique_id": "macro.fivetran_utils.union_tables", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.5350568}, "macro.fivetran_utils.snowflake_seed_data": {"unique_id": "macro.fivetran_utils.snowflake_seed_data", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.536288}, "macro.fivetran_utils.default__get_columns_for_macro": {"unique_id": "macro.fivetran_utils.default__get_columns_for_macro", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/fivetran_utils", "path": "macros/get_columns_for_macro.sql", "original_file_path": "macros/get_columns_for_macro.sql", "name": "default__get_columns_for_macro", "macro_sql": "{% macro default__get_columns_for_macro(table_name, schema_name, database_name=target.database) %}\n\n{% set query %}\n\nselect\n concat(\n '{\"name\": \"', \n lower(column_name), \n '\", \"datatype\": ',\n case\n when lower(data_type) like '%timestamp%' then 'dbt_utils.type_timestamp()' \n when lower(data_type) = 'text' then 'dbt_utils.type_string()' \n when lower(data_type) = 'boolean' then '\"boolean\"'\n when lower(data_type) = 'number' then 'dbt_utils.type_numeric()' \n when lower(data_type) = 'float' then 'dbt_utils.type_float()' \n when lower(data_type) = 'date' then '\"date\"'\n end,\n '}')\nfrom {{ database_name }}.information_schema.columns\nwhere lower(table_name) = '{{ table_name }}'\nand lower(table_schema) = '{{ schema_name }}'\norder by 1\n\n{% endset %}\n\n{% set results = run_query(query) %}\n{% set results_list = results.columns[0].values() %}}\n\n{{ return(results_list) }}\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": 1641410290.5396118}, "macro.fivetran_utils.bigquery__get_columns_for_macro": {"unique_id": "macro.fivetran_utils.bigquery__get_columns_for_macro", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/fivetran_utils", "path": "macros/get_columns_for_macro.sql", "original_file_path": "macros/get_columns_for_macro.sql", "name": "bigquery__get_columns_for_macro", "macro_sql": "{% macro bigquery__get_columns_for_macro(table_name, schema_name, database_name=target.database) %}\n\n{% set query %}\n\nselect\n concat(\n '{\"name\": \"', \n lower(column_name), \n '\", \"datatype\": ',\n case\n when lower(data_type) like '%timestamp%' then 'dbt_utils.type_timestamp()' \n when lower(data_type) = 'string' then 'dbt_utils.type_string()' \n when lower(data_type) = 'bool' then '\"boolean\"'\n when lower(data_type) = 'numeric' then 'dbt_utils.type_numeric()' \n when lower(data_type) = 'float64' then 'dbt_utils.type_float()' \n when lower(data_type) = 'int64' then 'dbt_utils.type_int()' \n when lower(data_type) = 'date' then '\"date\"' \n when lower(data_type) = 'datetime' then '\"datetime\"' \n end,\n '}')\nfrom `{{ database_name }}`.{{ schema_name }}.INFORMATION_SCHEMA.COLUMNS\nwhere lower(table_name) = '{{ table_name }}'\nand lower(table_schema) = '{{ schema_name }}'\norder by 1\n\n{% endset %}\n\n{% set results = run_query(query) %}\n{% set results_list = results.columns[0].values() %}}\n\n{{ return(results_list) }}\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": 1641410290.541}, "macro.fivetran_utils.get_columns_for_macro": {"unique_id": "macro.fivetran_utils.get_columns_for_macro", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/fivetran_utils", "path": "macros/get_columns_for_macro.sql", "original_file_path": "macros/get_columns_for_macro.sql", "name": "get_columns_for_macro", "macro_sql": "{% macro get_columns_for_macro(table_name, schema_name, database_name) -%}\n {{ return(adapter.dispatch('get_columns_for_macro')(table_name, schema_name, database_name)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.bigquery__get_columns_for_macro"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1641410290.5416489}, "macro.fivetran_utils.fill_staging_columns": {"unique_id": "macro.fivetran_utils.fill_staging_columns", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.545565}, "macro.fivetran_utils.quote_column": {"unique_id": "macro.fivetran_utils.quote_column", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.547086}, "macro.fivetran_utils.json_extract": {"unique_id": "macro.fivetran_utils.json_extract", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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}, "patch_path": null, "arguments": [], "created_at": 1641410290.548592}, "macro.fivetran_utils.default__json_extract": {"unique_id": "macro.fivetran_utils.default__json_extract", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.5490282}, "macro.fivetran_utils.snowflake__json_extract": {"unique_id": "macro.fivetran_utils.snowflake__json_extract", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.549567}, "macro.fivetran_utils.redshift__json_extract": {"unique_id": "macro.fivetran_utils.redshift__json_extract", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.5500631}, "macro.fivetran_utils.bigquery__json_extract": {"unique_id": "macro.fivetran_utils.bigquery__json_extract", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.550449}, "macro.fivetran_utils.postgres__json_extract": {"unique_id": "macro.fivetran_utils.postgres__json_extract", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.5508292}, "macro.fivetran_utils.collect_freshness": {"unique_id": "macro.fivetran_utils.collect_freshness", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.5530229}, "macro.fivetran_utils.default__collect_freshness": {"unique_id": "macro.fivetran_utils.default__collect_freshness", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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.name == source.name %}\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": 1641410290.556373}, "macro.fivetran_utils.timestamp_add": {"unique_id": "macro.fivetran_utils.timestamp_add", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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}, "patch_path": null, "arguments": [], "created_at": 1641410290.55809}, "macro.fivetran_utils.default__timestamp_add": {"unique_id": "macro.fivetran_utils.default__timestamp_add", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.5585148}, "macro.fivetran_utils.bigquery__timestamp_add": {"unique_id": "macro.fivetran_utils.bigquery__timestamp_add", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.5589151}, "macro.fivetran_utils.redshift__timestamp_add": {"unique_id": "macro.fivetran_utils.redshift__timestamp_add", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.559315}, "macro.fivetran_utils.postgres__timestamp_add": {"unique_id": "macro.fivetran_utils.postgres__timestamp_add", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.559712}, "macro.fivetran_utils.spark__timestamp_add": {"unique_id": "macro.fivetran_utils.spark__timestamp_add", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.560141}, "macro.fivetran_utils.ceiling": {"unique_id": "macro.fivetran_utils.ceiling", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.56094}, "macro.fivetran_utils.default__ceiling": {"unique_id": "macro.fivetran_utils.default__ceiling", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.561198}, "macro.fivetran_utils.snowflake__ceiling": {"unique_id": "macro.fivetran_utils.snowflake__ceiling", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.561615}, "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/Documents/github_repos/jamie_dbt_dev/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": 1641410290.563242}, "macro.fivetran_utils.union_data": {"unique_id": "macro.fivetran_utils.union_data", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.565834}, "macro.fivetran_utils.default__union_data": {"unique_id": "macro.fivetran_utils.default__union_data", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.5702221}, "macro.fivetran_utils.dummy_coalesce_value": {"unique_id": "macro.fivetran_utils.dummy_coalesce_value", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.573689}, "macro.fivetran_utils.array_agg": {"unique_id": "macro.fivetran_utils.array_agg", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.574454}, "macro.fivetran_utils.default__array_agg": {"unique_id": "macro.fivetran_utils.default__array_agg", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.5747058}, "macro.fivetran_utils.redshift__array_agg": {"unique_id": "macro.fivetran_utils.redshift__array_agg", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.574952}, "macro.fivetran_utils.empty_variable_warning": {"unique_id": "macro.fivetran_utils.empty_variable_warning", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/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": 1641410290.576024}, "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/Documents/github_repos/jamie_dbt_dev/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": 1641410290.5772219}}, "docs": {"dbt.__overview__": {"unique_id": "dbt.__overview__", "package_name": "dbt", "root_path": "/Users/jamie.rodriguez/.pyenv/versions/3.8.9/lib/python3.8/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/overview)?\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"}, "shopify_source._fivetran_synced": {"unique_id": "shopify_source._fivetran_synced", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Documents/github_repos/jamie_dbt_dev/dbt_packages/shopify_source", "path": "docs.md", "original_file_path": "models/docs.md", "name": "_fivetran_synced", "block_contents": "The time when a record was last updated by Fivetran."}}, "exposures": {}, "metrics": {}, "selectors": {}, "disabled": {}, "parent_map": {"model.shopify_source.stg_shopify__order_line": ["model.shopify_source.stg_shopify__order_line_tmp", "model.shopify_source.stg_shopify__order_line_tmp"], "model.shopify_source.stg_shopify__refund": ["model.shopify_source.stg_shopify__refund_tmp", "model.shopify_source.stg_shopify__refund_tmp"], "model.shopify_source.stg_shopify__product": ["model.shopify_source.stg_shopify__product_tmp", "model.shopify_source.stg_shopify__product_tmp"], "model.shopify_source.stg_shopify__product_variant": ["model.shopify_source.stg_shopify__product_variant_tmp", "model.shopify_source.stg_shopify__product_variant_tmp"], "model.shopify_source.stg_shopify__order": ["model.shopify_source.stg_shopify__order_tmp", "model.shopify_source.stg_shopify__order_tmp"], "model.shopify_source.stg_shopify__transaction": ["model.shopify_source.stg_shopify__transaction_tmp", "model.shopify_source.stg_shopify__transaction_tmp"], "model.shopify_source.stg_shopify__order_adjustment": ["model.shopify_source.stg_shopify__order_adjustment_tmp", "model.shopify_source.stg_shopify__order_adjustment_tmp"], "model.shopify_source.stg_shopify__customer": ["model.shopify_source.stg_shopify__customer_tmp", "model.shopify_source.stg_shopify__customer_tmp"], "model.shopify_source.stg_shopify__order_line_refund": ["model.shopify_source.stg_shopify__order_line_refund_tmp", "model.shopify_source.stg_shopify__order_line_refund_tmp"], "model.shopify_source.stg_shopify__customer_tmp": ["source.shopify_source.shopify.customer"], "model.shopify_source.stg_shopify__order_line_tmp": ["source.shopify_source.shopify.order_line"], "model.shopify_source.stg_shopify__refund_tmp": ["source.shopify_source.shopify.refund"], "model.shopify_source.stg_shopify__product_tmp": ["source.shopify_source.shopify.product"], "model.shopify_source.stg_shopify__order_adjustment_tmp": ["source.shopify_source.shopify.order_adjustment"], "model.shopify_source.stg_shopify__order_line_refund_tmp": ["source.shopify_source.shopify.order_line_refund"], "model.shopify_source.stg_shopify__transaction_tmp": ["source.shopify_source.shopify.transaction"], "model.shopify_source.stg_shopify__product_variant_tmp": ["source.shopify_source.shopify.product_variant"], "model.shopify_source.stg_shopify__order_tmp": ["source.shopify_source.shopify.order"], "model.klaviyo_source.stg_klaviyo__person": ["model.klaviyo_source.stg_klaviyo__person_tmp", "model.klaviyo_source.stg_klaviyo__person_tmp"], "model.klaviyo_source.stg_klaviyo__campaign": ["model.klaviyo_source.stg_klaviyo__campaign_tmp", "model.klaviyo_source.stg_klaviyo__campaign_tmp"], "model.klaviyo_source.stg_klaviyo__metric": ["model.klaviyo_source.stg_klaviyo__metric_tmp", "model.klaviyo_source.stg_klaviyo__metric_tmp"], "model.klaviyo_source.stg_klaviyo__integration": ["model.klaviyo_source.stg_klaviyo__integration_tmp", "model.klaviyo_source.stg_klaviyo__integration_tmp"], "model.klaviyo_source.stg_klaviyo__flow": ["model.klaviyo_source.stg_klaviyo__flow_tmp", "model.klaviyo_source.stg_klaviyo__flow_tmp"], "model.klaviyo_source.stg_klaviyo__event": ["model.klaviyo_source.stg_klaviyo__event_tmp", "model.klaviyo_source.stg_klaviyo__event_tmp"], "model.klaviyo_source.stg_klaviyo__event_tmp": ["source.klaviyo_source.klaviyo.event"], "model.klaviyo_source.stg_klaviyo__metric_tmp": ["source.klaviyo_source.klaviyo.metric"], "model.klaviyo_source.stg_klaviyo__campaign_tmp": ["source.klaviyo_source.klaviyo.campaign"], "model.klaviyo_source.stg_klaviyo__integration_tmp": ["source.klaviyo_source.klaviyo.integration"], "model.klaviyo_source.stg_klaviyo__flow_tmp": ["source.klaviyo_source.klaviyo.flow"], "model.klaviyo_source.stg_klaviyo__person_tmp": ["source.klaviyo_source.klaviyo.person"], "model.klaviyo.klaviyo__person_campaign_flow": ["model.klaviyo.klaviyo__events"], "model.klaviyo.klaviyo__persons": ["model.klaviyo.int_klaviyo__person_metrics", "model.klaviyo.int_klaviyo__person_metrics", "model.klaviyo_source.stg_klaviyo__person"], "model.klaviyo.klaviyo__flows": ["model.klaviyo.int_klaviyo__campaign_flow_metrics", "model.klaviyo.int_klaviyo__campaign_flow_metrics", "model.klaviyo_source.stg_klaviyo__flow"], "model.klaviyo.klaviyo__campaigns": ["model.klaviyo.int_klaviyo__campaign_flow_metrics", "model.klaviyo.int_klaviyo__campaign_flow_metrics", "model.klaviyo_source.stg_klaviyo__campaign"], "model.klaviyo.klaviyo__events": ["model.klaviyo.int_klaviyo__event_attribution", "model.klaviyo.int_klaviyo__event_attribution", "model.klaviyo_source.stg_klaviyo__campaign", "model.klaviyo_source.stg_klaviyo__flow", "model.klaviyo_source.stg_klaviyo__integration", "model.klaviyo_source.stg_klaviyo__metric", "model.klaviyo_source.stg_klaviyo__person"], "model.klaviyo.int_klaviyo__campaign_flow_metrics": ["model.klaviyo.klaviyo__person_campaign_flow", "model.klaviyo.klaviyo__person_campaign_flow"], "model.klaviyo.int_klaviyo__person_metrics": ["model.klaviyo.klaviyo__person_campaign_flow", "model.klaviyo.klaviyo__person_campaign_flow"], "model.klaviyo.int_klaviyo__event_attribution": ["model.klaviyo_source.stg_klaviyo__event"], "model.shopify.shopify__customer_cohorts": ["model.shopify.shopify__calendar", "model.shopify.shopify__customers", "model.shopify.shopify__orders"], "model.shopify.shopify__orders": ["model.shopify.shopify__orders__order_line_aggregates", "model.shopify.shopify__orders__order_refunds", "model.shopify_source.stg_shopify__order", "model.shopify_source.stg_shopify__order_adjustment"], "model.shopify.shopify__products": ["model.shopify.shopify__order_lines", "model.shopify.shopify__orders", "model.shopify_source.stg_shopify__product"], "model.shopify.shopify__transactions": ["model.shopify_source.stg_shopify__transaction"], "model.shopify.shopify__customers": ["model.shopify.shopify__customers__order_aggregates", "model.shopify_source.stg_shopify__customer", "model.shopify_source.stg_shopify__customer"], "model.shopify.shopify__order_lines": ["model.shopify.shopify__orders__order_refunds", "model.shopify_source.stg_shopify__order_line", "model.shopify_source.stg_shopify__product_variant"], "model.shopify.shopify__calendar": [], "model.shopify.shopify__orders__order_line_aggregates": ["model.shopify_source.stg_shopify__order_line"], "model.shopify.shopify__customers__order_aggregates": ["model.shopify.shopify__transactions", "model.shopify_source.stg_shopify__order"], "model.shopify.shopify__orders__order_refunds": ["model.shopify_source.stg_shopify__order_line_refund", "model.shopify_source.stg_shopify__refund"], "model.shopify_holistic_reporting.shopify_holistic_reporting__customer_enhanced": ["model.shopify_holistic_reporting.int__klaviyo_person_rollup", "model.shopify_holistic_reporting.int__klaviyo_person_rollup", "model.shopify_holistic_reporting.int__shopify_customer_rollup", "model.shopify_holistic_reporting.int__shopify_customer_rollup"], "model.shopify_holistic_reporting.shopify_holistic_reporting__orders_attribution": ["model.klaviyo.klaviyo__events", "model.shopify.shopify__orders", "model.shopify.shopify__orders"], "model.shopify_holistic_reporting.shopify_holistic_reporting__daily_customer_metrics": ["model.shopify_holistic_reporting.int__daily_klaviyo_user_metrics", "model.shopify_holistic_reporting.int__daily_klaviyo_user_metrics", "model.shopify_holistic_reporting.int__daily_shopify_customer_orders", "model.shopify_holistic_reporting.int__daily_shopify_customer_orders"], "model.shopify_holistic_reporting.int__daily_shopify_customer_orders": ["model.shopify.shopify__order_lines", "model.shopify_holistic_reporting.shopify_holistic_reporting__orders_attribution"], "model.shopify_holistic_reporting.int__shopify_customer_rollup": ["model.shopify.shopify__customers", "model.shopify.shopify__customers"], "model.shopify_holistic_reporting.int__daily_klaviyo_user_metrics": ["model.klaviyo.klaviyo__events"], "model.shopify_holistic_reporting.int__klaviyo_person_rollup": ["model.klaviyo.klaviyo__persons", "model.klaviyo.klaviyo__persons"], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__customer_customer_id__source_relation.1b2185db25": ["model.shopify_source.stg_shopify__customer"], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_line_refund_order_line_refund_id__source_relation.1877420c29": ["model.shopify_source.stg_shopify__order_line_refund"], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_line_order_line_id__source_relation.c2797e7a9c": ["model.shopify_source.stg_shopify__order_line"], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_order_id__source_relation.81d10381c1": ["model.shopify_source.stg_shopify__order"], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__product_product_id__source_relation.48b32ab6a2": ["model.shopify_source.stg_shopify__product"], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__product_variant_variant_id__source_relation.7506695ec0": ["model.shopify_source.stg_shopify__product_variant"], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__transaction_transaction_id__source_relation.d55a33652a": ["model.shopify_source.stg_shopify__transaction"], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__refund_refund_id__source_relation.cd4dbc2b35": ["model.shopify_source.stg_shopify__refund"], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_adjustment_order_adjustment_id__source_relation.00b7d10cb0": ["model.shopify_source.stg_shopify__order_adjustment"], "test.klaviyo_source.not_null_stg_klaviyo__campaign_campaign_id.5dfc47dc1d": ["model.klaviyo_source.stg_klaviyo__campaign"], "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__campaign_campaign_id__source_relation.59158488ff": ["model.klaviyo_source.stg_klaviyo__campaign"], "test.klaviyo_source.not_null_stg_klaviyo__event_event_id.7a09ac6ec1": ["model.klaviyo_source.stg_klaviyo__event"], "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__event_event_id__source_relation.3778c651d7": ["model.klaviyo_source.stg_klaviyo__event"], "test.klaviyo_source.not_null_stg_klaviyo__flow_flow_id.a00a897e42": ["model.klaviyo_source.stg_klaviyo__flow"], "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__flow_flow_id__source_relation.015215d481": ["model.klaviyo_source.stg_klaviyo__flow"], "test.klaviyo_source.not_null_stg_klaviyo__integration_integration_id.fe572c5f1b": ["model.klaviyo_source.stg_klaviyo__integration"], "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__integration_integration_id__source_relation.be6158ad21": ["model.klaviyo_source.stg_klaviyo__integration"], "test.klaviyo_source.not_null_stg_klaviyo__person_person_id.bd77ffc8aa": ["model.klaviyo_source.stg_klaviyo__person"], "test.klaviyo_source.unique_stg_klaviyo__person_email.dc3a98b014": ["model.klaviyo_source.stg_klaviyo__person"], "test.klaviyo_source.not_null_stg_klaviyo__person_email.c7094cfe27": ["model.klaviyo_source.stg_klaviyo__person"], "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__person_person_id__source_relation.33a4f9ca24": ["model.klaviyo_source.stg_klaviyo__person"], "test.klaviyo_source.not_null_stg_klaviyo__metric_metric_id.4759d62078": ["model.klaviyo_source.stg_klaviyo__metric"], "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__metric_metric_id__source_relation.e9f33c04e5": ["model.klaviyo_source.stg_klaviyo__metric"], "test.klaviyo.not_null_klaviyo__events_event_id.eada7340ba": ["model.klaviyo.klaviyo__events"], "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__events_event_id__source_relation.847dad4174": ["model.klaviyo.klaviyo__events"], "test.klaviyo.not_null_klaviyo__person_campaign_flow_person_id.e27d13b0f2": ["model.klaviyo.klaviyo__person_campaign_flow"], "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__person_campaign_flow_person_id__last_touch_campaign_id__last_touch_flow_id__variation_id__source_relation.30e1824079": ["model.klaviyo.klaviyo__person_campaign_flow"], "test.klaviyo.not_null_klaviyo__campaigns_campaign_variation_key.c4588cdadc": ["model.klaviyo.klaviyo__campaigns"], "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__campaigns_campaign_variation_key__source_relation.e5d14aee28": ["model.klaviyo.klaviyo__campaigns"], "test.klaviyo.not_null_klaviyo__flows_flow_variation_key.152c0d960b": ["model.klaviyo.klaviyo__flows"], "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__flows_flow_variation_key__source_relation.925d4118dc": ["model.klaviyo.klaviyo__flows"], "test.klaviyo.not_null_klaviyo__persons_person_id.624a41e75a": ["model.klaviyo.klaviyo__persons"], "test.klaviyo.unique_klaviyo__persons_email.a330194dd6": ["model.klaviyo.klaviyo__persons"], "test.klaviyo.not_null_klaviyo__persons_email.072e38d07d": ["model.klaviyo.klaviyo__persons"], "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__persons_person_id__source_relation.b223d703b3": ["model.klaviyo.klaviyo__persons"], "test.klaviyo.not_null_int_klaviyo__event_attribution_event_id.8d186152c4": ["model.klaviyo.int_klaviyo__event_attribution"], "test.klaviyo.dbt_utils_unique_combination_of_columns_int_klaviyo__event_attribution_event_id__source_relation.654b98ad2c": ["model.klaviyo.int_klaviyo__event_attribution"], "test.klaviyo.dbt_utils_unique_combination_of_columns_int_klaviyo__campaign_flow_metrics_variation_id__source_relation__last_touch_campaign_id__last_touch_flow_id.3ea05faa81": ["model.klaviyo.int_klaviyo__campaign_flow_metrics"], "test.klaviyo.not_null_int_klaviyo__person_metrics_person_id.2c0f4e5a67": ["model.klaviyo.int_klaviyo__person_metrics"], "test.klaviyo.dbt_utils_unique_combination_of_columns_int_klaviyo__person_metrics_person_id__source_relation.4897d57f8b": ["model.klaviyo.int_klaviyo__person_metrics"], "test.shopify.unique_shopify__customer_cohorts_customer_cohort_id.c5e4855c7a": ["model.shopify.shopify__customer_cohorts"], "test.shopify.not_null_shopify__customer_cohorts_customer_cohort_id.88e9c30925": ["model.shopify.shopify__customer_cohorts"], "test.shopify.dbt_utils_unique_combination_of_columns_shopify__orders_order_id__source_relation.b2d1eaf63d": ["model.shopify.shopify__orders"], "test.shopify.dbt_utils_unique_combination_of_columns_shopify__customers_customer_id__source_relation.88d3656469": ["model.shopify.shopify__customers"], "test.shopify.dbt_utils_unique_combination_of_columns_shopify__products_product_id__source_relation.f00b2fb95a": ["model.shopify.shopify__products"], "test.shopify.dbt_utils_unique_combination_of_columns_shopify__order_lines_order_line_id__source_relation.2483d5ef95": ["model.shopify.shopify__order_lines"], "test.shopify.dbt_utils_unique_combination_of_columns_shopify__transactions_transaction_id__source_relation.7341b755c0": ["model.shopify.shopify__transactions"], "test.shopify.dbt_utils_unique_combination_of_columns_shopify__customers__order_aggregates_customer_id__source_relation.5a5e85c8a9": ["model.shopify.shopify__customers__order_aggregates"], "test.shopify.dbt_utils_unique_combination_of_columns_shopify__orders__order_line_aggregates_order_id__source_relation.09d921d473": ["model.shopify.shopify__orders__order_line_aggregates"], "test.shopify_holistic_reporting.dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__customer_enhanced_email__klaviyo_source_relation__shopify_source_relation.2ea9394109": ["model.shopify_holistic_reporting.shopify_holistic_reporting__customer_enhanced"], "test.shopify_holistic_reporting.dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__daily_customer_metrics_date_day__email__klaviyo_source_relation__shopify_source_relation__campaign_id__flow_id__variation_id.0489c190fd": ["model.shopify_holistic_reporting.shopify_holistic_reporting__daily_customer_metrics"], "test.shopify_holistic_reporting.dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__orders_attribution_order_id__shopify_source_relation.0eb46743bb": ["model.shopify_holistic_reporting.shopify_holistic_reporting__orders_attribution"], "source.shopify_source.shopify.order": [], "source.shopify_source.shopify.customer": [], "source.shopify_source.shopify.order_line": [], "source.shopify_source.shopify.order_line_refund": [], "source.shopify_source.shopify.product": [], "source.shopify_source.shopify.product_variant": [], "source.shopify_source.shopify.transaction": [], "source.shopify_source.shopify.refund": [], "source.shopify_source.shopify.order_adjustment": [], "source.klaviyo_source.klaviyo.campaign": [], "source.klaviyo_source.klaviyo.event": [], "source.klaviyo_source.klaviyo.flow": [], "source.klaviyo_source.klaviyo.integration": [], "source.klaviyo_source.klaviyo.person": [], "source.klaviyo_source.klaviyo.metric": []}, "child_map": {"model.shopify_source.stg_shopify__order_line": ["model.shopify.shopify__order_lines", "model.shopify.shopify__orders__order_line_aggregates", "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_line_order_line_id__source_relation.c2797e7a9c"], "model.shopify_source.stg_shopify__refund": ["model.shopify.shopify__orders__order_refunds", "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__refund_refund_id__source_relation.cd4dbc2b35"], "model.shopify_source.stg_shopify__product": ["model.shopify.shopify__products", "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__product_product_id__source_relation.48b32ab6a2"], "model.shopify_source.stg_shopify__product_variant": ["model.shopify.shopify__order_lines", "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__product_variant_variant_id__source_relation.7506695ec0"], "model.shopify_source.stg_shopify__order": ["model.shopify.shopify__customers__order_aggregates", "model.shopify.shopify__orders", "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_order_id__source_relation.81d10381c1"], "model.shopify_source.stg_shopify__transaction": ["model.shopify.shopify__transactions", "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__transaction_transaction_id__source_relation.d55a33652a"], "model.shopify_source.stg_shopify__order_adjustment": ["model.shopify.shopify__orders", "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_adjustment_order_adjustment_id__source_relation.00b7d10cb0"], "model.shopify_source.stg_shopify__customer": ["model.shopify.shopify__customers", "model.shopify.shopify__customers", "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__customer_customer_id__source_relation.1b2185db25"], "model.shopify_source.stg_shopify__order_line_refund": ["model.shopify.shopify__orders__order_refunds", "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_line_refund_order_line_refund_id__source_relation.1877420c29"], "model.shopify_source.stg_shopify__customer_tmp": ["model.shopify_source.stg_shopify__customer", "model.shopify_source.stg_shopify__customer"], "model.shopify_source.stg_shopify__order_line_tmp": ["model.shopify_source.stg_shopify__order_line", "model.shopify_source.stg_shopify__order_line"], "model.shopify_source.stg_shopify__refund_tmp": ["model.shopify_source.stg_shopify__refund", "model.shopify_source.stg_shopify__refund"], "model.shopify_source.stg_shopify__product_tmp": ["model.shopify_source.stg_shopify__product", "model.shopify_source.stg_shopify__product"], "model.shopify_source.stg_shopify__order_adjustment_tmp": ["model.shopify_source.stg_shopify__order_adjustment", "model.shopify_source.stg_shopify__order_adjustment"], "model.shopify_source.stg_shopify__order_line_refund_tmp": ["model.shopify_source.stg_shopify__order_line_refund", "model.shopify_source.stg_shopify__order_line_refund"], "model.shopify_source.stg_shopify__transaction_tmp": ["model.shopify_source.stg_shopify__transaction", "model.shopify_source.stg_shopify__transaction"], "model.shopify_source.stg_shopify__product_variant_tmp": ["model.shopify_source.stg_shopify__product_variant", "model.shopify_source.stg_shopify__product_variant"], "model.shopify_source.stg_shopify__order_tmp": ["model.shopify_source.stg_shopify__order", "model.shopify_source.stg_shopify__order"], "model.klaviyo_source.stg_klaviyo__person": ["model.klaviyo.klaviyo__events", "model.klaviyo.klaviyo__persons", "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__person_person_id__source_relation.33a4f9ca24", "test.klaviyo_source.not_null_stg_klaviyo__person_email.c7094cfe27", "test.klaviyo_source.not_null_stg_klaviyo__person_person_id.bd77ffc8aa", "test.klaviyo_source.unique_stg_klaviyo__person_email.dc3a98b014"], "model.klaviyo_source.stg_klaviyo__campaign": ["model.klaviyo.klaviyo__campaigns", "model.klaviyo.klaviyo__events", "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__campaign_campaign_id__source_relation.59158488ff", "test.klaviyo_source.not_null_stg_klaviyo__campaign_campaign_id.5dfc47dc1d"], "model.klaviyo_source.stg_klaviyo__metric": ["model.klaviyo.klaviyo__events", "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__metric_metric_id__source_relation.e9f33c04e5", "test.klaviyo_source.not_null_stg_klaviyo__metric_metric_id.4759d62078"], "model.klaviyo_source.stg_klaviyo__integration": ["model.klaviyo.klaviyo__events", "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__integration_integration_id__source_relation.be6158ad21", "test.klaviyo_source.not_null_stg_klaviyo__integration_integration_id.fe572c5f1b"], "model.klaviyo_source.stg_klaviyo__flow": ["model.klaviyo.klaviyo__events", "model.klaviyo.klaviyo__flows", "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__flow_flow_id__source_relation.015215d481", "test.klaviyo_source.not_null_stg_klaviyo__flow_flow_id.a00a897e42"], "model.klaviyo_source.stg_klaviyo__event": ["model.klaviyo.int_klaviyo__event_attribution", "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__event_event_id__source_relation.3778c651d7", "test.klaviyo_source.not_null_stg_klaviyo__event_event_id.7a09ac6ec1"], "model.klaviyo_source.stg_klaviyo__event_tmp": ["model.klaviyo_source.stg_klaviyo__event", "model.klaviyo_source.stg_klaviyo__event"], "model.klaviyo_source.stg_klaviyo__metric_tmp": ["model.klaviyo_source.stg_klaviyo__metric", "model.klaviyo_source.stg_klaviyo__metric"], "model.klaviyo_source.stg_klaviyo__campaign_tmp": ["model.klaviyo_source.stg_klaviyo__campaign", "model.klaviyo_source.stg_klaviyo__campaign"], "model.klaviyo_source.stg_klaviyo__integration_tmp": ["model.klaviyo_source.stg_klaviyo__integration", "model.klaviyo_source.stg_klaviyo__integration"], "model.klaviyo_source.stg_klaviyo__flow_tmp": ["model.klaviyo_source.stg_klaviyo__flow", "model.klaviyo_source.stg_klaviyo__flow"], "model.klaviyo_source.stg_klaviyo__person_tmp": ["model.klaviyo_source.stg_klaviyo__person", "model.klaviyo_source.stg_klaviyo__person"], "model.klaviyo.klaviyo__person_campaign_flow": ["model.klaviyo.int_klaviyo__campaign_flow_metrics", "model.klaviyo.int_klaviyo__campaign_flow_metrics", "model.klaviyo.int_klaviyo__person_metrics", "model.klaviyo.int_klaviyo__person_metrics", "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__person_campaign_flow_person_id__last_touch_campaign_id__last_touch_flow_id__variation_id__source_relation.30e1824079", "test.klaviyo.not_null_klaviyo__person_campaign_flow_person_id.e27d13b0f2"], "model.klaviyo.klaviyo__persons": ["model.shopify_holistic_reporting.int__klaviyo_person_rollup", "model.shopify_holistic_reporting.int__klaviyo_person_rollup", "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__persons_person_id__source_relation.b223d703b3", "test.klaviyo.not_null_klaviyo__persons_email.072e38d07d", "test.klaviyo.not_null_klaviyo__persons_person_id.624a41e75a", "test.klaviyo.unique_klaviyo__persons_email.a330194dd6"], "model.klaviyo.klaviyo__flows": ["test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__flows_flow_variation_key__source_relation.925d4118dc", "test.klaviyo.not_null_klaviyo__flows_flow_variation_key.152c0d960b"], "model.klaviyo.klaviyo__campaigns": ["test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__campaigns_campaign_variation_key__source_relation.e5d14aee28", "test.klaviyo.not_null_klaviyo__campaigns_campaign_variation_key.c4588cdadc"], "model.klaviyo.klaviyo__events": ["model.klaviyo.klaviyo__person_campaign_flow", "model.shopify_holistic_reporting.int__daily_klaviyo_user_metrics", "model.shopify_holistic_reporting.shopify_holistic_reporting__orders_attribution", "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__events_event_id__source_relation.847dad4174", "test.klaviyo.not_null_klaviyo__events_event_id.eada7340ba"], "model.klaviyo.int_klaviyo__campaign_flow_metrics": ["model.klaviyo.klaviyo__campaigns", "model.klaviyo.klaviyo__campaigns", "model.klaviyo.klaviyo__flows", "model.klaviyo.klaviyo__flows", "test.klaviyo.dbt_utils_unique_combination_of_columns_int_klaviyo__campaign_flow_metrics_variation_id__source_relation__last_touch_campaign_id__last_touch_flow_id.3ea05faa81"], "model.klaviyo.int_klaviyo__person_metrics": ["model.klaviyo.klaviyo__persons", "model.klaviyo.klaviyo__persons", "test.klaviyo.dbt_utils_unique_combination_of_columns_int_klaviyo__person_metrics_person_id__source_relation.4897d57f8b", "test.klaviyo.not_null_int_klaviyo__person_metrics_person_id.2c0f4e5a67"], "model.klaviyo.int_klaviyo__event_attribution": ["model.klaviyo.klaviyo__events", "model.klaviyo.klaviyo__events", "test.klaviyo.dbt_utils_unique_combination_of_columns_int_klaviyo__event_attribution_event_id__source_relation.654b98ad2c", "test.klaviyo.not_null_int_klaviyo__event_attribution_event_id.8d186152c4"], "model.shopify.shopify__customer_cohorts": ["test.shopify.not_null_shopify__customer_cohorts_customer_cohort_id.88e9c30925", "test.shopify.unique_shopify__customer_cohorts_customer_cohort_id.c5e4855c7a"], "model.shopify.shopify__orders": ["model.shopify.shopify__customer_cohorts", "model.shopify.shopify__products", "model.shopify_holistic_reporting.shopify_holistic_reporting__orders_attribution", "model.shopify_holistic_reporting.shopify_holistic_reporting__orders_attribution", "test.shopify.dbt_utils_unique_combination_of_columns_shopify__orders_order_id__source_relation.b2d1eaf63d"], "model.shopify.shopify__products": ["test.shopify.dbt_utils_unique_combination_of_columns_shopify__products_product_id__source_relation.f00b2fb95a"], "model.shopify.shopify__transactions": ["model.shopify.shopify__customers__order_aggregates", "test.shopify.dbt_utils_unique_combination_of_columns_shopify__transactions_transaction_id__source_relation.7341b755c0"], "model.shopify.shopify__customers": ["model.shopify.shopify__customer_cohorts", "model.shopify_holistic_reporting.int__shopify_customer_rollup", "model.shopify_holistic_reporting.int__shopify_customer_rollup", "test.shopify.dbt_utils_unique_combination_of_columns_shopify__customers_customer_id__source_relation.88d3656469"], "model.shopify.shopify__order_lines": ["model.shopify.shopify__products", "model.shopify_holistic_reporting.int__daily_shopify_customer_orders", "test.shopify.dbt_utils_unique_combination_of_columns_shopify__order_lines_order_line_id__source_relation.2483d5ef95"], "model.shopify.shopify__calendar": ["model.shopify.shopify__customer_cohorts"], "model.shopify.shopify__orders__order_line_aggregates": ["model.shopify.shopify__orders", "test.shopify.dbt_utils_unique_combination_of_columns_shopify__orders__order_line_aggregates_order_id__source_relation.09d921d473"], "model.shopify.shopify__customers__order_aggregates": ["model.shopify.shopify__customers", "test.shopify.dbt_utils_unique_combination_of_columns_shopify__customers__order_aggregates_customer_id__source_relation.5a5e85c8a9"], "model.shopify.shopify__orders__order_refunds": ["model.shopify.shopify__order_lines", "model.shopify.shopify__orders"], "model.shopify_holistic_reporting.shopify_holistic_reporting__customer_enhanced": ["test.shopify_holistic_reporting.dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__customer_enhanced_email__klaviyo_source_relation__shopify_source_relation.2ea9394109"], "model.shopify_holistic_reporting.shopify_holistic_reporting__orders_attribution": ["model.shopify_holistic_reporting.int__daily_shopify_customer_orders", "test.shopify_holistic_reporting.dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__orders_attribution_order_id__shopify_source_relation.0eb46743bb"], "model.shopify_holistic_reporting.shopify_holistic_reporting__daily_customer_metrics": ["test.shopify_holistic_reporting.dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__daily_customer_metrics_date_day__email__klaviyo_source_relation__shopify_source_relation__campaign_id__flow_id__variation_id.0489c190fd"], "model.shopify_holistic_reporting.int__daily_shopify_customer_orders": ["model.shopify_holistic_reporting.shopify_holistic_reporting__daily_customer_metrics", "model.shopify_holistic_reporting.shopify_holistic_reporting__daily_customer_metrics"], "model.shopify_holistic_reporting.int__shopify_customer_rollup": ["model.shopify_holistic_reporting.shopify_holistic_reporting__customer_enhanced", "model.shopify_holistic_reporting.shopify_holistic_reporting__customer_enhanced"], "model.shopify_holistic_reporting.int__daily_klaviyo_user_metrics": ["model.shopify_holistic_reporting.shopify_holistic_reporting__daily_customer_metrics", "model.shopify_holistic_reporting.shopify_holistic_reporting__daily_customer_metrics"], "model.shopify_holistic_reporting.int__klaviyo_person_rollup": ["model.shopify_holistic_reporting.shopify_holistic_reporting__customer_enhanced", "model.shopify_holistic_reporting.shopify_holistic_reporting__customer_enhanced"], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__customer_customer_id__source_relation.1b2185db25": [], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_line_refund_order_line_refund_id__source_relation.1877420c29": [], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_line_order_line_id__source_relation.c2797e7a9c": [], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_order_id__source_relation.81d10381c1": [], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__product_product_id__source_relation.48b32ab6a2": [], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__product_variant_variant_id__source_relation.7506695ec0": [], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__transaction_transaction_id__source_relation.d55a33652a": [], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__refund_refund_id__source_relation.cd4dbc2b35": [], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_adjustment_order_adjustment_id__source_relation.00b7d10cb0": [], "test.klaviyo_source.not_null_stg_klaviyo__campaign_campaign_id.5dfc47dc1d": [], "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__campaign_campaign_id__source_relation.59158488ff": [], "test.klaviyo_source.not_null_stg_klaviyo__event_event_id.7a09ac6ec1": [], "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__event_event_id__source_relation.3778c651d7": [], "test.klaviyo_source.not_null_stg_klaviyo__flow_flow_id.a00a897e42": [], "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__flow_flow_id__source_relation.015215d481": [], "test.klaviyo_source.not_null_stg_klaviyo__integration_integration_id.fe572c5f1b": [], "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__integration_integration_id__source_relation.be6158ad21": [], "test.klaviyo_source.not_null_stg_klaviyo__person_person_id.bd77ffc8aa": [], "test.klaviyo_source.unique_stg_klaviyo__person_email.dc3a98b014": [], "test.klaviyo_source.not_null_stg_klaviyo__person_email.c7094cfe27": [], "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__person_person_id__source_relation.33a4f9ca24": [], "test.klaviyo_source.not_null_stg_klaviyo__metric_metric_id.4759d62078": [], "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__metric_metric_id__source_relation.e9f33c04e5": [], "test.klaviyo.not_null_klaviyo__events_event_id.eada7340ba": [], "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__events_event_id__source_relation.847dad4174": [], "test.klaviyo.not_null_klaviyo__person_campaign_flow_person_id.e27d13b0f2": [], "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__person_campaign_flow_person_id__last_touch_campaign_id__last_touch_flow_id__variation_id__source_relation.30e1824079": [], "test.klaviyo.not_null_klaviyo__campaigns_campaign_variation_key.c4588cdadc": [], "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__campaigns_campaign_variation_key__source_relation.e5d14aee28": [], "test.klaviyo.not_null_klaviyo__flows_flow_variation_key.152c0d960b": [], "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__flows_flow_variation_key__source_relation.925d4118dc": [], "test.klaviyo.not_null_klaviyo__persons_person_id.624a41e75a": [], "test.klaviyo.unique_klaviyo__persons_email.a330194dd6": [], "test.klaviyo.not_null_klaviyo__persons_email.072e38d07d": [], "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__persons_person_id__source_relation.b223d703b3": [], "test.klaviyo.not_null_int_klaviyo__event_attribution_event_id.8d186152c4": [], "test.klaviyo.dbt_utils_unique_combination_of_columns_int_klaviyo__event_attribution_event_id__source_relation.654b98ad2c": [], "test.klaviyo.dbt_utils_unique_combination_of_columns_int_klaviyo__campaign_flow_metrics_variation_id__source_relation__last_touch_campaign_id__last_touch_flow_id.3ea05faa81": [], "test.klaviyo.not_null_int_klaviyo__person_metrics_person_id.2c0f4e5a67": [], "test.klaviyo.dbt_utils_unique_combination_of_columns_int_klaviyo__person_metrics_person_id__source_relation.4897d57f8b": [], "test.shopify.unique_shopify__customer_cohorts_customer_cohort_id.c5e4855c7a": [], "test.shopify.not_null_shopify__customer_cohorts_customer_cohort_id.88e9c30925": [], "test.shopify.dbt_utils_unique_combination_of_columns_shopify__orders_order_id__source_relation.b2d1eaf63d": [], "test.shopify.dbt_utils_unique_combination_of_columns_shopify__customers_customer_id__source_relation.88d3656469": [], "test.shopify.dbt_utils_unique_combination_of_columns_shopify__products_product_id__source_relation.f00b2fb95a": [], "test.shopify.dbt_utils_unique_combination_of_columns_shopify__order_lines_order_line_id__source_relation.2483d5ef95": [], "test.shopify.dbt_utils_unique_combination_of_columns_shopify__transactions_transaction_id__source_relation.7341b755c0": [], "test.shopify.dbt_utils_unique_combination_of_columns_shopify__customers__order_aggregates_customer_id__source_relation.5a5e85c8a9": [], "test.shopify.dbt_utils_unique_combination_of_columns_shopify__orders__order_line_aggregates_order_id__source_relation.09d921d473": [], "test.shopify_holistic_reporting.dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__customer_enhanced_email__klaviyo_source_relation__shopify_source_relation.2ea9394109": [], "test.shopify_holistic_reporting.dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__daily_customer_metrics_date_day__email__klaviyo_source_relation__shopify_source_relation__campaign_id__flow_id__variation_id.0489c190fd": [], "test.shopify_holistic_reporting.dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__orders_attribution_order_id__shopify_source_relation.0eb46743bb": [], "source.shopify_source.shopify.order": ["model.shopify_source.stg_shopify__order_tmp"], "source.shopify_source.shopify.customer": ["model.shopify_source.stg_shopify__customer_tmp"], "source.shopify_source.shopify.order_line": ["model.shopify_source.stg_shopify__order_line_tmp"], "source.shopify_source.shopify.order_line_refund": ["model.shopify_source.stg_shopify__order_line_refund_tmp"], "source.shopify_source.shopify.product": ["model.shopify_source.stg_shopify__product_tmp"], "source.shopify_source.shopify.product_variant": ["model.shopify_source.stg_shopify__product_variant_tmp"], "source.shopify_source.shopify.transaction": ["model.shopify_source.stg_shopify__transaction_tmp"], "source.shopify_source.shopify.refund": ["model.shopify_source.stg_shopify__refund_tmp"], "source.shopify_source.shopify.order_adjustment": ["model.shopify_source.stg_shopify__order_adjustment_tmp"], "source.klaviyo_source.klaviyo.campaign": ["model.klaviyo_source.stg_klaviyo__campaign_tmp"], "source.klaviyo_source.klaviyo.event": ["model.klaviyo_source.stg_klaviyo__event_tmp"], "source.klaviyo_source.klaviyo.flow": ["model.klaviyo_source.stg_klaviyo__flow_tmp"], "source.klaviyo_source.klaviyo.integration": ["model.klaviyo_source.stg_klaviyo__integration_tmp"], "source.klaviyo_source.klaviyo.person": ["model.klaviyo_source.stg_klaviyo__person_tmp"], "source.klaviyo_source.klaviyo.metric": ["model.klaviyo_source.stg_klaviyo__metric_tmp"]}} \ No newline at end of file +{"metadata": {"dbt_schema_version": "https://schemas.getdbt.com/dbt/manifest/v6.json", "dbt_version": "1.2.0", "generated_at": "2022-10-13T23:10:08.553077Z", "invocation_id": "995a6e9b-ac7c-4344-a33a-82df97529d6b", "env": {}, "project_id": "0d919ec91381ade1c67705291b214e1c", "user_id": "2bfa9082-ea6e-467b-abdc-d0514ab111d9", "send_anonymous_usage_stats": true, "adapter_type": "bigquery"}, "nodes": {"seed.shopify_holistic_reporting_integration_tests.shopify_order_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": {"_fivetran_synced": "timestamp", "created_at": "timestamp", "updated_at": "timestamp", "processed_at": "timestamp", "cancelled_at": "timestamp", "id": "INT64", "customer_id": "INT64", "location_id": "INT64", "user_id": "INT64"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests", "fqn": ["shopify_holistic_reporting_integration_tests", "shopify_order_data"], "unique_id": "seed.shopify_holistic_reporting_integration_tests.shopify_order_data", "package_name": "shopify_holistic_reporting_integration_tests", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests", "path": "shopify_order_data.csv", "original_file_path": "seeds/shopify_order_data.csv", "name": "shopify_order_data", "alias": "shopify_order_data", "checksum": {"name": "sha256", "checksum": "4d0dd043a886a0d9e7680e7ee2cd132717490f75d3a06fe7c38956d901976146"}, "tags": [], "refs": [], "sources": [], "metrics": [], "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 in ('redshift', 'postgres') else false }}", "column_types": {"created_at": "timestamp", "updated_at": "timestamp", "processed_at": "timestamp", "cancelled_at": "timestamp", "_fivetran_synced": "timestamp", "id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}", "customer_id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}", "location_id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}", "user_id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}"}}, "created_at": 1665702404.520545, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests`.`shopify_order_data`"}, "seed.shopify_holistic_reporting_integration_tests.shopify_order_line_refund_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": {"_fivetran_synced": "timestamp", "id": "INT64", "location_id": "INT64", "refund_id": "INT64", "order_line_id": "INT64"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests", "fqn": ["shopify_holistic_reporting_integration_tests", "shopify_order_line_refund_data"], "unique_id": "seed.shopify_holistic_reporting_integration_tests.shopify_order_line_refund_data", "package_name": "shopify_holistic_reporting_integration_tests", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests", "path": "shopify_order_line_refund_data.csv", "original_file_path": "seeds/shopify_order_line_refund_data.csv", "name": "shopify_order_line_refund_data", "alias": "shopify_order_line_refund_data", "checksum": {"name": "sha256", "checksum": "0564bef778890f3e086e4057b2536aaa6cfeceb2f9c9bd95f44d4b9f04a33dc6"}, "tags": [], "refs": [], "sources": [], "metrics": [], "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 in ('redshift', 'postgres') else false }}", "column_types": {"_fivetran_synced": "timestamp", "id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}", "location_id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}", "refund_id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}", "order_line_id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}"}}, "created_at": 1665702404.52617, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests`.`shopify_order_line_refund_data`"}, "seed.shopify_holistic_reporting_integration_tests.shopify_order_adjustment_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": {"_fivetran_synced": "timestamp", "id": "INT64", "order_id": "INT64", "refund_id": "INT64"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests", "fqn": ["shopify_holistic_reporting_integration_tests", "shopify_order_adjustment_data"], "unique_id": "seed.shopify_holistic_reporting_integration_tests.shopify_order_adjustment_data", "package_name": "shopify_holistic_reporting_integration_tests", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests", "path": "shopify_order_adjustment_data.csv", "original_file_path": "seeds/shopify_order_adjustment_data.csv", "name": "shopify_order_adjustment_data", "alias": "shopify_order_adjustment_data", "checksum": {"name": "sha256", "checksum": "48ce96540f19450088c661fd48bd8f6d58bb4ca13a1f048880e9984be367172e"}, "tags": [], "refs": [], "sources": [], "metrics": [], "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 in ('redshift', 'postgres') else false }}", "column_types": {"id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}", "order_id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}", "refund_id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}"}}, "created_at": 1665702404.527225, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests`.`shopify_order_adjustment_data`"}, "seed.shopify_holistic_reporting_integration_tests.shopify_product_variant_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": {"_fivetran_synced": "timestamp", "id": "INT64", "product_id": "INT64", "inventory_item_id": "INT64"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests", "fqn": ["shopify_holistic_reporting_integration_tests", "shopify_product_variant_data"], "unique_id": "seed.shopify_holistic_reporting_integration_tests.shopify_product_variant_data", "package_name": "shopify_holistic_reporting_integration_tests", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests", "path": "shopify_product_variant_data.csv", "original_file_path": "seeds/shopify_product_variant_data.csv", "name": "shopify_product_variant_data", "alias": "shopify_product_variant_data", "checksum": {"name": "sha256", "checksum": "3430f8a8a9139a753a727caa7e10ac2ac02c4e2683a37ed933566367d2f6200e"}, "tags": [], "refs": [], "sources": [], "metrics": [], "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 in ('redshift', 'postgres') else false }}", "column_types": {"id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}", "product_id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}", "inventory_item_id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}"}}, "created_at": 1665702404.52826, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests`.`shopify_product_variant_data`"}, "seed.shopify_holistic_reporting_integration_tests.shopify_refund_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": {"_fivetran_synced": "timestamp", "id": "INT64", "order_id": "INT64", "user_id": "INT64"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests", "fqn": ["shopify_holistic_reporting_integration_tests", "shopify_refund_data"], "unique_id": "seed.shopify_holistic_reporting_integration_tests.shopify_refund_data", "package_name": "shopify_holistic_reporting_integration_tests", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests", "path": "shopify_refund_data.csv", "original_file_path": "seeds/shopify_refund_data.csv", "name": "shopify_refund_data", "alias": "shopify_refund_data", "checksum": {"name": "sha256", "checksum": "8d8bc98681d9b0d57a43af3fc99ff13cc42401d97e49bba41c1fafb28f858d23"}, "tags": [], "refs": [], "sources": [], "metrics": [], "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 in ('redshift', 'postgres') else false }}", "column_types": {"id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}", "order_id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}", "user_id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}"}}, "created_at": 1665702404.529408, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests`.`shopify_refund_data`"}, "seed.shopify_holistic_reporting_integration_tests.shopify_transaction_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": {"_fivetran_synced": "timestamp", "id": "INT64", "order_id": "INT64", "refund_id": "INT64", "receipt": "string"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests", "fqn": ["shopify_holistic_reporting_integration_tests", "shopify_transaction_data"], "unique_id": "seed.shopify_holistic_reporting_integration_tests.shopify_transaction_data", "package_name": "shopify_holistic_reporting_integration_tests", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests", "path": "shopify_transaction_data.csv", "original_file_path": "seeds/shopify_transaction_data.csv", "name": "shopify_transaction_data", "alias": "shopify_transaction_data", "checksum": {"name": "sha256", "checksum": "def7b7fc64e42148b900dcd1f7327b470e5d3b0ed8e73f263e46a715ecb09199"}, "tags": [], "refs": [], "sources": [], "metrics": [], "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 in ('redshift', 'postgres') else false }}", "column_types": {"id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}", "order_id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}", "refund_id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}", "receipt": "{{ 'varchar(100)' if target.name in ('redshift', 'postgres') else 'string' }}"}}, "created_at": 1665702404.530432, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests`.`shopify_transaction_data`"}, "seed.shopify_holistic_reporting_integration_tests.flow": {"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": {"_fivetran_synced": "timestamp", "trigger": "string"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests", "fqn": ["shopify_holistic_reporting_integration_tests", "flow"], "unique_id": "seed.shopify_holistic_reporting_integration_tests.flow", "package_name": "shopify_holistic_reporting_integration_tests", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests", "path": "flow.csv", "original_file_path": "seeds/flow.csv", "name": "flow", "alias": "flow", "checksum": {"name": "sha256", "checksum": "8a59e1c986a7509b15603761cb0225587bd8db8ae81ee0b146ca821be8103627"}, "tags": [], "refs": [], "sources": [], "metrics": [], "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": {"trigger": "{{ 'string' if target.type in ('bigquery', 'spark') else 'varchar' }}"}, "enabled": "{{ true if target.type != 'snowflake' else false }}"}, "created_at": 1665702404.53245, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests`.`flow`"}, "seed.shopify_holistic_reporting_integration_tests.shopify_product_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": {"_fivetran_synced": "timestamp", "created_at": "timestamp", "updated_at": "timestamp", "published_at": "timestamp", "id": "INT64"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests", "fqn": ["shopify_holistic_reporting_integration_tests", "shopify_product_data"], "unique_id": "seed.shopify_holistic_reporting_integration_tests.shopify_product_data", "package_name": "shopify_holistic_reporting_integration_tests", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests", "path": "shopify_product_data.csv", "original_file_path": "seeds/shopify_product_data.csv", "name": "shopify_product_data", "alias": "shopify_product_data", "checksum": {"name": "sha256", "checksum": "5cc03f90512ac04a6526220040085e4e0488b62ef22e8b201424c7d7cf1bf847"}, "tags": [], "refs": [], "sources": [], "metrics": [], "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 in ('redshift', 'postgres') else false }}", "column_types": {"created_at": "timestamp", "updated_at": "timestamp", "published_at": "timestamp", "_fivetran_synced": "timestamp", "id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}"}}, "created_at": 1665702404.533605, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests`.`shopify_product_data`"}, "seed.shopify_holistic_reporting_integration_tests.integration": {"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": {"_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests", "fqn": ["shopify_holistic_reporting_integration_tests", "integration"], "unique_id": "seed.shopify_holistic_reporting_integration_tests.integration", "package_name": "shopify_holistic_reporting_integration_tests", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests", "path": "integration.csv", "original_file_path": "seeds/integration.csv", "name": "integration", "alias": "integration", "checksum": {"name": "sha256", "checksum": "7d65e88ffe7faca2f24289441001007cc8222d5bb8f788c2807072bd7bb0b022"}, "tags": [], "refs": [], "sources": [], "metrics": [], "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 in ('redshift', 'postgres') else false }}", "column_types": {"_fivetran_synced": "timestamp"}}, "created_at": 1665702404.5345972, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests`.`integration`"}, "seed.shopify_holistic_reporting_integration_tests.metric": {"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": {"_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests", "fqn": ["shopify_holistic_reporting_integration_tests", "metric"], "unique_id": "seed.shopify_holistic_reporting_integration_tests.metric", "package_name": "shopify_holistic_reporting_integration_tests", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests", "path": "metric.csv", "original_file_path": "seeds/metric.csv", "name": "metric", "alias": "metric", "checksum": {"name": "sha256", "checksum": "155dde6f21d4cf0d8d11b898b4c1f310c2ffbe44c897aaacd5dd31a607bd447a"}, "tags": [], "refs": [], "sources": [], "metrics": [], "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 in ('redshift', 'postgres') else false }}", "column_types": {"_fivetran_synced": "timestamp"}}, "created_at": 1665702404.535552, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests`.`metric`"}, "seed.shopify_holistic_reporting_integration_tests.person": {"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": {"_fivetran_synced": "timestamp", "phone_number": "string"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests", "fqn": ["shopify_holistic_reporting_integration_tests", "person"], "unique_id": "seed.shopify_holistic_reporting_integration_tests.person", "package_name": "shopify_holistic_reporting_integration_tests", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests", "path": "person.csv", "original_file_path": "seeds/person.csv", "name": "person", "alias": "person", "checksum": {"name": "sha256", "checksum": "6f915292a8aba951a356baacc8e65fac88b0a28e98d6cff84f708aeaf68d9ceb"}, "tags": [], "refs": [], "sources": [], "metrics": [], "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 in ('redshift', 'postgres') else false }}", "column_types": {"phone_number": "{{ 'string' if target.type in ('bigquery', 'spark') else 'varchar' }}"}}, "created_at": 1665702404.536522, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests`.`person`"}, "seed.shopify_holistic_reporting_integration_tests.event": {"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": {"_fivetran_synced": "timestamp", "flow_id": "string", "campaign_id": "string"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests", "fqn": ["shopify_holistic_reporting_integration_tests", "event"], "unique_id": "seed.shopify_holistic_reporting_integration_tests.event", "package_name": "shopify_holistic_reporting_integration_tests", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests", "path": "event.csv", "original_file_path": "seeds/event.csv", "name": "event", "alias": "event", "checksum": {"name": "sha256", "checksum": "fb7883912895ceb24123ecd1e37c8cd3d8e837493d1ed2007fd64daf45a8581c"}, "tags": [], "refs": [], "sources": [], "metrics": [], "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 in ('redshift', 'postgres') else false }}", "column_types": {"flow_id": "{{ 'string' if target.type in ('bigquery', 'spark') else 'varchar' }}", "campaign_id": "{{ 'string' if target.type in ('bigquery', 'spark') else 'varchar' }}"}}, "created_at": 1665702404.537636, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests`.`event`"}, "seed.shopify_holistic_reporting_integration_tests.shopify_customer_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": {"_fivetran_synced": "timestamp", "created_at": "timestamp", "updated_at": "timestamp", "id": "INT64", "default_address_id": "INT64"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests", "fqn": ["shopify_holistic_reporting_integration_tests", "shopify_customer_data"], "unique_id": "seed.shopify_holistic_reporting_integration_tests.shopify_customer_data", "package_name": "shopify_holistic_reporting_integration_tests", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests", "path": "shopify_customer_data.csv", "original_file_path": "seeds/shopify_customer_data.csv", "name": "shopify_customer_data", "alias": "shopify_customer_data", "checksum": {"name": "sha256", "checksum": "79bc0a5972c321cefe2973acdd443ce1d42e36b3b23b2298151046d23bdf4bea"}, "tags": [], "refs": [], "sources": [], "metrics": [], "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 in ('redshift', 'postgres') else false }}", "column_types": {"created_at": "timestamp", "updated_at": "timestamp", "_fivetran_synced": "timestamp", "id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}", "default_address_id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}"}}, "created_at": 1665702404.538647, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests`.`shopify_customer_data`"}, "seed.shopify_holistic_reporting_integration_tests.shopify_order_line_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": {"_fivetran_synced": "timestamp", "order_id": "INT64", "id": "INT64", "product_id": "INT64", "variant_id": "INT64"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests", "fqn": ["shopify_holistic_reporting_integration_tests", "shopify_order_line_data"], "unique_id": "seed.shopify_holistic_reporting_integration_tests.shopify_order_line_data", "package_name": "shopify_holistic_reporting_integration_tests", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests", "path": "shopify_order_line_data.csv", "original_file_path": "seeds/shopify_order_line_data.csv", "name": "shopify_order_line_data", "alias": "shopify_order_line_data", "checksum": {"name": "sha256", "checksum": "cabaa49c9bd299b34eb2154893a6dd399fbbad7e4ad7036293c8b4cb599199e0"}, "tags": [], "refs": [], "sources": [], "metrics": [], "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 in ('redshift', 'postgres') else false }}", "column_types": {"_fivetran_synced": "timestamp", "order_id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}", "id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}", "product_id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}", "variant_id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}"}}, "created_at": 1665702404.539656, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests`.`shopify_order_line_data`"}, "seed.shopify_holistic_reporting_integration_tests.campaign": {"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": {"_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests", "fqn": ["shopify_holistic_reporting_integration_tests", "campaign"], "unique_id": "seed.shopify_holistic_reporting_integration_tests.campaign", "package_name": "shopify_holistic_reporting_integration_tests", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests", "path": "campaign.csv", "original_file_path": "seeds/campaign.csv", "name": "campaign", "alias": "campaign", "checksum": {"name": "sha256", "checksum": "e80312165b7d9198633569c5c50aaaf7e73df74dff2d46600adca3fef4b8dd43"}, "tags": [], "refs": [], "sources": [], "metrics": [], "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 in ('redshift', 'postgres') else false }}", "column_types": {"_fivetran_synced": "timestamp"}}, "created_at": 1665702404.5406349, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests`.`campaign`"}, "model.shopify_source.stg_shopify__order_line": {"raw_sql": "with source as (\n\n select * from {{ ref('stg_shopify__order_line_tmp') }}\n\n),\n\nrenamed as (\n\n select\n \n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_shopify__order_line_tmp')),\n staging_columns=get_order_line_columns()\n )\n }}\n\n --The below script allows for pass through columns.\n {% if var('order_line_pass_through_columns') %}\n ,\n {{ var('order_line_pass_through_columns') | join (\", \")}}\n\n {% endif %}\n\n {{ fivetran_utils.source_relation(\n union_schema_variable='shopify_union_schemas', \n union_database_variable='shopify_union_databases') \n }}\n\n from source\n\n)\n\nselect * from renamed", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.shopify_source.get_order_line_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.source_relation"], "nodes": ["model.shopify_source.stg_shopify__order_line_tmp", "model.shopify_source.stg_shopify__order_line_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_stg_shopify", "fqn": ["shopify_source", "stg_shopify__order_line"], "unique_id": "model.shopify_source.stg_shopify__order_line", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "stg_shopify__order_line.sql", "original_file_path": "models/stg_shopify__order_line.sql", "name": "stg_shopify__order_line", "alias": "stg_shopify__order_line", "checksum": {"name": "sha256", "checksum": "bb641f0d784534dc9d6d86bda3391b7c905b0a739c6cf34ef60e4716b5fd86ce"}, "tags": [], "refs": [["stg_shopify__order_line_tmp"], ["stg_shopify__order_line_tmp"]], "sources": [], "metrics": [], "description": "Each record represents a line item from an order in Shopify.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "fulfillable_quantity": {"name": "fulfillable_quantity", "description": "The amount available to fulfill, calculated as follows: quantity - max(refunded_quantity, fulfilled_quantity) - pending_fulfilled_quantity - open_fulfilled_quantity", "meta": {}, "data_type": null, "quote": null, "tags": []}, "fulfillment_service": {"name": "fulfillment_service", "description": "The service provider that's fulfilling the item.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "fulfillment_status": {"name": "fulfillment_status", "description": "How far along an order is in terms line items fulfilled.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_gift_card": {"name": "is_gift_card", "description": "Whether the item is a gift card. If true, then the item is not taxed or considered for shipping charges.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "grams": {"name": "grams", "description": "The weight of the item in grams.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_line_id": {"name": "order_line_id", "description": "The ID of the line item.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "name": {"name": "name", "description": "The name of the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_id": {"name": "order_id", "description": "The ID of the related order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "price": {"name": "price", "description": "The price of the item before discounts have been applied in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "product_id": {"name": "product_id", "description": "The ID of the product that the line item belongs to. Can be null if the original product associated with the order is deleted at a later date.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "quantity": {"name": "quantity", "description": "The number of items that were purchased.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_requiring_shipping": {"name": "is_requiring_shipping", "description": "Whether the item requires shipping.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "sku": {"name": "sku", "description": "The item's SKU (stock keeping unit).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_taxable": {"name": "is_taxable", "description": "Whether the item was taxable.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "title": {"name": "title", "description": "The title of the product.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_discount": {"name": "total_discount", "description": "The total amount of the discount allocated to the line item in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_id": {"name": "variant_id", "description": "The ID of the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "vendor": {"name": "vendor", "description": "The name of the item's supplier.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify_source://models/stg_shopify.yml", "compiled_path": "target/compiled/shopify_source/models/stg_shopify__order_line.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify", "materialized": "table"}, "created_at": 1665702405.01487, "compiled_sql": "with source as (\n\n select * from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__order_line_tmp`\n\n),\n\nrenamed as (\n\n select\n \n \n cast(null as \n timestamp\n) as \n \n _fivetran_synced\n \n , \n cast(null as \n numeric\n) as \n \n fulfillable_quantity\n \n , \n cast(null as \n string\n) as \n \n fulfillment_service\n \n , \n cast(null as \n string\n) as \n \n fulfillment_status\n \n , \n cast(null as boolean) as is_gift_card , \n cast(null as \n numeric\n) as \n \n grams\n \n , \n cast(null as \n numeric\n) as order_line_id , \n cast(null as \n numeric\n) as \n \n index\n \n , \n cast(null as \n string\n) as \n \n name\n \n , \n cast(null as \n numeric\n) as \n \n order_id\n \n , \n cast(null as \n float64\n) as \n \n pre_tax_price\n \n , \n cast(null as \n float64\n) as \n \n price\n \n , \n cast(null as \n numeric\n) as \n \n product_id\n \n , \n cast(null as \n numeric\n) as \n \n property_charge_interval_frequency\n \n , \n cast(null as \n string\n) as \n \n property_for_shipping_jan_3_rd_2020\n \n , \n cast(null as \n numeric\n) as \n \n property_shipping_interval_frequency\n \n , \n cast(null as \n string\n) as \n \n property_shipping_interval_unit_type\n \n , \n cast(null as \n numeric\n) as \n \n property_subscription_id\n \n , \n cast(null as \n numeric\n) as \n \n quantity\n \n , \n cast(null as boolean) as is_requiring_shipping , \n cast(null as \n string\n) as \n \n sku\n \n , \n cast(null as boolean) as is_taxable , \n cast(null as \n string\n) as \n \n title\n \n , \n cast(null as \n float64\n) as \n \n total_discount\n \n , \n cast(null as \n numeric\n) as \n \n variant_id\n \n , \n cast(null as \n string\n) as \n \n vendor\n \n \n\n\n\n --The below script allows for pass through columns.\n \n\n \n\n\n, cast('' as \n string\n) as source_relation\n\n\n\n\n from source\n\n)\n\nselect * from renamed", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__order_line`"}, "model.shopify_source.stg_shopify__refund": {"raw_sql": "--To disable this model, set the shopify__using_refund variable within your dbt_project.yml file to False.\n{{ config(enabled=var('shopify__using_refund', True)) }}\n\nwith source as (\n\n select * \n from {{ ref('stg_shopify__refund_tmp') }}\n\n),\n\nrenamed as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_shopify__refund_tmp')),\n staging_columns=get_refund_columns()\n )\n }}\n\n {{ fivetran_utils.source_relation(\n union_schema_variable='shopify_union_schemas', \n union_database_variable='shopify_union_databases') \n }}\n \n from source\n)\n\nselect * from renamed", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.shopify_source.get_refund_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.source_relation"], "nodes": ["model.shopify_source.stg_shopify__refund_tmp", "model.shopify_source.stg_shopify__refund_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_stg_shopify", "fqn": ["shopify_source", "stg_shopify__refund"], "unique_id": "model.shopify_source.stg_shopify__refund", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "stg_shopify__refund.sql", "original_file_path": "models/stg_shopify__refund.sql", "name": "stg_shopify__refund", "alias": "stg_shopify__refund", "checksum": {"name": "sha256", "checksum": "db92848ca19e65385f44b51e662bc9a3c773fecefe896cbddd1f23d22d078e82"}, "tags": [], "refs": [["stg_shopify__refund_tmp"], ["stg_shopify__refund_tmp"]], "sources": [], "metrics": [], "description": "Each record represents a refund within Shopify.", "columns": {"refund_id": {"name": "refund_id", "description": "The unique numeric identifier for the refund.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "Timestamp of the date when the refund was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "processed_at": {"name": "processed_at", "description": "Timestamp of the date when the refund was processed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "note": {"name": "note", "description": "User generated note attached to the refund.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "restock": {"name": "restock", "description": "Boolean indicating if the refund is a result of a restock.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "user_id": {"name": "user_id", "description": "Reference to the user id which generated the refund.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_duties_set": {"name": "total_duties_set", "description": "Record representing total duties set for the refund.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_id": {"name": "order_id", "description": "Reference to the order which the refund is associated.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify_source://models/stg_shopify.yml", "compiled_path": "target/compiled/shopify_source/models/stg_shopify__refund.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify", "materialized": "table", "enabled": true}, "created_at": 1665702405.034945, "compiled_sql": "--To disable this model, set the shopify__using_refund variable within your dbt_project.yml file to False.\n\n\nwith source as (\n\n select * \n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__refund_tmp`\n\n),\n\nrenamed as (\n\n select\n \n cast(null as \n timestamp\n) as \n \n _fivetran_synced\n \n , \n cast(null as \n timestamp\n) as \n \n created_at\n \n , \n cast(null as \n numeric\n) as refund_id , \n cast(null as \n string\n) as \n \n note\n \n , \n cast(null as \n numeric\n) as \n \n order_id\n \n , \n cast(null as \n timestamp\n) as \n \n processed_at\n \n , \n cast(null as boolean) as \n \n restock\n \n , \n cast(null as \n numeric\n) as \n \n user_id\n \n \n\n\n\n \n\n\n, cast('' as \n string\n) as source_relation\n\n\n\n \n from source\n)\n\nselect * from renamed", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__refund`"}, "model.shopify_source.stg_shopify__product": {"raw_sql": "with source as (\n\n select * from {{ ref('stg_shopify__product_tmp') }}\n\n),\n\nrenamed as (\n\n select\n \n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_shopify__product_tmp')),\n staging_columns=get_product_columns()\n )\n }}\n\n --The below script allows for pass through columns.\n {% if var('product_pass_through_columns') %}\n ,\n {{ var('product_pass_through_columns') | join (\", \")}}\n\n {% endif %}\n\n {{ fivetran_utils.source_relation(\n union_schema_variable='shopify_union_schemas', \n union_database_variable='shopify_union_databases') \n }}\n\n from source\n\n)\n\nselect * from renamed", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.shopify_source.get_product_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.source_relation"], "nodes": ["model.shopify_source.stg_shopify__product_tmp", "model.shopify_source.stg_shopify__product_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_stg_shopify", "fqn": ["shopify_source", "stg_shopify__product"], "unique_id": "model.shopify_source.stg_shopify__product", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "stg_shopify__product.sql", "original_file_path": "models/stg_shopify__product.sql", "name": "stg_shopify__product", "alias": "stg_shopify__product", "checksum": {"name": "sha256", "checksum": "dd30ab5bbf28fc246f4d4625c8057bd05f59c9e8f115d8c72f301b22236b59eb"}, "tags": [], "refs": [["stg_shopify__product_tmp"], ["stg_shopify__product_tmp"]], "sources": [], "metrics": [], "description": "Each record represents a product in Shopify.", "columns": {"_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Whether the record has been deleted in the source system.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_timestamp": {"name": "created_timestamp", "description": "The date and time when the product was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "handle": {"name": "handle", "description": "A unique human-friendly string for the product. Automatically generated from the product's title.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "product_id": {"name": "product_id", "description": "An unsigned 64-bit integer that's used as a unique identifier for the product. Each id is unique across the Shopify system. No two products will have the same id, even if they're from different shops.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "product_type": {"name": "product_type", "description": "A categorization for the product used for filtering and searching products.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "published_timestamp": {"name": "published_timestamp", "description": "The date and time (ISO 8601 format) when the product was published. Can be set to null to unpublish the product from the Online Store channel.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "published_scope": {"name": "published_scope", "description": "Whether the product is published to the Point of Sale channel.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "title": {"name": "title", "description": "The name of the product.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_timestamp": {"name": "updated_timestamp", "description": "The date and time when the product was last modified.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "vendor": {"name": "vendor", "description": "The name of the product's vendor.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify_source://models/stg_shopify.yml", "compiled_path": "target/compiled/shopify_source/models/stg_shopify__product.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify", "materialized": "table"}, "created_at": 1665702405.0258079, "compiled_sql": "with source as (\n\n select * from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__product_tmp`\n\n),\n\nrenamed as (\n\n select\n \n \n cast(null as boolean) as \n \n _fivetran_deleted\n \n , \n cast(null as \n timestamp\n) as \n \n _fivetran_synced\n \n , \n cast(null as \n timestamp\n) as created_timestamp , \n cast(null as \n string\n) as \n \n handle\n \n , \n cast(null as \n numeric\n) as product_id , \n cast(null as \n string\n) as \n \n product_type\n \n , \n cast(null as \n timestamp\n) as published_timestamp , \n cast(null as \n string\n) as \n \n published_scope\n \n , \n cast(null as \n string\n) as \n \n title\n \n , \n cast(null as \n timestamp\n) as updated_timestamp , \n cast(null as \n string\n) as \n \n vendor\n \n \n\n\n\n --The below script allows for pass through columns.\n \n\n \n\n\n, cast('' as \n string\n) as source_relation\n\n\n\n\n from source\n\n)\n\nselect * from renamed", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__product`"}, "model.shopify_source.stg_shopify__product_variant": {"raw_sql": "with source as (\n\n select * from {{ ref('stg_shopify__product_variant_tmp') }}\n\n),\n\nrenamed as (\n\n select\n \n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_shopify__product_variant_tmp')),\n staging_columns=get_product_variant_columns()\n )\n }}\n\n --The below script allows for pass through columns.\n {% if var('product_variant_pass_through_columns') %}\n ,\n {{ var('product_variant_pass_through_columns') | join (\", \")}}\n\n {% endif %}\n\n {{ fivetran_utils.source_relation(\n union_schema_variable='shopify_union_schemas', \n union_database_variable='shopify_union_databases') \n }}\n\n from source\n\n)\n\nselect * from renamed", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.shopify_source.get_product_variant_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.source_relation"], "nodes": ["model.shopify_source.stg_shopify__product_variant_tmp", "model.shopify_source.stg_shopify__product_variant_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_stg_shopify", "fqn": ["shopify_source", "stg_shopify__product_variant"], "unique_id": "model.shopify_source.stg_shopify__product_variant", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "stg_shopify__product_variant.sql", "original_file_path": "models/stg_shopify__product_variant.sql", "name": "stg_shopify__product_variant", "alias": "stg_shopify__product_variant", "checksum": {"name": "sha256", "checksum": "6d09962a9153df0f1b3220ecfe3ecd87997d5e5b87187a985a7c25006ca8b229"}, "tags": [], "refs": [["stg_shopify__product_variant_tmp"], ["stg_shopify__product_variant_tmp"]], "sources": [], "metrics": [], "description": "Each record represents a product variant in Shopify", "columns": {"barcode": {"name": "barcode", "description": "The barcode, UPC, or ISBN number for the product.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "compare_at_price": {"name": "compare_at_price", "description": "The original price of the item before an adjustment or a sale.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_timestamp": {"name": "created_timestamp", "description": "The date and time (ISO 8601 format) when the product variant was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "fulfillment_service": {"name": "fulfillment_service", "description": "The fulfillment service associated with the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "grams": {"name": "grams", "description": "The weight of the product variant in grams.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_id": {"name": "variant_id", "description": "The unique numeric identifier for the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "image_id": {"name": "image_id", "description": "The unique numeric identifier for a product's image. The image must be associated to the same product as the variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "inventory_item_id": {"name": "inventory_item_id", "description": "The unique identifier for the inventory item, which is used in the Inventory API to query for inventory information.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "inventory_management": {"name": "inventory_management", "description": "The fulfillment service that tracks the number of items in stock for the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "inventory_policy": {"name": "inventory_policy", "description": "Whether customers are allowed to place an order for the product variant when it's out of stock.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "inventory_quantity": {"name": "inventory_quantity", "description": "An aggregate of inventory across all locations. To adjust inventory at a specific location, use the InventoryLevel resource.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "old_inventory_quantity": {"name": "old_inventory_quantity", "description": "This property is deprecated. Use the InventoryLevel resource instead.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "option_1": {"name": "option_1", "description": "The custom properties that a shop owner uses to define product variants. You can define three options for a product variant: option1, option2, option3.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "option_2": {"name": "option_2", "description": "The custom properties that a shop owner uses to define product variants. You can define three options for a product variant: option1, option2, option3.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "option_3": {"name": "option_3", "description": "The custom properties that a shop owner uses to define product variants. You can define three options for a product variant: option1, option2, option3.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "position": {"name": "position", "description": "The order of the product variant in the list of product variants. The first position in the list is 1. The position of variants is indicated by the order in which they are listed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "price": {"name": "price", "description": "The price of the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "product_id": {"name": "product_id", "description": "The unique numeric identifier for the product.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_requiring_shipping": {"name": "is_requiring_shipping", "description": "This property is deprecated. Use the `requires_shipping` property on the InventoryItem resource instead.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "sku": {"name": "sku", "description": "A unique identifier for the product variant in the shop. Required in order to connect to a FulfillmentService.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_taxable": {"name": "is_taxable", "description": "Whether a tax is charged when the product variant is sold.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tax_code": {"name": "tax_code", "description": "This parameter applies only to the stores that have the Avalara AvaTax app installed. Specifies the Avalara tax code for the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "title": {"name": "title", "description": "The title of the product variant. The title field is a concatenation of the option1, option2, and option3 fields. You can only update title indirectly using the option fields.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_timestamp": {"name": "updated_timestamp", "description": "The date and time when the product variant was last modified. Gets returned in ISO 8601 format.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "weight": {"name": "weight", "description": "The weight of the product variant in the unit system specified with weight_unit.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "weight_unit": {"name": "weight_unit", "description": "The unit of measurement that applies to the product variant's weight. If you don't specify a value for weight_unit, then the shop's default unit of measurement is applied. Valid values: g, kg, oz, and lb.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify_source://models/stg_shopify.yml", "compiled_path": "target/compiled/shopify_source/models/stg_shopify__product_variant.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify", "materialized": "table"}, "created_at": 1665702405.02949, "compiled_sql": "with source as (\n\n select * from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__product_variant_tmp`\n\n),\n\nrenamed as (\n\n select\n \n \n cast(null as \n numeric\n) as variant_id , \n cast(null as \n timestamp\n) as \n \n _fivetran_synced\n \n , \n cast(null as \n timestamp\n) as created_timestamp , \n cast(null as \n timestamp\n) as updated_timestamp , \n cast(null as \n numeric\n) as \n \n product_id\n \n , \n cast(null as \n numeric\n) as \n \n inventory_item_id\n \n , \n cast(null as \n numeric\n) as \n \n image_id\n \n , \n cast(null as \n string\n) as \n \n title\n \n , \n cast(null as \n float64\n) as \n \n price\n \n , \n cast(null as \n string\n) as \n \n sku\n \n , \n cast(null as \n numeric\n) as \n \n position\n \n , \n cast(null as \n string\n) as \n \n inventory_policy\n \n , \n cast(null as \n float64\n) as \n \n compare_at_price\n \n , \n cast(null as \n string\n) as \n \n fulfillment_service\n \n , \n cast(null as \n string\n) as \n \n inventory_management\n \n , \n cast(null as boolean) as is_taxable , \n cast(null as \n string\n) as \n \n barcode\n \n , \n cast(null as \n float64\n) as \n \n grams\n \n , \n cast(null as \n numeric\n) as \n \n inventory_quantity\n \n , \n cast(null as \n float64\n) as \n \n weight\n \n , \n cast(null as \n string\n) as \n \n weight_unit\n \n , \n cast(null as \n string\n) as \n \n option_1\n \n , \n cast(null as \n string\n) as \n \n option_2\n \n , \n cast(null as \n string\n) as \n \n option_3\n \n , \n cast(null as \n string\n) as \n \n tax_code\n \n , \n cast(null as \n numeric\n) as \n \n old_inventory_quantity\n \n , \n cast(null as boolean) as is_requiring_shipping \n\n\n\n --The below script allows for pass through columns.\n \n\n \n\n\n, cast('' as \n string\n) as source_relation\n\n\n\n\n from source\n\n)\n\nselect * from renamed", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__product_variant`"}, "model.shopify_source.stg_shopify__order": {"raw_sql": "with source as (\n\n select * from {{ ref('stg_shopify__order_tmp') }}\n\n),\n\nrenamed as (\n\n select\n \n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_shopify__order_tmp')),\n staging_columns=get_order_columns()\n )\n }}\n\n --The below script allows for pass through columns.\n {% if var('order_pass_through_columns') %}\n ,\n {{ var('order_pass_through_columns') | join (\", \")}}\n\n {% endif %}\n\n {{ fivetran_utils.source_relation(\n union_schema_variable='shopify_union_schemas', \n union_database_variable='shopify_union_databases') \n }}\n\n from source\n\n)\n\nselect * from renamed", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.shopify_source.get_order_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.source_relation"], "nodes": ["model.shopify_source.stg_shopify__order_tmp", "model.shopify_source.stg_shopify__order_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_stg_shopify", "fqn": ["shopify_source", "stg_shopify__order"], "unique_id": "model.shopify_source.stg_shopify__order", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "stg_shopify__order.sql", "original_file_path": "models/stg_shopify__order.sql", "name": "stg_shopify__order", "alias": "stg_shopify__order", "checksum": {"name": "sha256", "checksum": "a4b7cdee44f261fe11e487f1022c1f7bd57196220a453bff382c1876ee5a2192"}, "tags": [], "refs": [["stg_shopify__order_tmp"], ["stg_shopify__order_tmp"]], "sources": [], "metrics": [], "description": "Each record represents an order in Shopify.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "app_id": {"name": "app_id", "description": "The ID of the app that created the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_address_1": {"name": "billing_address_address_1", "description": "The street address of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_address_2": {"name": "billing_address_address_2", "description": "An optional additional field for the street address of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_city": {"name": "billing_address_city", "description": "The city, town, or village of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_company": {"name": "billing_address_company", "description": "The company of the person associated with the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_country": {"name": "billing_address_country", "description": "The name of the country of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_country_code": {"name": "billing_address_country_code", "description": "The two-letter code (ISO 3166-1 format) for the country of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_first_name": {"name": "billing_address_first_name", "description": "The first name of the person associated with the payment method.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_last_name": {"name": "billing_address_last_name", "description": "The last name of the person associated with the payment method.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_latitude": {"name": "billing_address_latitude", "description": "The latitude of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_longitude": {"name": "billing_address_longitude", "description": "The longitude of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_name": {"name": "billing_address_name", "description": "The full name of the person associated with the payment method.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_phone": {"name": "billing_address_phone", "description": "The phone number at the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_province": {"name": "billing_address_province", "description": "The name of the region (province, state, prefecture, \u2026) of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_province_code": {"name": "billing_address_province_code", "description": "The two-letter abbreviation of the region of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_zip": {"name": "billing_address_zip", "description": "The postal code (zip, postcode, Eircode, \u2026) of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "browser_ip": {"name": "browser_ip", "description": "The IP address of the browser used by the customer when they placed the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "has_buyer_accepted_marketing": {"name": "has_buyer_accepted_marketing", "description": "Whether the customer consented to receive email updates from the shop.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "cancel_reason": {"name": "cancel_reason", "description": "The reason why the order was canceled.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "cancelled_timestamp": {"name": "cancelled_timestamp", "description": "The date and time when the order was canceled.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "cart_token": {"name": "cart_token", "description": "The ID of the cart that's associated with the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "closed_timestamp": {"name": "closed_timestamp", "description": "The date and time when the order was closed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_timestamp": {"name": "created_timestamp", "description": "The autogenerated date and time when the order was created in Shopify.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "The three-letter code for the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "customer_id": {"name": "customer_id", "description": "The ID of the order's customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email": {"name": "email", "description": "The customer's email address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "financial_status": {"name": "financial_status", "description": "The status of payments associated with the order. Can only be set when the order is created", "meta": {}, "data_type": null, "quote": null, "tags": []}, "fulfillment_status": {"name": "fulfillment_status", "description": "The order's status in terms of fulfilled line items.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_id": {"name": "order_id", "description": "The ID of the order, used for API purposes. This is different from the order_number property, which is the ID used by the shop owner and customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "landing_site_base_url": {"name": "landing_site_base_url", "description": "The URL for the page where the buyer landed when they entered the shop.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "location_id": {"name": "location_id", "description": "The ID of the physical location where the order was processed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "name": {"name": "name", "description": "The order name, generated by combining the order_number property with the order prefix and suffix that are set in the merchant's general settings.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "note": {"name": "note", "description": "An optional note that a shop owner can attach to the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "number": {"name": "number", "description": "The order's position in the shop's count of orders. Numbers are sequential and start at 1.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_number": {"name": "order_number", "description": "The order 's position in the shop's count of orders starting at 1001. Order numbers are sequential and start at 1001.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "processed_timestamp": {"name": "processed_timestamp", "description": "The date and time when an order was processed. This value is the date that appears on your orders and that's used in the analytic reports.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "processing_method": {"name": "processing_method", "description": "How the payment was processed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "referring_site": {"name": "referring_site", "description": "The website where the customer clicked a link to the shop.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_address_1": {"name": "shipping_address_address_1", "description": "The street address of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_address_2": {"name": "shipping_address_address_2", "description": "An optional additional field for the street address of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_city": {"name": "shipping_address_city", "description": "The city, town, or village of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_company": {"name": "shipping_address_company", "description": "The company of the person associated with the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_country": {"name": "shipping_address_country", "description": "The name of the country of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_country_code": {"name": "shipping_address_country_code", "description": "The two-letter code (ISO 3166-1 format) for the country of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_first_name": {"name": "shipping_address_first_name", "description": "The first name of the person associated with the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_last_name": {"name": "shipping_address_last_name", "description": "The last name of the person associated with the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_latitude": {"name": "shipping_address_latitude", "description": "The latitude of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_longitude": {"name": "shipping_address_longitude", "description": "The longitude of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_name": {"name": "shipping_address_name", "description": "The full name of the person associated with the payment method.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_phone": {"name": "shipping_address_phone", "description": "The phone number at the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_province": {"name": "shipping_address_province", "description": "The name of the region (province, state, prefecture, \u2026) of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_province_code": {"name": "shipping_address_province_code", "description": "The two-letter abbreviation of the region of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_zip": {"name": "shipping_address_zip", "description": "The postal code (zip, postcode, Eircode, \u2026) of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_name": {"name": "source_name", "description": "Where the order originated. Can be set only during order creation, and is not writeable afterwards.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "subtotal_price": {"name": "subtotal_price", "description": "The price of the order in the shop currency after discounts but before shipping, taxes, and tips.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "has_taxes_included": {"name": "has_taxes_included", "description": "Whether taxes are included in the order subtotal.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_test_order": {"name": "is_test_order", "description": "Whether this is a test order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "token": {"name": "token", "description": "A unique token for the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_discounts": {"name": "total_discounts", "description": "The total discounts applied to the price of the order in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_line_items_price": {"name": "total_line_items_price", "description": "The sum of all line item prices in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_price": {"name": "total_price", "description": "The sum of all line item prices, discounts, shipping, taxes, and tips in the shop currency. Must be positive.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_tax": {"name": "total_tax", "description": "The sum of all the taxes applied to the order in th shop currency. Must be positive).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_weight": {"name": "total_weight", "description": "The sum of all line item weights in grams.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_timestamp": {"name": "updated_timestamp", "description": "The date and time (ISO 8601 format) when the order was last modified.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "user_id": {"name": "user_id", "description": "The ID of the user logged into Shopify POS who processed the order, if applicable.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_shipping_price_set": {"name": "total_shipping_price_set", "description": "The total shipping price set for the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "index": {"name": "index", "description": "The index associated with the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "pre_tax_price": {"name": "pre_tax_price", "description": "The total pre tax price of the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify_source://models/stg_shopify.yml", "compiled_path": "target/compiled/shopify_source/models/stg_shopify__order.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify", "materialized": "table"}, "created_at": 1665702405.024142, "compiled_sql": "with source as (\n\n select * from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__order_tmp`\n\n),\n\nrenamed as (\n\n select\n \n \n cast(null as \n numeric\n) as order_id , \n cast(null as \n timestamp\n) as processed_timestamp , \n cast(null as \n timestamp\n) as updated_timestamp , \n cast(null as \n numeric\n) as \n \n user_id\n \n , \n cast(null as \n float64\n) as \n \n total_discounts\n \n , \n cast(null as \n float64\n) as \n \n total_line_items_price\n \n , \n cast(null as \n float64\n) as \n \n total_price\n \n , \n cast(null as \n float64\n) as \n \n total_tax\n \n , \n cast(null as \n string\n) as \n \n source_name\n \n , \n cast(null as \n float64\n) as \n \n subtotal_price\n \n , \n cast(null as boolean) as has_taxes_included , \n cast(null as \n numeric\n) as \n \n total_weight\n \n , \n cast(null as \n string\n) as \n \n landing_site_base_url\n \n , \n cast(null as \n numeric\n) as \n \n location_id\n \n , \n cast(null as \n string\n) as \n \n name\n \n , \n cast(null as \n string\n) as \n \n note\n \n , \n cast(null as \n numeric\n) as \n \n number\n \n , \n cast(null as \n numeric\n) as \n \n order_number\n \n , \n cast(null as \n string\n) as \n \n cancel_reason\n \n , \n cast(null as \n timestamp\n) as cancelled_timestamp , \n cast(null as \n string\n) as \n \n cart_token\n \n , \n cast(null as \n string\n) as \n \n checkout_token\n \n , \n cast(null as \n timestamp\n) as closed_timestamp , \n cast(null as \n timestamp\n) as created_timestamp , \n cast(null as \n string\n) as \n \n currency\n \n , \n cast(null as \n numeric\n) as \n \n customer_id\n \n , \n cast(null as \n string\n) as \n \n email\n \n , \n cast(null as \n string\n) as \n \n financial_status\n \n , \n cast(null as \n string\n) as \n \n fulfillment_status\n \n , \n cast(null as \n string\n) as \n \n processing_method\n \n , \n cast(null as \n string\n) as \n \n referring_site\n \n , \n cast(null as \n string\n) as \n \n billing_address_address_1\n \n , \n cast(null as \n string\n) as \n \n billing_address_address_2\n \n , \n cast(null as \n string\n) as \n \n billing_address_city\n \n , \n cast(null as \n string\n) as \n \n billing_address_company\n \n , \n cast(null as \n string\n) as \n \n billing_address_country\n \n , \n cast(null as \n string\n) as \n \n billing_address_country_code\n \n , \n cast(null as \n string\n) as \n \n billing_address_first_name\n \n , \n cast(null as \n string\n) as \n \n billing_address_last_name\n \n , \n cast(null as \n string\n) as \n \n billing_address_latitude\n \n , \n cast(null as \n string\n) as \n \n billing_address_longitude\n \n , \n cast(null as \n string\n) as \n \n billing_address_name\n \n , \n cast(null as \n string\n) as \n \n billing_address_phone\n \n , \n cast(null as \n string\n) as \n \n billing_address_province\n \n , \n cast(null as \n string\n) as \n \n billing_address_province_code\n \n , \n cast(null as \n string\n) as \n \n billing_address_zip\n \n , \n cast(null as \n string\n) as \n \n browser_ip\n \n , \n cast(null as boolean) as has_buyer_accepted_marketing , \n cast(null as \n string\n) as \n \n total_shipping_price_set\n \n , \n cast(null as \n string\n) as \n \n shipping_address_address_1\n \n , \n cast(null as \n string\n) as \n \n shipping_address_address_2\n \n , \n cast(null as \n string\n) as \n \n shipping_address_city\n \n , \n cast(null as \n string\n) as \n \n shipping_address_company\n \n , \n cast(null as \n string\n) as \n \n shipping_address_country\n \n , \n cast(null as \n string\n) as \n \n shipping_address_country_code\n \n , \n cast(null as \n string\n) as \n \n shipping_address_first_name\n \n , \n cast(null as \n string\n) as \n \n shipping_address_last_name\n \n , \n cast(null as \n string\n) as \n \n shipping_address_latitude\n \n , \n cast(null as \n string\n) as \n \n shipping_address_longitude\n \n , \n cast(null as \n string\n) as \n \n shipping_address_name\n \n , \n cast(null as \n string\n) as \n \n shipping_address_phone\n \n , \n cast(null as \n string\n) as \n \n shipping_address_province\n \n , \n cast(null as \n string\n) as \n \n shipping_address_province_code\n \n , \n cast(null as \n string\n) as \n \n shipping_address_zip\n \n , \n cast(null as boolean) as is_test_order , \n cast(null as \n string\n) as \n \n token\n \n , \n cast(null as \n timestamp\n) as \n \n _fivetran_synced\n \n \n\n\n\n --The below script allows for pass through columns.\n \n\n \n\n\n, cast('' as \n string\n) as source_relation\n\n\n\n\n from source\n\n)\n\nselect * from renamed", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__order`"}, "model.shopify_source.stg_shopify__transaction": {"raw_sql": "with source as (\n\n select * from {{ ref('stg_shopify__transaction_tmp') }}\n\n),\n\nrenamed as (\n\n select\n\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_shopify__transaction_tmp')),\n staging_columns=get_transaction_columns()\n )\n }}\n\n --The below script allows for pass through columns.\n {% if var('transaction_pass_through_columns') %}\n ,\n {{ var('transaction_pass_through_columns') | join (\", \")}}\n\n {% endif %}\n\n {{ fivetran_utils.source_relation(\n union_schema_variable='shopify_union_schemas', \n union_database_variable='shopify_union_databases') \n }}\n\n from source\n where not test\n\n)\n\nselect * from renamed", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.shopify_source.get_transaction_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.source_relation"], "nodes": ["model.shopify_source.stg_shopify__transaction_tmp", "model.shopify_source.stg_shopify__transaction_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_stg_shopify", "fqn": ["shopify_source", "stg_shopify__transaction"], "unique_id": "model.shopify_source.stg_shopify__transaction", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "stg_shopify__transaction.sql", "original_file_path": "models/stg_shopify__transaction.sql", "name": "stg_shopify__transaction", "alias": "stg_shopify__transaction", "checksum": {"name": "sha256", "checksum": "b837eb0c1661d2817ccb6a1c3123e7d146dbbd9a63ea1fe0ad52ba8a1742ecbe"}, "tags": [], "refs": [["stg_shopify__transaction_tmp"], ["stg_shopify__transaction_tmp"]], "sources": [], "metrics": [], "description": "Each record represents a transaction in Shopify.", "columns": {"transaction_id": {"name": "transaction_id", "description": "The ID for the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_id": {"name": "order_id", "description": "The ID for the order that the transaction is associated with.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refund_id": {"name": "refund_id", "description": "The ID associated with a refund in the refund table.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "amount": {"name": "amount", "description": "The amount of money included in the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "authorization": {"name": "authorization", "description": "The authorization code associated with the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_timestamp": {"name": "created_timestamp", "description": "The date and time when the transaction was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "processed_timestamp": {"name": "processed_timestamp", "description": "The date and time when a transaction was processed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "device_id": {"name": "device_id", "description": "The ID for the device.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "gateway": {"name": "gateway", "description": "The name of the gateway the transaction was issued through.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_name": {"name": "source_name", "description": "The origin of the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "message": {"name": "message", "description": "A string generated by the payment provider with additional information about why the transaction succeeded or failed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "The three-letter code (ISO 4217 format) for the currency used for the payment.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "location_id": {"name": "location_id", "description": "The ID of the physical location where the transaction was processed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "parent_id": {"name": "parent_id", "description": "The ID of an associated transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payment_avs_result_code": {"name": "payment_avs_result_code", "description": "The response code from the address verification system.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payment_credit_card_bin": {"name": "payment_credit_card_bin", "description": "The issuer identification number (IIN), formerly known as bank identification number (BIN) of the customer's credit card.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payment_cvv_result_code": {"name": "payment_cvv_result_code", "description": "The response code from the credit card company indicating whether the customer entered the card security code, or card verification value, correctly.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payment_credit_card_number": {"name": "payment_credit_card_number", "description": "The customer's credit card number, with most of the leading digits redacted.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payment_credit_card_company": {"name": "payment_credit_card_company", "description": "The name of the company that issued the customer's credit card.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "kind": {"name": "kind", "description": "The transaction's type.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "receipt": {"name": "receipt", "description": "A transaction receipt attached to the transaction by the gateway.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency_exchange_id": {"name": "currency_exchange_id", "description": "The ID of the adjustment.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency_exchange_adjustment": {"name": "currency_exchange_adjustment", "description": "The difference between the amounts on the associated transaction and the parent transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency_exchange_original_amount": {"name": "currency_exchange_original_amount", "description": "The amount of the parent transaction in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency_exchange_final_amount": {"name": "currency_exchange_final_amount", "description": "The amount of the associated transaction in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency_exchange_currency": {"name": "currency_exchange_currency", "description": "The shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "error_code": {"name": "error_code", "description": "A standardized error code, independent of the payment provider.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status": {"name": "status", "description": "The status of the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "test": {"name": "test", "description": "Whether the transaction is a test transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "user_id": {"name": "user_id", "description": "The ID for the user who was logged into the Shopify POS device when the order was processed, if applicable.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify_source://models/stg_shopify.yml", "compiled_path": "target/compiled/shopify_source/models/stg_shopify__transaction.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify", "materialized": "table"}, "created_at": 1665702405.033545, "compiled_sql": "with source as (\n\n select * from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__transaction_tmp`\n\n),\n\nrenamed as (\n\n select\n\n \n cast(null as \n numeric\n) as transaction_id , \n cast(null as \n numeric\n) as \n \n order_id\n \n , \n cast(null as \n numeric\n) as \n \n refund_id\n \n , \n cast(null as \n numeric\n) as \n \n amount\n \n , \n cast(null as \n timestamp\n) as created_timestamp , \n cast(null as \n timestamp\n) as processed_timestamp , \n cast(null as \n numeric\n) as \n \n device_id\n \n , \n cast(null as \n string\n) as \n \n gateway\n \n , \n cast(null as \n string\n) as \n \n source_name\n \n , \n cast(null as \n string\n) as \n \n message\n \n , \n cast(null as \n string\n) as \n \n currency\n \n , \n cast(null as \n numeric\n) as \n \n location_id\n \n , \n cast(null as \n numeric\n) as \n \n parent_id\n \n , \n cast(null as \n string\n) as \n \n payment_avs_result_code\n \n , \n cast(null as \n string\n) as \n \n payment_credit_card_bin\n \n , \n cast(null as \n string\n) as \n \n payment_cvv_result_code\n \n , \n cast(null as \n string\n) as \n \n payment_credit_card_number\n \n , \n cast(null as \n string\n) as \n \n payment_credit_card_company\n \n , \n cast(null as \n string\n) as \n \n kind\n \n , \n cast(null as \n string\n) as \n \n receipt\n \n , \n cast(null as \n numeric\n) as \n \n currency_exchange_id\n \n , \n cast(null as \n numeric\n) as \n \n currency_exchange_adjustment\n \n , \n cast(null as \n numeric\n) as \n \n currency_exchange_original_amount\n \n , \n cast(null as \n numeric\n) as \n \n currency_exchange_final_amount\n \n , \n cast(null as \n string\n) as \n \n currency_exchange_currency\n \n , \n cast(null as \n string\n) as \n \n error_code\n \n , \n cast(null as \n string\n) as \n \n status\n \n , \n cast(null as boolean) as \n \n test\n \n , \n cast(null as \n numeric\n) as \n \n user_id\n \n , \n cast(null as \n timestamp\n) as \n \n _fivetran_synced\n \n \n\n\n\n --The below script allows for pass through columns.\n \n\n \n\n\n, cast('' as \n string\n) as source_relation\n\n\n\n\n from source\n where not test\n\n)\n\nselect * from renamed", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__transaction`"}, "model.shopify_source.stg_shopify__order_adjustment": {"raw_sql": "--To disable this model, set the shopify__using_order_adjustment variable within your dbt_project.yml file to False.\n{{ config(enabled=var('shopify__using_order_adjustment', True)) }}\n\nwith source as (\n\n select * \n from {{ ref('stg_shopify__order_adjustment_tmp') }}\n\n),\n\nrenamed as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_shopify__order_adjustment_tmp')),\n staging_columns=get_order_adjustment_columns()\n )\n }}\n\n {{ fivetran_utils.source_relation(\n union_schema_variable='shopify_union_schemas', \n union_database_variable='shopify_union_databases') \n }}\n \n from source\n)\n\nselect * from renamed", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.shopify_source.get_order_adjustment_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.source_relation"], "nodes": ["model.shopify_source.stg_shopify__order_adjustment_tmp", "model.shopify_source.stg_shopify__order_adjustment_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_stg_shopify", "fqn": ["shopify_source", "stg_shopify__order_adjustment"], "unique_id": "model.shopify_source.stg_shopify__order_adjustment", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "stg_shopify__order_adjustment.sql", "original_file_path": "models/stg_shopify__order_adjustment.sql", "name": "stg_shopify__order_adjustment", "alias": "stg_shopify__order_adjustment", "checksum": {"name": "sha256", "checksum": "b494a4c88cf235fb0b11c020d004bcf0904e9d1ae235144330d3d24b37ad4318"}, "tags": [], "refs": [["stg_shopify__order_adjustment_tmp"], ["stg_shopify__order_adjustment_tmp"]], "sources": [], "metrics": [], "description": "Each record represents and adjustment to and order within Shopify.", "columns": {"order_adjustment_id": {"name": "order_adjustment_id", "description": "The unique numeric identifier for the order adjustment.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_id": {"name": "order_id", "description": "Reference to the order which the adjustment is associated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refund_id": {"name": "refund_id", "description": "Reference to the refund which the adjustment is associated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "amount": {"name": "amount", "description": "Amount of the adjustment.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tax_amount": {"name": "tax_amount", "description": "Tax amount applied to the order adjustment.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "kind": {"name": "kind", "description": "The kind of order adjustment (eg. refund, restock, etc.).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "reason": {"name": "reason", "description": "The reason for the order adjustment.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "amount_set": {"name": "amount_set", "description": "Amount set towards the order adjustment", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tax_amount_set": {"name": "tax_amount_set", "description": "Tax amount set towards the order adjustment.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify_source://models/stg_shopify.yml", "compiled_path": "target/compiled/shopify_source/models/stg_shopify__order_adjustment.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify", "materialized": "table", "enabled": true}, "created_at": 1665702405.036482, "compiled_sql": "--To disable this model, set the shopify__using_order_adjustment variable within your dbt_project.yml file to False.\n\n\nwith source as (\n\n select * \n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__order_adjustment_tmp`\n\n),\n\nrenamed as (\n\n select\n \n cast(null as \n numeric\n) as order_adjustment_id , \n cast(null as \n numeric\n) as \n \n order_id\n \n , \n cast(null as \n numeric\n) as \n \n refund_id\n \n , \n cast(null as \n float64\n) as \n \n amount\n \n , \n cast(null as \n float64\n) as \n \n tax_amount\n \n , \n cast(null as \n string\n) as \n \n kind\n \n , \n cast(null as \n string\n) as \n \n reason\n \n , \n cast(null as \n timestamp\n) as \n \n _fivetran_synced\n \n \n\n\n\n \n\n\n, cast('' as \n string\n) as source_relation\n\n\n\n \n from source\n)\n\nselect * from renamed", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__order_adjustment`"}, "model.shopify_source.stg_shopify__customer": {"raw_sql": "with source as (\n\n select * from {{ ref('stg_shopify__customer_tmp') }}\n\n),\n\nrenamed as (\n\n select\n \n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_shopify__customer_tmp')),\n staging_columns=get_customer_columns()\n )\n }}\n\n --The below script allows for pass through columns.\n {% if var('customer_pass_through_columns') %}\n ,\n {{ var('customer_pass_through_columns') | join (\", \")}}\n\n {% endif %}\n\n {{ fivetran_utils.source_relation(\n union_schema_variable='shopify_union_schemas', \n union_database_variable='shopify_union_databases') \n }}\n\n from source\n\n)\n\nselect * from renamed", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.shopify_source.get_customer_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.source_relation"], "nodes": ["model.shopify_source.stg_shopify__customer_tmp", "model.shopify_source.stg_shopify__customer_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_stg_shopify", "fqn": ["shopify_source", "stg_shopify__customer"], "unique_id": "model.shopify_source.stg_shopify__customer", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "stg_shopify__customer.sql", "original_file_path": "models/stg_shopify__customer.sql", "name": "stg_shopify__customer", "alias": "stg_shopify__customer", "checksum": {"name": "sha256", "checksum": "e43df3b376bae7b581cfb9514f59c82263bbba83447e9bd440a214e8c2dca709"}, "tags": [], "refs": [["stg_shopify__customer_tmp"], ["stg_shopify__customer_tmp"]], "sources": [], "metrics": [], "description": "Each record represents a customer in Shopify.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "has_accepted_marketing": {"name": "has_accepted_marketing", "description": "Whether the customer has consented to receive marketing material via email.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_timestamp": {"name": "created_timestamp", "description": "The date and time when the customer was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "default_address_id": {"name": "default_address_id", "description": "The default address for the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email": {"name": "email", "description": "The unique email address of the customer. Attempting to assign the same email address to multiple customers returns an error.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_name": {"name": "first_name", "description": "The customer's first name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "customer_id": {"name": "customer_id", "description": "A unique identifier for the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_name": {"name": "last_name", "description": "The customer's last name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "orders_count": {"name": "orders_count", "description": "The number of orders associated with this customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "phone": {"name": "phone", "description": "The unique phone number (E.164 format) for this customer. Attempting to assign the same phone number to multiple customers returns an error.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "account_state": {"name": "account_state", "description": "The state of the customer's account with a shop.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_tax_exempt": {"name": "is_tax_exempt", "description": "Whether the customer is exempt from paying taxes on their order. If true, then taxes won't be applied to an order at checkout. If false, then taxes will be applied at checkout.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_spent": {"name": "total_spent", "description": "The total amount of money that the customer has spent across their order history.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_timestamp": {"name": "updated_timestamp", "description": "The date and time when the customer information was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_verified_email": {"name": "is_verified_email", "description": "Whether the customer has verified their email address.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify_source://models/stg_shopify.yml", "compiled_path": "target/compiled/shopify_source/models/stg_shopify__customer.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify", "materialized": "table"}, "created_at": 1665702405.010729, "compiled_sql": "with source as (\n\n select * from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__customer_tmp`\n\n),\n\nrenamed as (\n\n select\n \n \n cast(null as \n timestamp\n) as \n \n _fivetran_synced\n \n , \n cast(null as boolean) as has_accepted_marketing , \n cast(null as \n timestamp\n) as created_timestamp , \n cast(null as \n numeric\n) as \n \n default_address_id\n \n , \n cast(null as \n string\n) as \n \n email\n \n , \n cast(null as \n string\n) as \n \n first_name\n \n , \n cast(null as \n numeric\n) as customer_id , \n cast(null as \n string\n) as \n \n last_name\n \n , \n cast(null as \n numeric\n) as \n \n orders_count\n \n , \n cast(null as \n string\n) as \n \n phone\n \n , \n cast(null as \n string\n) as account_state , \n cast(null as boolean) as is_tax_exempt , \n cast(null as \n float64\n) as \n \n total_spent\n \n , \n cast(null as \n timestamp\n) as updated_timestamp , \n cast(null as boolean) as is_verified_email \n\n\n\n --The below script allows for pass through columns.\n \n\n \n\n\n, cast('' as \n string\n) as source_relation\n\n\n\n\n from source\n\n)\n\nselect * from renamed", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__customer`"}, "model.shopify_source.stg_shopify__order_line_refund": {"raw_sql": "--To disable this model, set the shopify__using_order_line_refund variable within your dbt_project.yml file to False.\n{{ config(enabled=var('shopify__using_order_line_refund', True)) }}\n\nwith source as (\n\n select * from {{ ref('stg_shopify__order_line_refund_tmp') }}\n\n),\n\nrenamed as (\n\n select\n \n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_shopify__order_line_refund_tmp')),\n staging_columns=get_order_line_refund_columns()\n )\n }}\n\n --The below script allows for pass through columns.\n {% if var('order_line_refund_pass_through_columns') %}\n ,\n {{ var('order_line_refund_pass_through_columns') | join (\", \")}}\n\n {% endif %}\n\n {{ fivetran_utils.source_relation(\n union_schema_variable='shopify_union_schemas', \n union_database_variable='shopify_union_databases') \n }}\n\n from source\n\n)\n\nselect * from renamed", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.shopify_source.get_order_line_refund_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.source_relation"], "nodes": ["model.shopify_source.stg_shopify__order_line_refund_tmp", "model.shopify_source.stg_shopify__order_line_refund_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_stg_shopify", "fqn": ["shopify_source", "stg_shopify__order_line_refund"], "unique_id": "model.shopify_source.stg_shopify__order_line_refund", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "stg_shopify__order_line_refund.sql", "original_file_path": "models/stg_shopify__order_line_refund.sql", "name": "stg_shopify__order_line_refund", "alias": "stg_shopify__order_line_refund", "checksum": {"name": "sha256", "checksum": "0d7b02b07f95694dd5358ec919659f16bdccf708f906546b99f448355b1253cd"}, "tags": [], "refs": [["stg_shopify__order_line_refund_tmp"], ["stg_shopify__order_line_refund_tmp"]], "sources": [], "metrics": [], "description": "Each record represents a line item from an order in Shopify.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_line_refund_id": {"name": "order_line_refund_id", "description": "The unique identifier of the line item in the refund.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "location_id": {"name": "location_id", "description": "TThe unique identifier of the location where the items will be restockedBD", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_line_id": {"name": "order_line_id", "description": "The ID of the related line item in the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "quantity": {"name": "quantity", "description": "The quantity of the associated line item that was returned.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refund_id": {"name": "refund_id", "description": "The ID of the related refund.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "restock_type": {"name": "restock_type", "description": "How this refund line item affects inventory levels.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "subtotal": {"name": "subtotal", "description": "Subtotal amount of the order line refund", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_tax": {"name": "total_tax", "description": "The total tax applied to the refund.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify_source://models/stg_shopify.yml", "compiled_path": "target/compiled/shopify_source/models/stg_shopify__order_line_refund.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify", "materialized": "table", "enabled": true}, "created_at": 1665702405.012216, "compiled_sql": "--To disable this model, set the shopify__using_order_line_refund variable within your dbt_project.yml file to False.\n\n\nwith source as (\n\n select * from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__order_line_refund_tmp`\n\n),\n\nrenamed as (\n\n select\n \n \n cast(null as \n timestamp\n) as \n \n _fivetran_synced\n \n , \n cast(null as \n numeric\n) as order_line_refund_id , \n cast(null as \n numeric\n) as \n \n location_id\n \n , \n cast(null as \n numeric\n) as \n \n order_line_id\n \n , \n cast(null as \n numeric\n) as \n \n subtotal\n \n , \n cast(null as \n numeric\n) as \n \n total_tax\n \n , \n cast(null as \n float64\n) as \n \n quantity\n \n , \n cast(null as \n numeric\n) as \n \n refund_id\n \n , \n cast(null as \n string\n) as \n \n restock_type\n \n \n\n\n\n --The below script allows for pass through columns.\n \n\n \n\n\n, cast('' as \n string\n) as source_relation\n\n\n\n\n from source\n\n)\n\nselect * from renamed", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__order_line_refund`"}, "model.shopify_source.stg_shopify__customer_tmp": {"raw_sql": "{{\n fivetran_utils.union_data(\n table_identifier='customer', \n database_variable='shopify_database', \n schema_variable='shopify_schema', \n default_database=target.database,\n default_schema='shopify',\n default_variable='customer_source',\n union_schema_variable='shopify_union_schemas',\n union_database_variable='shopify_union_databases'\n )\n}}", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.union_data"], "nodes": ["seed.shopify_holistic_reporting_integration_tests.shopify_customer_data"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_stg_shopify", "fqn": ["shopify_source", "tmp", "stg_shopify__customer_tmp"], "unique_id": "model.shopify_source.stg_shopify__customer_tmp", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "tmp/stg_shopify__customer_tmp.sql", "original_file_path": "models/tmp/stg_shopify__customer_tmp.sql", "name": "stg_shopify__customer_tmp", "alias": "stg_shopify__customer_tmp", "checksum": {"name": "sha256", "checksum": "1f896e84164292f48db1c4eddfd6b3afef9ce4661ad2ab160c8721c8e620026c"}, "tags": [], "refs": [["shopify_customer_data"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/tmp/stg_shopify__customer_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify", "materialized": "view"}, "created_at": 1665702404.6792011, "compiled_sql": "\n\n\n\n select * \n from `dbt-package-testing`.`linkedin_integration_tests`.`shopify_customer_data`\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__customer_tmp`"}, "model.shopify_source.stg_shopify__order_line_tmp": {"raw_sql": "{{\n fivetran_utils.union_data(\n table_identifier='order_line', \n database_variable='shopify_database', \n schema_variable='shopify_schema', \n default_database=target.database,\n default_schema='shopify',\n default_variable='order_line_source',\n union_schema_variable='shopify_union_schemas',\n union_database_variable='shopify_union_databases'\n )\n}}", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.union_data"], "nodes": ["seed.shopify_holistic_reporting_integration_tests.shopify_order_line_data"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_stg_shopify", "fqn": ["shopify_source", "tmp", "stg_shopify__order_line_tmp"], "unique_id": "model.shopify_source.stg_shopify__order_line_tmp", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "tmp/stg_shopify__order_line_tmp.sql", "original_file_path": "models/tmp/stg_shopify__order_line_tmp.sql", "name": "stg_shopify__order_line_tmp", "alias": "stg_shopify__order_line_tmp", "checksum": {"name": "sha256", "checksum": "778359b2c17590b95d7b5709bfdd28b50d323b905e4277c74203416f08ee458e"}, "tags": [], "refs": [["shopify_order_line_data"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/tmp/stg_shopify__order_line_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify", "materialized": "view"}, "created_at": 1665702404.688013, "compiled_sql": "\n\n\n\n select * \n from `dbt-package-testing`.`linkedin_integration_tests`.`shopify_order_line_data`\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__order_line_tmp`"}, "model.shopify_source.stg_shopify__refund_tmp": {"raw_sql": "--To disable this model, set the shopify__using_refund variable within your dbt_project.yml file to False.\n{{ config(enabled=var('shopify__using_refund', True)) }}\n\n{{\n fivetran_utils.union_data(\n table_identifier='refund', \n database_variable='shopify_database', \n schema_variable='shopify_schema', \n default_database=target.database,\n default_schema='shopify',\n default_variable='refund_source',\n union_schema_variable='shopify_union_schemas',\n union_database_variable='shopify_union_databases'\n )\n}}", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.union_data"], "nodes": ["seed.shopify_holistic_reporting_integration_tests.shopify_refund_data"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_stg_shopify", "fqn": ["shopify_source", "tmp", "stg_shopify__refund_tmp"], "unique_id": "model.shopify_source.stg_shopify__refund_tmp", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "tmp/stg_shopify__refund_tmp.sql", "original_file_path": "models/tmp/stg_shopify__refund_tmp.sql", "name": "stg_shopify__refund_tmp", "alias": "stg_shopify__refund_tmp", "checksum": {"name": "sha256", "checksum": "2bcf1d64f126acc4d271984df2b6332286bf10a7345962f7037c391d8ecdbdbd"}, "tags": [], "refs": [["shopify_refund_data"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/tmp/stg_shopify__refund_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify", "materialized": "view", "enabled": true}, "created_at": 1665702404.691766, "compiled_sql": "--To disable this model, set the shopify__using_refund variable within your dbt_project.yml file to False.\n\n\n\n\n\n\n select * \n from `dbt-package-testing`.`linkedin_integration_tests`.`shopify_refund_data`\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__refund_tmp`"}, "model.shopify_source.stg_shopify__product_tmp": {"raw_sql": "{{\n fivetran_utils.union_data(\n table_identifier='product', \n database_variable='shopify_database', \n schema_variable='shopify_schema', \n default_database=target.database,\n default_schema='shopify',\n default_variable='product_source',\n union_schema_variable='shopify_union_schemas',\n union_database_variable='shopify_union_databases'\n )\n}}", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.union_data"], "nodes": ["seed.shopify_holistic_reporting_integration_tests.shopify_product_data"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_stg_shopify", "fqn": ["shopify_source", "tmp", "stg_shopify__product_tmp"], "unique_id": "model.shopify_source.stg_shopify__product_tmp", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "tmp/stg_shopify__product_tmp.sql", "original_file_path": "models/tmp/stg_shopify__product_tmp.sql", "name": "stg_shopify__product_tmp", "alias": "stg_shopify__product_tmp", "checksum": {"name": "sha256", "checksum": "4c88fa0dabe17fa99b7509af7b3518c844df1747e28e6c7ac4f0a8262424e91a"}, "tags": [], "refs": [["shopify_product_data"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/tmp/stg_shopify__product_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify", "materialized": "view"}, "created_at": 1665702404.695369, "compiled_sql": "\n\n\n\n select * \n from `dbt-package-testing`.`linkedin_integration_tests`.`shopify_product_data`\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__product_tmp`"}, "model.shopify_source.stg_shopify__order_adjustment_tmp": {"raw_sql": "--To disable this model, set the shopify__using_order_adjustment variable within your dbt_project.yml file to False.\n{{ config(enabled=var('shopify__using_order_adjustment', True)) }}\n\n{{\n fivetran_utils.union_data(\n table_identifier='order_adjustment', \n database_variable='shopify_database', \n schema_variable='shopify_schema', \n default_database=target.database,\n default_schema='shopify',\n default_variable='order_adjustment_source',\n union_schema_variable='shopify_union_schemas',\n union_database_variable='shopify_union_databases'\n )\n}}", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.union_data"], "nodes": ["seed.shopify_holistic_reporting_integration_tests.shopify_order_adjustment_data"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_stg_shopify", "fqn": ["shopify_source", "tmp", "stg_shopify__order_adjustment_tmp"], "unique_id": "model.shopify_source.stg_shopify__order_adjustment_tmp", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "tmp/stg_shopify__order_adjustment_tmp.sql", "original_file_path": "models/tmp/stg_shopify__order_adjustment_tmp.sql", "name": "stg_shopify__order_adjustment_tmp", "alias": "stg_shopify__order_adjustment_tmp", "checksum": {"name": "sha256", "checksum": "e3d5e7ba5a680437560ef21796b014718c45d20c52fbf4ac950d8eb687348d96"}, "tags": [], "refs": [["shopify_order_adjustment_data"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/tmp/stg_shopify__order_adjustment_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify", "materialized": "view", "enabled": true}, "created_at": 1665702404.69854, "compiled_sql": "--To disable this model, set the shopify__using_order_adjustment variable within your dbt_project.yml file to False.\n\n\n\n\n\n\n select * \n from `dbt-package-testing`.`linkedin_integration_tests`.`shopify_order_adjustment_data`\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__order_adjustment_tmp`"}, "model.shopify_source.stg_shopify__order_line_refund_tmp": {"raw_sql": "--To disable this model, set the shopify__using_order_line_refund variable within your dbt_project.yml file to False.\n{{ config(enabled=var('shopify__using_order_line_refund', True)) }}\n\n{{\n fivetran_utils.union_data(\n table_identifier='order_line_refund', \n database_variable='shopify_database', \n schema_variable='shopify_schema', \n default_database=target.database,\n default_schema='shopify',\n default_variable='order_line_refund_source',\n union_schema_variable='shopify_union_schemas',\n union_database_variable='shopify_union_databases'\n )\n}}", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.union_data"], "nodes": ["seed.shopify_holistic_reporting_integration_tests.shopify_order_line_refund_data"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_stg_shopify", "fqn": ["shopify_source", "tmp", "stg_shopify__order_line_refund_tmp"], "unique_id": "model.shopify_source.stg_shopify__order_line_refund_tmp", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "tmp/stg_shopify__order_line_refund_tmp.sql", "original_file_path": "models/tmp/stg_shopify__order_line_refund_tmp.sql", "name": "stg_shopify__order_line_refund_tmp", "alias": "stg_shopify__order_line_refund_tmp", "checksum": {"name": "sha256", "checksum": "33bb981405f33c32bbe9c2107a9ba93fd70b9e59578befc3c9e7f78a68c27eb2"}, "tags": [], "refs": [["shopify_order_line_refund_data"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/tmp/stg_shopify__order_line_refund_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify", "materialized": "view", "enabled": true}, "created_at": 1665702404.702008, "compiled_sql": "--To disable this model, set the shopify__using_order_line_refund variable within your dbt_project.yml file to False.\n\n\n\n\n\n\n select * \n from `dbt-package-testing`.`linkedin_integration_tests`.`shopify_order_line_refund_data`\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__order_line_refund_tmp`"}, "model.shopify_source.stg_shopify__transaction_tmp": {"raw_sql": "{{\n fivetran_utils.union_data(\n table_identifier='transaction', \n database_variable='shopify_database', \n schema_variable='shopify_schema', \n default_database=target.database,\n default_schema='shopify',\n default_variable='transaction_source',\n union_schema_variable='shopify_union_schemas',\n union_database_variable='shopify_union_databases'\n )\n}}", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.union_data"], "nodes": ["seed.shopify_holistic_reporting_integration_tests.shopify_transaction_data"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_stg_shopify", "fqn": ["shopify_source", "tmp", "stg_shopify__transaction_tmp"], "unique_id": "model.shopify_source.stg_shopify__transaction_tmp", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "tmp/stg_shopify__transaction_tmp.sql", "original_file_path": "models/tmp/stg_shopify__transaction_tmp.sql", "name": "stg_shopify__transaction_tmp", "alias": "stg_shopify__transaction_tmp", "checksum": {"name": "sha256", "checksum": "9a4cf0c7a2495c01fd10f0d88655aaffe63ef8b3cc94883e10507b034285f978"}, "tags": [], "refs": [["shopify_transaction_data"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/tmp/stg_shopify__transaction_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify", "materialized": "view"}, "created_at": 1665702404.705564, "compiled_sql": "\n\n\n\n select * \n from `dbt-package-testing`.`linkedin_integration_tests`.`shopify_transaction_data`\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__transaction_tmp`"}, "model.shopify_source.stg_shopify__product_variant_tmp": {"raw_sql": "{{\n fivetran_utils.union_data(\n table_identifier='product_variant', \n database_variable='shopify_database', \n schema_variable='shopify_schema', \n default_database=target.database,\n default_schema='shopify',\n default_variable='product_variant_source',\n union_schema_variable='shopify_union_schemas',\n union_database_variable='shopify_union_databases'\n )\n}}", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.union_data"], "nodes": ["seed.shopify_holistic_reporting_integration_tests.shopify_product_variant_data"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_stg_shopify", "fqn": ["shopify_source", "tmp", "stg_shopify__product_variant_tmp"], "unique_id": "model.shopify_source.stg_shopify__product_variant_tmp", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "tmp/stg_shopify__product_variant_tmp.sql", "original_file_path": "models/tmp/stg_shopify__product_variant_tmp.sql", "name": "stg_shopify__product_variant_tmp", "alias": "stg_shopify__product_variant_tmp", "checksum": {"name": "sha256", "checksum": "cbb9a84c332f17d90ad953536a449714fac6f77f871da604d43ffb846f6d5621"}, "tags": [], "refs": [["shopify_product_variant_data"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/tmp/stg_shopify__product_variant_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify", "materialized": "view"}, "created_at": 1665702404.7093241, "compiled_sql": "\n\n\n\n select * \n from `dbt-package-testing`.`linkedin_integration_tests`.`shopify_product_variant_data`\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__product_variant_tmp`"}, "model.shopify_source.stg_shopify__order_tmp": {"raw_sql": "{{\n fivetran_utils.union_data(\n table_identifier='order', \n database_variable='shopify_database', \n schema_variable='shopify_schema', \n default_database=target.database,\n default_schema='shopify',\n default_variable='order_source',\n union_schema_variable='shopify_union_schemas',\n union_database_variable='shopify_union_databases'\n )\n}}", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.union_data"], "nodes": ["seed.shopify_holistic_reporting_integration_tests.shopify_order_data"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_stg_shopify", "fqn": ["shopify_source", "tmp", "stg_shopify__order_tmp"], "unique_id": "model.shopify_source.stg_shopify__order_tmp", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "tmp/stg_shopify__order_tmp.sql", "original_file_path": "models/tmp/stg_shopify__order_tmp.sql", "name": "stg_shopify__order_tmp", "alias": "stg_shopify__order_tmp", "checksum": {"name": "sha256", "checksum": "f4fd2563557b13c2b54531a7fa9995e496aa1b39432d729a010ddcb7e10001ae"}, "tags": [], "refs": [["shopify_order_data"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/tmp/stg_shopify__order_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify", "materialized": "view"}, "created_at": 1665702404.712638, "compiled_sql": "\n\n\n\n select * \n from `dbt-package-testing`.`linkedin_integration_tests`.`shopify_order_data`\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__order_tmp`"}, "model.klaviyo_source.stg_klaviyo__person": {"raw_sql": "with base as (\n\n select * \n from {{ ref('stg_klaviyo__person_tmp') }}\n\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_klaviyo__person_tmp')),\n staging_columns=get_person_columns()\n )\n }}\n {{ fivetran_utils.source_relation(\n union_schema_variable='klaviyo_union_schemas', \n union_database_variable='klaviyo_union_databases') \n }}\n from base\n),\n\nfinal as (\n \n select \n id as person_id,\n address_1,\n address_2,\n city,\n country,\n zip,\n created as created_at,\n email,\n first_name || ' ' || last_name as full_name,\n latitude,\n longitude,\n organization,\n phone_number,\n region, -- state in USA\n timezone,\n title,\n updated as updated_at,\n source_relation\n \n {{ fivetran_utils.fill_pass_through_columns('klaviyo__person_pass_through_columns') }}\n\n from fields\n where not coalesce(_fivetran_deleted, false)\n)\n\nselect * from final", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.klaviyo_source.get_person_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.source_relation", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["model.klaviyo_source.stg_klaviyo__person_tmp", "model.klaviyo_source.stg_klaviyo__person_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_klaviyo", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_stg_klaviyo", "fqn": ["klaviyo_source", "stg_klaviyo__person"], "unique_id": "model.klaviyo_source.stg_klaviyo__person", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "stg_klaviyo__person.sql", "original_file_path": "models/stg_klaviyo__person.sql", "name": "stg_klaviyo__person", "alias": "stg_klaviyo__person", "checksum": {"name": "sha256", "checksum": "0c4d31fb3c257dff6d4c5123f3352ee790db81b766ac4f3be3b1cdb06d19b45f"}, "tags": [], "refs": [["stg_klaviyo__person_tmp"], ["stg_klaviyo__person_tmp"]], "sources": [], "metrics": [], "description": "Table storing the profiles of all people/users interacted with. Custom columns can be passed through to downstream models via the `klaviyo__person_pass_through_columns` variable (see README for details).\n", "columns": {"person_id": {"name": "person_id", "description": "Unique ID of the user if you use your own unique identifier. Otherwise, Klaviyo recommends using the email as the primary key. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "address_1": {"name": "address_1", "description": "First line of the person's address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "address_2": {"name": "address_2", "description": "Second line of the person's address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "city": {"name": "city", "description": "City they live in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "country": {"name": "country", "description": "Country they live in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "zip": {"name": "zip", "description": "Postal code where they live.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "Timestamp of when the person's profile was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email": {"name": "email", "description": "The email address and the unique identifier for a profile.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "full_name": {"name": "full_name", "description": "Person's full name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "latitude": {"name": "latitude", "description": "Latitude of the person's location.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "longitude": {"name": "longitude", "description": "Longitude of the person's location.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization": {"name": "organization", "description": "Business organization they belong to.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "phone_number": {"name": "phone_number", "description": "Associated phone number.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "region": {"name": "region", "description": "Region or state they live in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "timezone": {"name": "timezone", "description": "Timezone they are situated in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "title": {"name": "title", "description": "Title at their business or organization.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the person profile was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_relation": {"name": "source_relation", "description": "The source where this data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioining together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "klaviyo_source://models/stg_klaviyo.yml", "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo__person.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "stg_klaviyo"}, "created_at": 1665702405.142082, "compiled_sql": "with base as (\n\n select * \n from `dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__person_tmp`\n\n),\n\nfields as (\n\n select\n \n cast(null as boolean) as \n \n _fivetran_deleted\n \n , \n cast(null as \n timestamp\n) as \n \n _fivetran_synced\n \n , \n cast(null as \n string\n) as \n \n address_1\n \n , \n cast(null as \n string\n) as \n \n address_2\n \n , \n cast(null as \n string\n) as \n \n city\n \n , \n cast(null as \n string\n) as \n \n country\n \n , \n cast(null as \n timestamp\n) as \n \n created\n \n , \n cast(null as \n string\n) as \n \n email\n \n , \n cast(null as \n string\n) as \n \n first_name\n \n , \n cast(null as \n string\n) as \n \n id\n \n , \n cast(null as \n string\n) as \n \n last_name\n \n , \n cast(null as \n float64\n) as \n \n latitude\n \n , \n cast(null as \n float64\n) as \n \n longitude\n \n , \n cast(null as \n string\n) as \n \n organization\n \n , \n cast(null as \n string\n) as \n \n phone_number\n \n , \n cast(null as \n string\n) as \n \n region\n \n , \n cast(null as \n string\n) as \n \n timezone\n \n , \n cast(null as \n string\n) as \n \n title\n \n , \n cast(null as \n timestamp\n) as \n \n updated\n \n , \n cast(null as \n string\n) as \n \n zip\n \n \n\n\n \n\n\n, cast('' as \n string\n) as source_relation\n\n\n\n from base\n),\n\nfinal as (\n \n select \n id as person_id,\n address_1,\n address_2,\n city,\n country,\n zip,\n created as created_at,\n email,\n first_name || ' ' || last_name as full_name,\n latitude,\n longitude,\n organization,\n phone_number,\n region, -- state in USA\n timezone,\n title,\n updated as updated_at,\n source_relation\n \n \n\n\n\n\n\n from fields\n where not coalesce(_fivetran_deleted, false)\n)\n\nselect * from final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__person`"}, "model.klaviyo_source.stg_klaviyo__campaign": {"raw_sql": "with base as (\n\n select * \n from {{ ref('stg_klaviyo__campaign_tmp') }}\n\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_klaviyo__campaign_tmp')),\n staging_columns=get_campaign_columns()\n )\n }}\n {{ fivetran_utils.source_relation(\n union_schema_variable='klaviyo_union_schemas', \n union_database_variable='klaviyo_union_databases') \n }}\n from base\n),\n\nfinal as (\n \n select\n campaign_type,\n created as created_at,\n email_template_id,\n from_email,\n from_name,\n id as campaign_id,\n is_segmented,\n name as campaign_name,\n send_time as scheduled_to_send_at,\n sent_at,\n coalesce(status, lower(status_label)) as status,\n status_id,\n subject,\n updated as updated_at,\n source_relation\n\n from fields\n\n where not coalesce(_fivetran_deleted, false)\n)\n\nselect * from final", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.klaviyo_source.get_campaign_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.source_relation"], "nodes": ["model.klaviyo_source.stg_klaviyo__campaign_tmp", "model.klaviyo_source.stg_klaviyo__campaign_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_klaviyo", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_stg_klaviyo", "fqn": ["klaviyo_source", "stg_klaviyo__campaign"], "unique_id": "model.klaviyo_source.stg_klaviyo__campaign", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "stg_klaviyo__campaign.sql", "original_file_path": "models/stg_klaviyo__campaign.sql", "name": "stg_klaviyo__campaign", "alias": "stg_klaviyo__campaign", "checksum": {"name": "sha256", "checksum": "3bb055bc8484630176011790a666821ae220126184e05eaff411aa44406048e2"}, "tags": [], "refs": [["stg_klaviyo__campaign_tmp"], ["stg_klaviyo__campaign_tmp"]], "sources": [], "metrics": [], "description": "Table capturing email campaigns in Klaviyo.\n", "columns": {"campaign_type": {"name": "campaign_type", "description": "Type of campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "Timestamp of when the campaign was created, in UTC.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email_template_id": {"name": "email_template_id", "description": "Foreign key referencing the ID of the `email_template` object that will be the content of this campaign. Note the Email Template is copied when creating this campaign, so future changes to that Email Template will not alter the content of this campaign.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "from_email": {"name": "from_email", "description": "The email address your email will be sent from and will be used in the reply-to header.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "from_name": {"name": "from_name", "description": "The name or label associated with the email address you're sending from.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Unique ID of the campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_segmented": {"name": "is_segmented", "description": "Boolean that is true if the campaign is directed at a Klaviyo segment (not a list).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_name": {"name": "campaign_name", "description": "A name for this campaign. If not specified, this will default to the subject of the campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "scheduled_to_send_at": {"name": "scheduled_to_send_at", "description": "Timestamp of when the campaign is scheduled to be sent in the future, if [\"smart send time\"](https://help.klaviyo.com/hc/en-us/articles/360029794371-Smart-Send-Time-in-Klaviyo#how-to-utilize-smart-send-time3) is used. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "sent_at": {"name": "sent_at", "description": "Timestamp of when the campaign was first sent out to users.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status": {"name": "status", "description": "Current status of the campaign. Either \"draft\", \"scheduled\", \"sent\", or \"cancelled\".", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status_id": {"name": "status_id", "description": "Corresponding ID to the current status.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "subject": {"name": "subject", "description": "The subject line of the campaign's email.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the campaign was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_relation": {"name": "source_relation", "description": "The source where this data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioining together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "klaviyo_source://models/stg_klaviyo.yml", "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo__campaign.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "stg_klaviyo"}, "created_at": 1665702405.1050382, "compiled_sql": "with base as (\n\n select * \n from `dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__campaign_tmp`\n\n),\n\nfields as (\n\n select\n \n cast(null as boolean) as \n \n _fivetran_deleted\n \n , \n cast(null as \n timestamp\n) as \n \n _fivetran_synced\n \n , \n cast(null as \n string\n) as \n \n campaign_type\n \n , \n cast(null as \n timestamp\n) as \n \n created\n \n , \n cast(null as \n string\n) as \n \n email_template_id\n \n , \n cast(null as \n string\n) as \n \n from_email\n \n , \n cast(null as \n string\n) as \n \n from_name\n \n , \n cast(null as \n string\n) as \n \n id\n \n , \n cast(null as boolean) as \n \n is_segmented\n \n , \n cast(null as \n string\n) as \n \n name\n \n , \n cast(null as \n timestamp\n) as \n \n send_time\n \n , \n cast(null as \n timestamp\n) as \n \n sent_at\n \n , \n cast(null as \n string\n) as \n \n status\n \n , \n cast(null as \n string\n) as \n \n status_id\n \n , \n cast(null as \n string\n) as \n \n status_label\n \n , \n cast(null as \n string\n) as \n \n subject\n \n , \n cast(null as \n timestamp\n) as \n \n updated\n \n \n\n\n \n\n\n, cast('' as \n string\n) as source_relation\n\n\n\n from base\n),\n\nfinal as (\n \n select\n campaign_type,\n created as created_at,\n email_template_id,\n from_email,\n from_name,\n id as campaign_id,\n is_segmented,\n name as campaign_name,\n send_time as scheduled_to_send_at,\n sent_at,\n coalesce(status, lower(status_label)) as status,\n status_id,\n subject,\n updated as updated_at,\n source_relation\n\n from fields\n\n where not coalesce(_fivetran_deleted, false)\n)\n\nselect * from final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__campaign`"}, "model.klaviyo_source.stg_klaviyo__metric": {"raw_sql": "with base as (\n\n select * \n from {{ ref('stg_klaviyo__metric_tmp') }}\n\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_klaviyo__metric_tmp')),\n staging_columns=get_metric_columns()\n )\n }}\n {{ fivetran_utils.source_relation(\n union_schema_variable='klaviyo_union_schemas', \n union_database_variable='klaviyo_union_databases') \n }}\n from base\n),\n\nfinal as (\n \n select \n created as created_at,\n id as metric_id,\n integration_id,\n name as metric_name,\n updated as updated_at,\n source_relation\n\n from fields\n\n where not coalesce(_fivetran_deleted, false)\n)\n\nselect * from final", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.klaviyo_source.get_metric_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.source_relation"], "nodes": ["model.klaviyo_source.stg_klaviyo__metric_tmp", "model.klaviyo_source.stg_klaviyo__metric_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_klaviyo", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_stg_klaviyo", "fqn": ["klaviyo_source", "stg_klaviyo__metric"], "unique_id": "model.klaviyo_source.stg_klaviyo__metric", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "stg_klaviyo__metric.sql", "original_file_path": "models/stg_klaviyo__metric.sql", "name": "stg_klaviyo__metric", "alias": "stg_klaviyo__metric", "checksum": {"name": "sha256", "checksum": "d131ba8b5c6b489c12dc687514ef82b359aecaa82175b66d77fa44344b4eb58f"}, "tags": [], "refs": [["stg_klaviyo__metric_tmp"], ["stg_klaviyo__metric_tmp"]], "sources": [], "metrics": [], "description": "Table of tracked metrics across integrations in Klaviyo.", "columns": {"created_at": {"name": "created_at", "description": "Timestamp of when the metric was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "metric_id": {"name": "metric_id", "description": "Unique ID of the metric being tracked.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "integration_id": {"name": "integration_id", "description": "Foreign key referencing the INTEGRATION that the metric is being pulled from.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "metric_name": {"name": "metric_name", "description": "Name of the metric (same as `EVENT.type`)", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the metric was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_relation": {"name": "source_relation", "description": "The source where this data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioining together multiple sources, this will be an empty string.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "klaviyo_source://models/stg_klaviyo.yml", "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo__metric.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "stg_klaviyo"}, "created_at": 1665702405.143073, "compiled_sql": "with base as (\n\n select * \n from `dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__metric_tmp`\n\n),\n\nfields as (\n\n select\n \n cast(null as boolean) as \n \n _fivetran_deleted\n \n , \n cast(null as \n timestamp\n) as \n \n _fivetran_synced\n \n , \n cast(null as \n timestamp\n) as \n \n created\n \n , \n cast(null as \n string\n) as \n \n id\n \n , \n cast(null as \n string\n) as \n \n integration_id\n \n , \n cast(null as \n string\n) as \n \n name\n \n , \n cast(null as \n timestamp\n) as \n \n updated\n \n \n\n\n \n\n\n, cast('' as \n string\n) as source_relation\n\n\n\n from base\n),\n\nfinal as (\n \n select \n created as created_at,\n id as metric_id,\n integration_id,\n name as metric_name,\n updated as updated_at,\n source_relation\n\n from fields\n\n where not coalesce(_fivetran_deleted, false)\n)\n\nselect * from final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__metric`"}, "model.klaviyo_source.stg_klaviyo__integration": {"raw_sql": "with base as (\n\n select * \n from {{ ref('stg_klaviyo__integration_tmp') }}\n\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_klaviyo__integration_tmp')),\n staging_columns=get_integration_columns()\n )\n }}\n {{ fivetran_utils.source_relation(\n union_schema_variable='klaviyo_union_schemas', \n union_database_variable='klaviyo_union_databases') \n }}\n from base\n),\n\nfinal as (\n \n select \n category,\n id as integration_id,\n name as integration_name,\n source_relation\n\n from fields\n where not coalesce(_fivetran_deleted, false)\n)\n\nselect * from final", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.klaviyo_source.get_integration_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.source_relation"], "nodes": ["model.klaviyo_source.stg_klaviyo__integration_tmp", "model.klaviyo_source.stg_klaviyo__integration_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_klaviyo", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_stg_klaviyo", "fqn": ["klaviyo_source", "stg_klaviyo__integration"], "unique_id": "model.klaviyo_source.stg_klaviyo__integration", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "stg_klaviyo__integration.sql", "original_file_path": "models/stg_klaviyo__integration.sql", "name": "stg_klaviyo__integration", "alias": "stg_klaviyo__integration", "checksum": {"name": "sha256", "checksum": "cf1d2569260342f615850f5d782fb0e166d1b70ea3a703fb2248d6f457023cf8"}, "tags": [], "refs": [["stg_klaviyo__integration_tmp"], ["stg_klaviyo__integration_tmp"]], "sources": [], "metrics": [], "description": "Table storing third-party platforms integrated into Klaviyo.", "columns": {"category": {"name": "category", "description": "Use-case category of the integrated platform.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "integration_id": {"name": "integration_id", "description": "Unique ID of the integration.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "integration_name": {"name": "integration_name", "description": "Name of the integrated platform.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_relation": {"name": "source_relation", "description": "The source where this data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioining together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "klaviyo_source://models/stg_klaviyo.yml", "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo__integration.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "stg_klaviyo"}, "created_at": 1665702405.139513, "compiled_sql": "with base as (\n\n select * \n from `dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__integration_tmp`\n\n),\n\nfields as (\n\n select\n \n cast(null as boolean) as \n \n _fivetran_deleted\n \n , \n cast(null as \n timestamp\n) as \n \n _fivetran_synced\n \n , \n cast(null as \n string\n) as \n \n category\n \n , \n cast(null as \n string\n) as \n \n id\n \n , \n cast(null as \n string\n) as \n \n name\n \n \n\n\n \n\n\n, cast('' as \n string\n) as source_relation\n\n\n\n from base\n),\n\nfinal as (\n \n select \n category,\n id as integration_id,\n name as integration_name,\n source_relation\n\n from fields\n where not coalesce(_fivetran_deleted, false)\n)\n\nselect * from final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__integration`"}, "model.klaviyo_source.stg_klaviyo__flow": {"raw_sql": "with base as (\n\n select * \n from {{ ref('stg_klaviyo__flow_tmp') }}\n\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_klaviyo__flow_tmp')),\n staging_columns=get_flow_columns()\n )\n }}\n {{ fivetran_utils.source_relation(\n union_schema_variable='klaviyo_union_schemas', \n union_database_variable='klaviyo_union_databases') \n }}\n from base\n),\n\nfinal as (\n \n select \n created as created_at,\n id as flow_id,\n name as flow_name,\n status,\n {% if target.type == 'snowflake'%}\n \"TRIGGER\" \n {% else %}\n trigger\n {% endif %}\n as flow_trigger,\n updated as updated_at,\n customer_filter as person_filter,\n source_relation\n\n from fields\n where not coalesce(_fivetran_deleted, false)\n)\n\nselect * from final", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.klaviyo_source.get_flow_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.source_relation"], "nodes": ["model.klaviyo_source.stg_klaviyo__flow_tmp", "model.klaviyo_source.stg_klaviyo__flow_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_klaviyo", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_stg_klaviyo", "fqn": ["klaviyo_source", "stg_klaviyo__flow"], "unique_id": "model.klaviyo_source.stg_klaviyo__flow", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "stg_klaviyo__flow.sql", "original_file_path": "models/stg_klaviyo__flow.sql", "name": "stg_klaviyo__flow", "alias": "stg_klaviyo__flow", "checksum": {"name": "sha256", "checksum": "a74ad01e8fbca823f7ec229f1d0c59171c4a1200e314cb06e0ac75da0bc72792"}, "tags": [], "refs": [["stg_klaviyo__flow_tmp"], ["stg_klaviyo__flow_tmp"]], "sources": [], "metrics": [], "description": "Table of automated, triggered flow sequences in Klaviyo.", "columns": {"created_at": {"name": "created_at", "description": "Timestamp of when the flow was first created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_id": {"name": "flow_id", "description": "Unique ID of the flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_name": {"name": "flow_name", "description": "Name of the flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status": {"name": "status", "description": "Current status of the flow. Either 'manual', 'live', or 'draft'. Read more [here](https://help.klaviyo.com/hc/en-us/articles/115002774932-Getting-Started-with-Flows#the-flow-action-status9).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_trigger": {"name": "flow_trigger", "description": "JSON of metric, segment, list, and/or date-property filters that will trigger this flow. These are applied to the **event level**.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the flow was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "person_filter": {"name": "person_filter", "description": "JSON of flow filters placed on the **person level** that will trigger this flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_relation": {"name": "source_relation", "description": "The source where this data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioining together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "klaviyo_source://models/stg_klaviyo.yml", "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo__flow.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "stg_klaviyo"}, "created_at": 1665702405.138697, "compiled_sql": "with base as (\n\n select * \n from `dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__flow_tmp`\n\n),\n\nfields as (\n\n select\n \n cast(null as boolean) as \n \n _fivetran_deleted\n \n , \n cast(null as \n timestamp\n) as \n \n _fivetran_synced\n \n , \n cast(null as \n timestamp\n) as \n \n created\n \n , \n cast(null as \n string\n) as \n \n id\n \n , \n cast(null as \n string\n) as \n \n name\n \n , \n cast(null as \n string\n) as \n \n status\n \n , \n cast(null as \n string\n) as \n \n \n \n `trigger`\n \n \n \n , \n cast(null as \n timestamp\n) as \n \n updated\n \n , \n cast(null as \n string\n) as \n \n customer_filter\n \n \n\n\n \n\n\n, cast('' as \n string\n) as source_relation\n\n\n\n from base\n),\n\nfinal as (\n \n select \n created as created_at,\n id as flow_id,\n name as flow_name,\n status,\n \n trigger\n \n as flow_trigger,\n updated as updated_at,\n customer_filter as person_filter,\n source_relation\n\n from fields\n where not coalesce(_fivetran_deleted, false)\n)\n\nselect * from final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__flow`"}, "model.klaviyo_source.stg_klaviyo__event": {"raw_sql": "with base as (\n\n select * \n from {{ ref('stg_klaviyo__event_tmp') }}\n\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_klaviyo__event_tmp')),\n staging_columns=get_event_columns()\n )\n }}\n {{ fivetran_utils.source_relation(\n union_schema_variable='klaviyo_union_schemas', \n union_database_variable='klaviyo_union_databases') \n }}\n from base\n),\n\nrename as (\n \n select \n _variation as variation_id,\n campaign_id,\n cast(timestamp as {{ dbt_utils.type_timestamp() }} ) as occurred_at,\n flow_id,\n flow_message_id,\n id as event_id,\n metric_id,\n person_id,\n type,\n uuid,\n property_value as numeric_value,\n _fivetran_synced,\n source_relation\n\n {{ fivetran_utils.fill_pass_through_columns('klaviyo__event_pass_through_columns') }}\n\n from fields\n where not coalesce(_fivetran_deleted, false)\n),\n\nfinal as (\n \n select \n *,\n cast( {{ dbt_utils.date_trunc('day', 'occurred_at') }} as date) as occurred_on,\n {{ dbt_utils.surrogate_key(['event_id', 'source_relation']) }} as unique_event_id\n\n from rename\n\n)\n\nselect * from final", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.klaviyo_source.get_event_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.source_relation", "macro.dbt_utils.type_timestamp", "macro.fivetran_utils.fill_pass_through_columns", "macro.dbt_utils.date_trunc", "macro.dbt_utils.surrogate_key"], "nodes": ["model.klaviyo_source.stg_klaviyo__event_tmp", "model.klaviyo_source.stg_klaviyo__event_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_klaviyo", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_stg_klaviyo", "fqn": ["klaviyo_source", "stg_klaviyo__event"], "unique_id": "model.klaviyo_source.stg_klaviyo__event", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "stg_klaviyo__event.sql", "original_file_path": "models/stg_klaviyo__event.sql", "name": "stg_klaviyo__event", "alias": "stg_klaviyo__event", "checksum": {"name": "sha256", "checksum": "3f6b83c7355226d28545f2ef688933906d57e1acdd0b840bb6a504cae3b3bba5"}, "tags": [], "refs": [["stg_klaviyo__event_tmp"], ["stg_klaviyo__event_tmp"]], "sources": [], "metrics": [], "description": "Table of events (and metrics) triggered in Klaviyo or via its integrations. Custom columns can be passed through to downstream models via the `klaviyo__event_pass_through_columns` variable (see README for details).\n", "columns": {"variation_id": {"name": "variation_id", "description": "Unique ID of the attributed flow or campaign variation group. This does not map onto another table. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Foreign key referencing the CAMPAIGN that the event is attributed to.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "occurred_at": {"name": "occurred_at", "description": "Timestamp of when the event was triggered.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_id": {"name": "flow_id", "description": "Foreign key referencing the FLOW that the event is attributed to.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_message_id": {"name": "flow_message_id", "description": "Unique ID of the FLOW_MESSAGE that the event is attributed to. This does not map onto another table.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "event_id": {"name": "event_id", "description": "Unique ID of the event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "metric_id": {"name": "metric_id", "description": "Foreign key referencing the metric being captured.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "person_id": {"name": "person_id", "description": "Foreign key referencing the PERSON who triggered the event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "type": {"name": "type", "description": "Type of event that was triggered. This is the same as the METRIC name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "uuid": {"name": "uuid", "description": "Universally Unique Identifier of the event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "numeric_value": {"name": "numeric_value", "description": "Numeric value associated with the event (ie the dollars associated with a purchase).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "occurred_on": {"name": "occurred_on", "description": "Calendar date (UTC) on which the event occurred.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_relation": {"name": "source_relation", "description": "The source where this data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioining together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "unique_event_id": {"name": "unique_event_id", "description": "The unique identifier for the combination of event_id and source_relation columns.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "klaviyo_source://models/stg_klaviyo.yml", "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo__event.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "stg_klaviyo"}, "created_at": 1665702405.137428, "compiled_sql": "with base as (\n\n select * \n from `dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__event_tmp`\n\n),\n\nfields as (\n\n select\n \n cast(null as boolean) as \n \n _fivetran_deleted\n \n , \n cast(null as \n timestamp\n) as \n \n _fivetran_synced\n \n , \n cast(null as \n string\n) as \n \n _variation\n \n , \n cast(null as \n string\n) as \n \n campaign_id\n \n , \n cast(null as \n timestamp\n) as \n \n datetime\n \n , \n cast(null as \n string\n) as \n \n flow_id\n \n , \n cast(null as \n string\n) as \n \n flow_message_id\n \n , \n cast(null as \n string\n) as \n \n id\n \n , \n cast(null as \n string\n) as \n \n metric_id\n \n , \n cast(null as \n string\n) as \n \n person_id\n \n , \n cast(null as \n timestamp\n) as \n \n timestamp\n \n , \n cast(null as \n string\n) as \n \n type\n \n , \n cast(null as \n string\n) as \n \n uuid\n \n , \n cast(null as \n string\n) as \n \n property_value\n \n \n\n\n \n\n\n, cast('' as \n string\n) as source_relation\n\n\n\n from base\n),\n\nrename as (\n \n select \n _variation as variation_id,\n campaign_id,\n cast(timestamp as \n timestamp\n ) as occurred_at,\n flow_id,\n flow_message_id,\n id as event_id,\n metric_id,\n person_id,\n type,\n uuid,\n property_value as numeric_value,\n _fivetran_synced,\n source_relation\n\n \n\n\n\n\n\n from fields\n where not coalesce(_fivetran_deleted, false)\n),\n\nfinal as (\n \n select \n *,\n cast( timestamp_trunc(\n cast(occurred_at as timestamp),\n day\n ) as date) as occurred_on,\n to_hex(md5(cast(coalesce(cast(event_id as \n string\n), '') || '-' || coalesce(cast(source_relation as \n string\n), '') as \n string\n))) as unique_event_id\n\n from rename\n\n)\n\nselect * from final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__event`"}, "model.klaviyo_source.stg_klaviyo__event_tmp": {"raw_sql": "{{\n fivetran_utils.union_data(\n table_identifier='event', \n database_variable='klaviyo_database', \n schema_variable='klaviyo_schema', \n default_database=target.database,\n default_schema='klaviyo',\n default_variable='event_table',\n union_schema_variable='klaviyo_union_schemas',\n union_database_variable='klaviyo_union_databases'\n )\n}}", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.union_data"], "nodes": ["seed.shopify_holistic_reporting_integration_tests.event"]}, "config": {"enabled": true, "alias": null, "schema": "stg_klaviyo", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_stg_klaviyo", "fqn": ["klaviyo_source", "tmp", "stg_klaviyo__event_tmp"], "unique_id": "model.klaviyo_source.stg_klaviyo__event_tmp", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "tmp/stg_klaviyo__event_tmp.sql", "original_file_path": "models/tmp/stg_klaviyo__event_tmp.sql", "name": "stg_klaviyo__event_tmp", "alias": "stg_klaviyo__event_tmp", "checksum": {"name": "sha256", "checksum": "0aa5096828da6b1f75fb7a93d5f7621f024adb2ef241014a075abae8511fb337"}, "tags": [], "refs": [["event"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/tmp/stg_klaviyo__event_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "stg_klaviyo"}, "created_at": 1665702404.813214, "compiled_sql": "\n\n\n\n select * \n from `dbt-package-testing`.`linkedin_integration_tests`.`event`\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__event_tmp`"}, "model.klaviyo_source.stg_klaviyo__metric_tmp": {"raw_sql": "{{\n fivetran_utils.union_data(\n table_identifier='metric', \n database_variable='klaviyo_database', \n schema_variable='klaviyo_schema', \n default_database=target.database,\n default_schema='klaviyo',\n default_variable='metric',\n union_schema_variable='klaviyo_union_schemas',\n union_database_variable='klaviyo_union_databases'\n )\n}}", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.union_data"], "nodes": ["seed.shopify_holistic_reporting_integration_tests.metric"]}, "config": {"enabled": true, "alias": null, "schema": "stg_klaviyo", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_stg_klaviyo", "fqn": ["klaviyo_source", "tmp", "stg_klaviyo__metric_tmp"], "unique_id": "model.klaviyo_source.stg_klaviyo__metric_tmp", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "tmp/stg_klaviyo__metric_tmp.sql", "original_file_path": "models/tmp/stg_klaviyo__metric_tmp.sql", "name": "stg_klaviyo__metric_tmp", "alias": "stg_klaviyo__metric_tmp", "checksum": {"name": "sha256", "checksum": "1f887542c817cae88b22c9632e93da3ae5fa6c02dadc22e8901484b55e4c5f2d"}, "tags": [], "refs": [["metric"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/tmp/stg_klaviyo__metric_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "stg_klaviyo"}, "created_at": 1665702404.816493, "compiled_sql": "\n\n\n\n select * \n from `dbt-package-testing`.`linkedin_integration_tests`.`metric`\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__metric_tmp`"}, "model.klaviyo_source.stg_klaviyo__campaign_tmp": {"raw_sql": "{{\n fivetran_utils.union_data(\n table_identifier='campaign', \n database_variable='klaviyo_database', \n schema_variable='klaviyo_schema', \n default_database=target.database,\n default_schema='klaviyo',\n default_variable='campaign',\n union_schema_variable='klaviyo_union_schemas',\n union_database_variable='klaviyo_union_databases'\n )\n}}", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.union_data"], "nodes": ["seed.shopify_holistic_reporting_integration_tests.campaign"]}, "config": {"enabled": true, "alias": null, "schema": "stg_klaviyo", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_stg_klaviyo", "fqn": ["klaviyo_source", "tmp", "stg_klaviyo__campaign_tmp"], "unique_id": "model.klaviyo_source.stg_klaviyo__campaign_tmp", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "tmp/stg_klaviyo__campaign_tmp.sql", "original_file_path": "models/tmp/stg_klaviyo__campaign_tmp.sql", "name": "stg_klaviyo__campaign_tmp", "alias": "stg_klaviyo__campaign_tmp", "checksum": {"name": "sha256", "checksum": "f494e0b1c1093180196545a7c05c0f8f7f8ed074e63328057021091c1d776530"}, "tags": [], "refs": [["campaign"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/tmp/stg_klaviyo__campaign_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "stg_klaviyo"}, "created_at": 1665702404.820361, "compiled_sql": "\n\n\n\n select * \n from `dbt-package-testing`.`linkedin_integration_tests`.`campaign`\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__campaign_tmp`"}, "model.klaviyo_source.stg_klaviyo__integration_tmp": {"raw_sql": "{{\n fivetran_utils.union_data(\n table_identifier='integration', \n database_variable='klaviyo_database', \n schema_variable='klaviyo_schema', \n default_database=target.database,\n default_schema='klaviyo',\n default_variable='integration',\n union_schema_variable='klaviyo_union_schemas',\n union_database_variable='klaviyo_union_databases'\n )\n}}", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.union_data"], "nodes": ["seed.shopify_holistic_reporting_integration_tests.integration"]}, "config": {"enabled": true, "alias": null, "schema": "stg_klaviyo", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_stg_klaviyo", "fqn": ["klaviyo_source", "tmp", "stg_klaviyo__integration_tmp"], "unique_id": "model.klaviyo_source.stg_klaviyo__integration_tmp", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "tmp/stg_klaviyo__integration_tmp.sql", "original_file_path": "models/tmp/stg_klaviyo__integration_tmp.sql", "name": "stg_klaviyo__integration_tmp", "alias": "stg_klaviyo__integration_tmp", "checksum": {"name": "sha256", "checksum": "174b16d87563e123fb0d813d3749c31fb80fc08df48143729e28f34bce0a2e04"}, "tags": [], "refs": [["integration"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/tmp/stg_klaviyo__integration_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "stg_klaviyo"}, "created_at": 1665702404.8235729, "compiled_sql": "\n\n\n\n select * \n from `dbt-package-testing`.`linkedin_integration_tests`.`integration`\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__integration_tmp`"}, "model.klaviyo_source.stg_klaviyo__flow_tmp": {"raw_sql": "{{\n fivetran_utils.union_data(\n table_identifier='flow', \n database_variable='klaviyo_database', \n schema_variable='klaviyo_schema', \n default_database=target.database,\n default_schema='klaviyo',\n default_variable='flow',\n union_schema_variable='klaviyo_union_schemas',\n union_database_variable='klaviyo_union_databases'\n )\n}}", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.union_data"], "nodes": ["seed.shopify_holistic_reporting_integration_tests.flow"]}, "config": {"enabled": true, "alias": null, "schema": "stg_klaviyo", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_stg_klaviyo", "fqn": ["klaviyo_source", "tmp", "stg_klaviyo__flow_tmp"], "unique_id": "model.klaviyo_source.stg_klaviyo__flow_tmp", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "tmp/stg_klaviyo__flow_tmp.sql", "original_file_path": "models/tmp/stg_klaviyo__flow_tmp.sql", "name": "stg_klaviyo__flow_tmp", "alias": "stg_klaviyo__flow_tmp", "checksum": {"name": "sha256", "checksum": "4437a7971622b8cd114313ee2b1a59b992ba862c49f0086851d5d60082617b0c"}, "tags": [], "refs": [["flow"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/tmp/stg_klaviyo__flow_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "stg_klaviyo"}, "created_at": 1665702404.826895, "compiled_sql": "\n\n\n\n select * \n from `dbt-package-testing`.`linkedin_integration_tests`.`flow`\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__flow_tmp`"}, "model.klaviyo_source.stg_klaviyo__person_tmp": {"raw_sql": "{{\n fivetran_utils.union_data(\n table_identifier='person', \n database_variable='klaviyo_database', \n schema_variable='klaviyo_schema', \n default_database=target.database,\n default_schema='klaviyo',\n default_variable='person',\n union_schema_variable='klaviyo_union_schemas',\n union_database_variable='klaviyo_union_databases'\n )\n}}", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.union_data"], "nodes": ["seed.shopify_holistic_reporting_integration_tests.person"]}, "config": {"enabled": true, "alias": null, "schema": "stg_klaviyo", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_stg_klaviyo", "fqn": ["klaviyo_source", "tmp", "stg_klaviyo__person_tmp"], "unique_id": "model.klaviyo_source.stg_klaviyo__person_tmp", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "tmp/stg_klaviyo__person_tmp.sql", "original_file_path": "models/tmp/stg_klaviyo__person_tmp.sql", "name": "stg_klaviyo__person_tmp", "alias": "stg_klaviyo__person_tmp", "checksum": {"name": "sha256", "checksum": "ec768db1c8d1d5eb47e967bf23bb95726133d2a298373f757930302de96e2910"}, "tags": [], "refs": [["person"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/tmp/stg_klaviyo__person_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "stg_klaviyo"}, "created_at": 1665702404.83108, "compiled_sql": "\n\n\n\n select * \n from `dbt-package-testing`.`linkedin_integration_tests`.`person`\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__person_tmp`"}, "model.klaviyo.klaviyo__person_campaign_flow": {"raw_sql": "with events as (\n select *\n from {{ ref('klaviyo__events') }}\n),\n\npivot_out_events as (\n \n select \n person_id,\n last_touch_campaign_id,\n last_touch_flow_id,\n campaign_name,\n flow_name,\n variation_id,\n source_relation,\n min(occurred_at) as first_event_at,\n max(occurred_at) as last_event_at\n\n -- sum up the numeric value associated with events (most likely will mean revenue)\n {% for rm in var('klaviyo__sum_revenue_metrics') %}\n , sum(case when lower(type) = '{{ rm | lower }}' then \n coalesce({{ fivetran_utils.try_cast(\"numeric_value\", \"numeric\") }}, 0)\n else 0 end) \n as {{ 'sum_revenue_' ~ rm | replace(' ', '_') | replace('(', '') | replace(')', '') | lower }} -- removing special characters that I have seen in different integration events\n {% endfor %}\n\n -- count up the number of instances of each metric\n {% for cm in var('klaviyo__count_metrics') %}\n , sum(case when lower(type) = '{{ cm | lower }}' then 1 else 0 end) \n as {{ 'count_' ~ cm | replace(' ', '_') | replace('(', '') | replace(')', '') | lower }} -- removing special characters that I have seen in different integration events\n {% endfor %}\n\n from events\n {{ dbt_utils.group_by(n=7) }}\n)\n\nselect *\nfrom pivot_out_events", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.try_cast", "macro.dbt_utils.group_by"], "nodes": ["model.klaviyo.klaviyo__events"]}, "config": {"enabled": true, "alias": null, "schema": "klaviyo", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_klaviyo", "fqn": ["klaviyo", "klaviyo__person_campaign_flow"], "unique_id": "model.klaviyo.klaviyo__person_campaign_flow", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "klaviyo__person_campaign_flow.sql", "original_file_path": "models/klaviyo__person_campaign_flow.sql", "name": "klaviyo__person_campaign_flow", "alias": "klaviyo__person_campaign_flow", "checksum": {"name": "sha256", "checksum": "89abb4c1b2f90ada510aba4f45cb935f457c0e0a776a6f761826e5b270bc7817"}, "tags": [], "refs": [["klaviyo__events"]], "sources": [], "metrics": [], "description": "Table that aggregates event metrics to the person-campaign or -flow grain (but note that if a user interacts with 2 different variations of a flow/campaign somehow, they will have 2 records). Also note that organic interactions (someone with null campaign_id/flow_id) are included in this table. \n**Counts** of the instances of the events, as well as **sums** of the numeric value associated with events (i.e. revenue) will be pivoted out into columns, as configured by the `klaviyo__count_metrics` and `klaviyo__sum_revenue_metrics` variables, respectively. See the dbt_project.yml file for the default metrics used. These columns will be prefixed with `count_` and `sum_revenue_`.\n", "columns": {"person_id": {"name": "person_id", "description": "Foreign key referencing the PERSON who interacted with the flow/message.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_campaign_id": {"name": "last_touch_campaign_id", "description": "Foreign key referencing the CAMPAIGN attributed with these metrics (by the package's attribution model).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_flow_id": {"name": "last_touch_flow_id", "description": "Foreign key referencing the FLOW attributed with these metrics (by the package's attribution model).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_name": {"name": "campaign_name", "description": "A name for this campaign. If not specified, this will default to the subject of the campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_name": {"name": "flow_name", "description": "Name of the flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variation_id": {"name": "variation_id", "description": "Unique ID of the attributed flow or campaign variation group. This does not map onto another table. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_event_at": {"name": "first_event_at", "description": "Timestamp of the first ever interaction between this campaign/flow and a person. In other words, the first event trigger attributed to the campaign/flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_event_at": {"name": "last_event_at", "description": "Timestamp of the most recent interaction between this campaign/flow and a person. In other words, the last event trigger attributed to the campaign/flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_relation": {"name": "source_relation", "description": "The source where this data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioining together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "klaviyo://models/klaviyo.yml", "compiled_path": "target/compiled/klaviyo/models/klaviyo__person_campaign_flow.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "klaviyo"}, "created_at": 1665702405.187114, "compiled_sql": "with events as (\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_klaviyo`.`klaviyo__events`\n),\n\npivot_out_events as (\n \n select \n person_id,\n last_touch_campaign_id,\n last_touch_flow_id,\n campaign_name,\n flow_name,\n variation_id,\n source_relation,\n min(occurred_at) as first_event_at,\n max(occurred_at) as last_event_at\n\n -- sum up the numeric value associated with events (most likely will mean revenue)\n \n , sum(case when lower(type) = 'refunded order' then \n coalesce(\n \n safe_cast(numeric_value as numeric)\n\n, 0)\n else 0 end) \n as sum_revenue_refunded_order -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'placed order' then \n coalesce(\n \n safe_cast(numeric_value as numeric)\n\n, 0)\n else 0 end) \n as sum_revenue_placed_order -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'ordered product' then \n coalesce(\n \n safe_cast(numeric_value as numeric)\n\n, 0)\n else 0 end) \n as sum_revenue_ordered_product -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'checkout started' then \n coalesce(\n \n safe_cast(numeric_value as numeric)\n\n, 0)\n else 0 end) \n as sum_revenue_checkout_started -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'cancelled order' then \n coalesce(\n \n safe_cast(numeric_value as numeric)\n\n, 0)\n else 0 end) \n as sum_revenue_cancelled_order -- removing special characters that I have seen in different integration events\n \n\n -- count up the number of instances of each metric\n \n , sum(case when lower(type) = 'active on site' then 1 else 0 end) \n as count_active_on_site -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'viewed product' then 1 else 0 end) \n as count_viewed_product -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'ordered product' then 1 else 0 end) \n as count_ordered_product -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'placed order' then 1 else 0 end) \n as count_placed_order -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'refunded order' then 1 else 0 end) \n as count_refunded_order -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'cancelled order' then 1 else 0 end) \n as count_cancelled_order -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'fulfilled order' then 1 else 0 end) \n as count_fulfilled_order -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'received email' then 1 else 0 end) \n as count_received_email -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'clicked email' then 1 else 0 end) \n as count_clicked_email -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'opened email' then 1 else 0 end) \n as count_opened_email -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'bounced email' then 1 else 0 end) \n as count_bounced_email -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'marked email as spam' then 1 else 0 end) \n as count_marked_email_as_spam -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'dropped email' then 1 else 0 end) \n as count_dropped_email -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'subscribed to list' then 1 else 0 end) \n as count_subscribed_to_list -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'unsubscribed to list' then 1 else 0 end) \n as count_unsubscribed_to_list -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'unsubscribed' then 1 else 0 end) \n as count_unsubscribed -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'updated email preferences' then 1 else 0 end) \n as count_updated_email_preferences -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'subscribed to back in stock' then 1 else 0 end) \n as count_subscribed_to_back_in_stock -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'merged profile' then 1 else 0 end) \n as count_merged_profile -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'received sms' then 1 else 0 end) \n as count_received_sms -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'clicked sms' then 1 else 0 end) \n as count_clicked_sms -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'consented to receive sms' then 1 else 0 end) \n as count_consented_to_receive_sms -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'sent sms' then 1 else 0 end) \n as count_sent_sms -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'unsubscribed from sms' then 1 else 0 end) \n as count_unsubscribed_from_sms -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'failed to deliver sms' then 1 else 0 end) \n as count_failed_to_deliver_sms -- removing special characters that I have seen in different integration events\n \n\n from events\n group by 1,2,3,4,5,6,7\n)\n\nselect *\nfrom pivot_out_events", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_klaviyo`.`klaviyo__person_campaign_flow`"}, "model.klaviyo.klaviyo__persons": {"raw_sql": "with person as (\n\n select *\n from {{ var('person') }}\n),\n\nperson_metrics as (\n\n select *\n from {{ ref('int_klaviyo__person_metrics') }}\n),\n\nperson_join as (\n\n select\n person.*,\n {{ dbt_utils.star(from=ref('int_klaviyo__person_metrics'), except=[\"person_id\", \"source_relation\"]) }}\n\n from person\n left join person_metrics on (\n person.person_id = person_metrics.person_id\n and person.source_relation = person_metrics.source_relation\n )\n\n)\n\nselect *\nfrom person_join", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": ["model.klaviyo_source.stg_klaviyo__person", "model.klaviyo.int_klaviyo__person_metrics", "model.klaviyo.int_klaviyo__person_metrics"]}, "config": {"enabled": true, "alias": null, "schema": "klaviyo", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_klaviyo", "fqn": ["klaviyo", "klaviyo__persons"], "unique_id": "model.klaviyo.klaviyo__persons", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "klaviyo__persons.sql", "original_file_path": "models/klaviyo__persons.sql", "name": "klaviyo__persons", "alias": "klaviyo__persons", "checksum": {"name": "sha256", "checksum": "4228e8c8280040f57997ecd7d0cd1c726cee6789721533903c2f75ad6cefc473"}, "tags": [], "refs": [["stg_klaviyo__person"], ["int_klaviyo__person_metrics"], ["int_klaviyo__person_metrics"]], "sources": [], "metrics": [], "description": "Table of unique person profiles, enhanced with event, campaign, flow, and revenue metrics. \n**Counts** of instances of triggered events and **sums** of the numeric value (i.e. revenue) associated with events (total vs organic/not attributed to flows or campaigns) will be pivoted out into columns, as configured by the `klaviyo__count_metrics` and `klaviyo__sum_revenue_metrics`variables, respectively. See the dbt_project.yml file for the default metrics used. These columns will be prefixed with `total_count_`, `total_sum_revenue_` (organic + attributed), and `organic_sum_revenue_` (not attributed to a campaign or flow). \n", "columns": {"person_id": {"name": "person_id", "description": "Unique ID of the user if you use your own unique identifier. Otherwise, Klaviyo recommends using the email as the primary key. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "address_1": {"name": "address_1", "description": "First line of the person's address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "address_2": {"name": "address_2", "description": "Second line of the person's address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "city": {"name": "city", "description": "City they live in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "country": {"name": "country", "description": "Country they live in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "zip": {"name": "zip", "description": "Postal code where they live.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "Timestamp of when the person's profile was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email": {"name": "email", "description": "The email address and the unique identifier for a profile.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "full_name": {"name": "full_name", "description": "Person's full name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "latitude": {"name": "latitude", "description": "Latitude of the person's location.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "longitude": {"name": "longitude", "description": "Longitude of the person's location.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization": {"name": "organization", "description": "Business organization they belong to.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "phone_number": {"name": "phone_number", "description": "Associated phone number.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "region": {"name": "region", "description": "Region or state they live in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "timezone": {"name": "timezone", "description": "Timezone they are situated in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "title": {"name": "title", "description": "Title at their business or organization.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the person profile was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "count_total_campaigns": {"name": "count_total_campaigns", "description": "Count of the number of campaigns this person has interacted with.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "count_total_flows": {"name": "count_total_flows", "description": "Count of the number of flows this person has interacted with.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_event_at": {"name": "first_event_at", "description": "Timestamp of when the user first triggered an event (not limited to campaign and flow interactions).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_event_at": {"name": "last_event_at", "description": "Timestamp of when the user last triggered an event (not limited to campaign and flow interactions).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_campaign_touch_at": {"name": "first_campaign_touch_at", "description": "Timestamp of when the user first interacted with a campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_campaign_touch_at": {"name": "last_campaign_touch_at", "description": "Timestamp of when the user last interacted with a campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_flow_touch_at": {"name": "first_flow_touch_at", "description": "Timestamp of when the user first interacted with a flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_flow_touch_at": {"name": "last_flow_touch_at", "description": "Timestamp of when the user last interacted with a flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_relation": {"name": "source_relation", "description": "The source where this data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioining together multiple sources, this will be an empty string.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "klaviyo://models/klaviyo.yml", "compiled_path": "target/compiled/klaviyo/models/klaviyo__persons.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "klaviyo"}, "created_at": 1665702405.195345, "compiled_sql": "with person as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__person`\n),\n\nperson_metrics as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_int_klaviyo`.`int_klaviyo__person_metrics`\n),\n\nperson_join as (\n\n select\n person.*,\n *\n\n from person\n left join person_metrics on (\n person.person_id = person_metrics.person_id\n and person.source_relation = person_metrics.source_relation\n )\n\n)\n\nselect *\nfrom person_join", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_klaviyo`.`klaviyo__persons`"}, "model.klaviyo.klaviyo__flows": {"raw_sql": "with flow as (\n\n select *\n from {{ var('flow') }}\n),\n\nflow_metrics as (\n\n select *\n from {{ ref('int_klaviyo__campaign_flow_metrics') }}\n),\n\nflow_join as (\n \n {% set exclude_fields = ['last_touch_campaign_id', 'last_touch_flow_id', 'source_relation'] %}\n\n select\n flow.*, -- has flow_id and source_relation\n {{ dbt_utils.star(from=ref('int_klaviyo__campaign_flow_metrics'), except=exclude_fields) }}\n\n from flow\n left join flow_metrics on (\n flow.flow_id = flow_metrics.last_touch_flow_id\n and\n flow.source_relation = flow_metrics.source_relation\n )\n),\n\nfinal as (\n\n select \n *,\n {{ dbt_utils.surrogate_key(['flow_id','variation_id']) }} as flow_variation_key\n\n from flow_join\n)\n\nselect *\nfrom final", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt_utils.star", "macro.dbt_utils.surrogate_key"], "nodes": ["model.klaviyo_source.stg_klaviyo__flow", "model.klaviyo.int_klaviyo__campaign_flow_metrics", "model.klaviyo.int_klaviyo__campaign_flow_metrics"]}, "config": {"enabled": true, "alias": null, "schema": "klaviyo", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_klaviyo", "fqn": ["klaviyo", "klaviyo__flows"], "unique_id": "model.klaviyo.klaviyo__flows", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "klaviyo__flows.sql", "original_file_path": "models/klaviyo__flows.sql", "name": "klaviyo__flows", "alias": "klaviyo__flows", "checksum": {"name": "sha256", "checksum": "e51636d4194dd04fc1bd023c6aa0a982fa517a29f6734d611756bda94c123e0e"}, "tags": [], "refs": [["stg_klaviyo__flow"], ["int_klaviyo__campaign_flow_metrics"], ["int_klaviyo__campaign_flow_metrics"]], "sources": [], "metrics": [], "description": "Table of unique flow versions. A flow with 2 variations will have 2 distinct rows. **Counts** of the unique users and instances of the events, as well as **sums** of the numeric value associated with events (i.e. revenue) will be pivoted out into columns, as configured by the `klaviyo__count_metrics` and `klaviyo__sum_revenue_metrics` variables, respectively. See the dbt_project.yml file for the default metrics used. These columns will be prefixed with `count_`, `unique_count_`, and `sum_revenue_`.\n", "columns": {"flow_variation_key": {"name": "flow_variation_key", "description": "Unique key hashed on the flow and variation IDs.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "Timestamp of when the flow was first created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_id": {"name": "flow_id", "description": "Unique ID of the flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_name": {"name": "flow_name", "description": "Name of the flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status": {"name": "status", "description": "Current status of the flow. Either 'manual', 'live', or 'draft'. Read more [here](https://help.klaviyo.com/hc/en-us/articles/115002774932-Getting-Started-with-Flows#the-flow-action-status9).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_trigger": {"name": "flow_trigger", "description": "JSON of metric, segment, list, and/or date-property filters that will trigger this flow. These are applied to the **event level**.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the flow was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "person_filter": {"name": "person_filter", "description": "JSON of flow filters placed on the **person level** that will trigger this flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variation_id": {"name": "variation_id", "description": "Unique ID of the attributed flow variation group. This does not map onto another table. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_count_unique_people": {"name": "total_count_unique_people", "description": "The count of the distinct people that have interacted with this flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_event_at": {"name": "first_event_at", "description": "Timestamp of the first ever interaction between this flow and a person.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_event_at": {"name": "last_event_at", "description": "Timestamp of the most recent interaction between this flow and a person.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_relation": {"name": "source_relation", "description": "The source where this data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioining together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "klaviyo://models/klaviyo.yml", "compiled_path": "target/compiled/klaviyo/models/klaviyo__flows.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "klaviyo"}, "created_at": 1665702405.1917791, "compiled_sql": "with flow as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__flow`\n),\n\nflow_metrics as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_int_klaviyo`.`int_klaviyo__campaign_flow_metrics`\n),\n\nflow_join as (\n \n \n\n select\n flow.*, -- has flow_id and source_relation\n *\n\n from flow\n left join flow_metrics on (\n flow.flow_id = flow_metrics.last_touch_flow_id\n and\n flow.source_relation = flow_metrics.source_relation\n )\n),\n\nfinal as (\n\n select \n *,\n to_hex(md5(cast(coalesce(cast(flow_id as \n string\n), '') || '-' || coalesce(cast(variation_id as \n string\n), '') as \n string\n))) as flow_variation_key\n\n from flow_join\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_klaviyo`.`klaviyo__flows`"}, "model.klaviyo.klaviyo__campaigns": {"raw_sql": "with campaign as (\n\n select *\n from {{ var('campaign') }}\n),\n\ncampaign_metrics as (\n\n select *\n from {{ ref('int_klaviyo__campaign_flow_metrics') }}\n),\n\ncampaign_join as (\n \n {% set exclude_fields = [ 'last_touch_campaign_id', 'last_touch_flow_id', 'source_relation'] %}\n\n select\n campaign.*, -- has campaign_id and source_relation\n {{ dbt_utils.star(from=ref('int_klaviyo__campaign_flow_metrics'), except=exclude_fields) }}\n\n from campaign\n left join campaign_metrics on (\n campaign.campaign_id = campaign_metrics.last_touch_campaign_id\n and\n campaign.source_relation = campaign_metrics.source_relation\n )\n),\n\nfinal as (\n\n select \n *,\n {{ dbt_utils.surrogate_key(['campaign_id','variation_id']) }} as campaign_variation_key\n\n from campaign_join\n)\n\nselect *\nfrom final", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt_utils.star", "macro.dbt_utils.surrogate_key"], "nodes": ["model.klaviyo_source.stg_klaviyo__campaign", "model.klaviyo.int_klaviyo__campaign_flow_metrics", "model.klaviyo.int_klaviyo__campaign_flow_metrics"]}, "config": {"enabled": true, "alias": null, "schema": "klaviyo", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_klaviyo", "fqn": ["klaviyo", "klaviyo__campaigns"], "unique_id": "model.klaviyo.klaviyo__campaigns", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "klaviyo__campaigns.sql", "original_file_path": "models/klaviyo__campaigns.sql", "name": "klaviyo__campaigns", "alias": "klaviyo__campaigns", "checksum": {"name": "sha256", "checksum": "3f86c2f589802530165ac6e6244681db0f42091784c29a6ae17b752f5ed4cd6f"}, "tags": [], "refs": [["stg_klaviyo__campaign"], ["int_klaviyo__campaign_flow_metrics"], ["int_klaviyo__campaign_flow_metrics"]], "sources": [], "metrics": [], "description": "Table of unique campaign versions. A campaign with 2 variations will have 2 distinct rows. **Counts** of the unique users and instances of the events, as well as **sums** of the numeric value associated with events (i.e. revenue) will be pivoted out into columns, as configured by the `klaviyo__count_metrics` and `klaviyo__sum_revenue_metrics` variables, respectively. See the dbt_project.yml file for the default metrics used. These columns will be prefixed with `count_`, `unique_count_`, and `sum_revenue_`.\n", "columns": {"campaign_variation_key": {"name": "campaign_variation_key", "description": "Unique key hashed on the campaign and variation IDs.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_type": {"name": "campaign_type", "description": "Type of campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "Timestamp of when the campaign was created, in UTC.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email_template_id": {"name": "email_template_id", "description": "Foreign key referencing the ID of the `email_template` object that will be the content of this campaign. Note the Email Template is copied when creating this campaign, so future changes to that Email Template will not alter the content of this campaign.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "from_email": {"name": "from_email", "description": "The email address your email will be sent from and will be used in the reply-to header.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "from_name": {"name": "from_name", "description": "The name or label associated with the email address you're sending from.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Unique ID of the campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_segmented": {"name": "is_segmented", "description": "Boolean that is true if the campaign is directed at a Klaviyo segment (not a list).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_name": {"name": "campaign_name", "description": "A name for this campaign. If not specified, this will default to the subject of the campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "scheduled_to_send_at": {"name": "scheduled_to_send_at", "description": "Timestamp of when the campaign is scheduled to be sent in the future, if [\"smart send time\"](https://help.klaviyo.com/hc/en-us/articles/360029794371-Smart-Send-Time-in-Klaviyo#how-to-utilize-smart-send-time3) is used. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "sent_at": {"name": "sent_at", "description": "Timestamp of when the campaign was first sent out to users.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status": {"name": "status", "description": "Current status of the campaign. Either \"draft\", \"scheduled\", \"sent\", or \"cancelled\".", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status_id": {"name": "status_id", "description": "Corresponding ID to the current status.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "subject": {"name": "subject", "description": "The subject line of the campaign's email.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the campaign was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variation_id": {"name": "variation_id", "description": "Unique ID of the attributed campaign variation group. This does not map onto another table. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_count_unique_people": {"name": "total_count_unique_people", "description": "The count of the distinct people that have interacted with this campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_event_at": {"name": "first_event_at", "description": "Timestamp of the first ever interaction between this campaign and a person.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_event_at": {"name": "last_event_at", "description": "Timestamp of the most recent interaction between this campaign and a person.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_relation": {"name": "source_relation", "description": "The source where this data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioining together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "klaviyo://models/klaviyo.yml", "compiled_path": "target/compiled/klaviyo/models/klaviyo__campaigns.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "klaviyo"}, "created_at": 1665702405.189868, "compiled_sql": "with campaign as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__campaign`\n),\n\ncampaign_metrics as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_int_klaviyo`.`int_klaviyo__campaign_flow_metrics`\n),\n\ncampaign_join as (\n \n \n\n select\n campaign.*, -- has campaign_id and source_relation\n *\n\n from campaign\n left join campaign_metrics on (\n campaign.campaign_id = campaign_metrics.last_touch_campaign_id\n and\n campaign.source_relation = campaign_metrics.source_relation\n )\n),\n\nfinal as (\n\n select \n *,\n to_hex(md5(cast(coalesce(cast(campaign_id as \n string\n), '') || '-' || coalesce(cast(variation_id as \n string\n), '') as \n string\n))) as campaign_variation_key\n\n from campaign_join\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_klaviyo`.`klaviyo__campaigns`"}, "model.klaviyo.klaviyo__events": {"raw_sql": "{{\n config(\n materialized='incremental',\n unique_key='unique_event_id',\n partition_by={\n \"field\": \"occurred_on\",\n \"data_type\": \"date\"\n } if target.type == 'bigquery' else none,\n incremental_strategy = 'merge' if target.type not in ('snowflake', 'postgres', 'redshift') else 'delete+insert',\n file_format = 'delta'\n )\n}}\n-- ^ the incremental strategy is split into delete+insert for snowflake since there is a bit of\n-- overlap in transformed data blocks for incremental runs (we look back an extra hour, see lines 23 - 30)\n-- this configuration solution was taken from https://docs.getdbt.com/reference/resource-configs/snowflake-configs#merge-behavior-incremental-models\n\nwith events as (\n\n select *\n from {{ ref('int_klaviyo__event_attribution') }}\n\n {% if is_incremental() %}\n\n -- most events (from all kinds of integrations) at least once every hour\n where _fivetran_synced >= cast(coalesce( \n (\n select {{ dbt_utils.dateadd(datepart = 'hour', \n interval = -1,\n from_date_or_timestamp = 'max(_fivetran_synced)' ) }} \n from {{ this }}\n ), '2012-01-01') as {{ dbt_utils.type_timestamp() }} ) -- klaviyo was founded in 2012, so let's default the min date to then\n {% endif %}\n),\n\nevent_fields as (\n\n -- excluding some fields to rename them and/or make them null if needed\n {% set exclude_fields = ['touch_session', 'last_touch_id', 'session_start_at', 'session_event_type', 'type', 'session_touch_type'] %}\n -- as of the patch release of dbt-utils v0.7.3, the snowflake uppercasing is not needed anymore so we have deleted the snowflake conditional in the exclusion\n\n select \n {{ dbt_utils.star(from=ref('int_klaviyo__event_attribution'), except=exclude_fields) }},\n\n type, -- need to pull this out because it gets removed by dbt_utils.star, due to being a substring of 'session_event_type' and 'session_touch_type'\n\n -- split out campaign and flow IDs\n case \n when session_touch_type = 'campaign' then last_touch_id \n else null end as last_touch_campaign_id,\n case \n when session_touch_type = 'flow' then last_touch_id \n else null end as last_touch_flow_id,\n\n -- only make these non-null if the event indeed qualified for attribution\n case \n when last_touch_id is not null then session_start_at \n else null end as last_touch_at,\n case \n when last_touch_id is not null then session_event_type \n else null end as last_touch_event_type,\n case \n when last_touch_id is not null then session_touch_type \n else null end as last_touch_type -- flow vs campaign\n\n \n from events\n),\n\ncampaign as (\n\n select *\n from {{ var('campaign') }}\n),\n\nflow as (\n\n select *\n from {{ var('flow') }}\n),\n\nperson as (\n\n select *\n from {{ var('person') }}\n),\n\n-- just pulling this to join with INTEGRATION\nmetric as (\n\n select *\n from {{ var('metric') }}\n),\n\nintegration as (\n\n select *\n from {{ var('integration') }}\n),\n\njoin_fields as (\n\n select\n event_fields.*,\n campaign.campaign_name,\n campaign.campaign_type,\n campaign.subject as campaign_subject_line,\n flow.flow_name, \n person.city as person_city,\n person.country as person_country,\n person.region as person_region,\n person.email as person_email,\n person.timezone as person_timezone,\n integration.integration_name,\n integration.category as integration_category\n\n from event_fields\n left join campaign on (\n event_fields.last_touch_campaign_id = campaign.campaign_id\n and\n event_fields.source_relation = campaign.source_relation\n )\n left join flow on (\n event_fields.last_touch_flow_id = flow.flow_id\n and\n event_fields.source_relation = flow.source_relation \n )\n left join person on (\n event_fields.person_id = person.person_id\n and\n event_fields.source_relation = person.source_relation\n )\n left join metric on (\n event_fields.metric_id = metric.metric_id\n and\n event_fields.source_relation = metric.source_relation\n )\n left join integration on (\n metric.integration_id = integration.integration_id\n and\n metric.source_relation = integration.source_relation\n )\n)\n\nselect * from join_fields", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt.is_incremental", "macro.dbt_utils.star"], "nodes": ["model.klaviyo.int_klaviyo__event_attribution", "model.klaviyo.int_klaviyo__event_attribution", "model.klaviyo_source.stg_klaviyo__campaign", "model.klaviyo_source.stg_klaviyo__flow", "model.klaviyo_source.stg_klaviyo__person", "model.klaviyo_source.stg_klaviyo__metric", "model.klaviyo_source.stg_klaviyo__integration"]}, "config": {"enabled": true, "alias": null, "schema": "klaviyo", "database": null, "tags": [], "meta": {}, "materialized": "incremental", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": "unique_event_id", "on_schema_change": "ignore", "grants": {}, "partition_by": {"field": "occurred_on", "data_type": "date"}, "incremental_strategy": "merge", "file_format": "delta", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_klaviyo", "fqn": ["klaviyo", "klaviyo__events"], "unique_id": "model.klaviyo.klaviyo__events", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "klaviyo__events.sql", "original_file_path": "models/klaviyo__events.sql", "name": "klaviyo__events", "alias": "klaviyo__events", "checksum": {"name": "sha256", "checksum": "57d9d0880b095c3d94680250844b52ad63a63755b2b25870f6ba491933308951"}, "tags": [], "refs": [["int_klaviyo__event_attribution"], ["int_klaviyo__event_attribution"], ["stg_klaviyo__campaign"], ["stg_klaviyo__flow"], ["stg_klaviyo__person"], ["stg_klaviyo__metric"], ["stg_klaviyo__integration"]], "sources": [], "metrics": [], "description": "Table of Klaviyo events, enriched with attribution data (see `int_klaviyo__event_attribution` for details), and information regarding the event's associated user, flow, campaign, and platform/integration. \nNote: this model has an incremental materialization. Custom event-columns specified by the `klaviyo__event_pass_through_columns` variable will appear here as well.\n", "columns": {"variation_id": {"name": "variation_id", "description": "Unique ID of the attributed flow or campaign variation group. This does not map onto another table. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Foreign key referencing the CAMPAIGN that the event is attributed to.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "occurred_at": {"name": "occurred_at", "description": "Timestamp of when the event was triggered.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_id": {"name": "flow_id", "description": "Foreign key referencing the FLOW that the event is attributed to.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_message_id": {"name": "flow_message_id", "description": "Unique ID of the FLOW_MESSAGE that the event is attributed to. This does not map onto another table.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "event_id": {"name": "event_id", "description": "Unique ID of the event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "metric_id": {"name": "metric_id", "description": "Foreign key referencing the metric being captured.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "person_id": {"name": "person_id", "description": "Foreign key referencing the PERSON who triggered the event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "type": {"name": "type", "description": "Type of event that was triggered. This is the same as the METRIC name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "uuid": {"name": "uuid", "description": "Universally Unique Identifier of the event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "numeric_value": {"name": "numeric_value", "description": "Numeric value associated with the event (ie the dollars associated with a purchase).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "touch_type": {"name": "touch_type", "description": "Type of touch/message that the event itself is already attributed to in Klaviyo. Either 'flow', 'campaign', or null. Note that the package will refer to campaign and flow interactions as \"touches\".\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "occurred_on": {"name": "occurred_on", "description": "Calendar date (UTC) on which the event occurred.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "touch_id": {"name": "touch_id", "description": "Coalescing of the Klaviyo-attributed campaign_id and flow_id.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_at": {"name": "last_touch_at", "description": "Timestamp of when, relative to the current event, this person last interacted with a campaign or flow according to Klaviyo. This will be null if the event is not attributed to any flow or campaign. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_event_type": {"name": "last_touch_event_type", "description": "The type of event through which, relative to the current event, the person last interacted with a campaign or flow. This information is used to determine which lookback window to use (email vs sms). This will be null if the event is not attributed to any flow or campaign.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_type": {"name": "last_touch_type", "description": "What kind of touch the event was attributed to by the package -- 'campaign', 'flow', or null.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_campaign_id": {"name": "last_touch_campaign_id", "description": "Foreign key referencing the CAMPAIGN that the event is attributed to by the package.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_flow_id": {"name": "last_touch_flow_id", "description": "Foreign key referencing the FLOW that the event is attributed to by the package.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_name": {"name": "campaign_name", "description": "A name for this campaign. If not specified, this will default to the subject of the campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_type": {"name": "campaign_type", "description": "Type of campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_subject_line": {"name": "campaign_subject_line", "description": "Type of campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_name": {"name": "flow_name", "description": "Name of the flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "person_city": {"name": "person_city", "description": "City that the person who triggered this event lives in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "person_country": {"name": "person_country", "description": "Country that the person who triggered this event lives in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "person_region": {"name": "person_region", "description": "Region or state that the person who triggered this event lives in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "person_email": {"name": "person_email", "description": "The email address and the unique identifier for the person who triggered the event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "person_timezone": {"name": "person_timezone", "description": "Timezone that the person who triggered this event is situated in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "integration_name": {"name": "integration_name", "description": "Name of the platform that triggered the event (either Klaviyo, the API, or another integration).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "integration_category": {"name": "integration_category", "description": "Use-case category of the platform that sent the event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "UTC Timestamp that indicates the start time of the Fivetran job that synced this event row.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "unique_event_id": {"name": "unique_event_id", "description": "The unique identifier for the combination of event_id and source_relation columns.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_relation": {"name": "source_relation", "description": "The source where this data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioining together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "klaviyo://models/klaviyo.yml", "compiled_path": "target/compiled/klaviyo/models/klaviyo__events.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "incremental", "schema": "klaviyo", "unique_key": "unique_event_id", "partition_by": {"field": "occurred_on", "data_type": "date"}, "incremental_strategy": "merge", "file_format": "delta"}, "created_at": 1665702405.185419, "compiled_sql": "\n-- ^ the incremental strategy is split into delete+insert for snowflake since there is a bit of\n-- overlap in transformed data blocks for incremental runs (we look back an extra hour, see lines 23 - 30)\n-- this configuration solution was taken from https://docs.getdbt.com/reference/resource-configs/snowflake-configs#merge-behavior-incremental-models\n\nwith events as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_int_klaviyo`.`int_klaviyo__event_attribution`\n\n \n),\n\nevent_fields as (\n\n -- excluding some fields to rename them and/or make them null if needed\n \n -- as of the patch release of dbt-utils v0.7.3, the snowflake uppercasing is not needed anymore so we have deleted the snowflake conditional in the exclusion\n\n select \n *,\n\n type, -- need to pull this out because it gets removed by dbt_utils.star, due to being a substring of 'session_event_type' and 'session_touch_type'\n\n -- split out campaign and flow IDs\n case \n when session_touch_type = 'campaign' then last_touch_id \n else null end as last_touch_campaign_id,\n case \n when session_touch_type = 'flow' then last_touch_id \n else null end as last_touch_flow_id,\n\n -- only make these non-null if the event indeed qualified for attribution\n case \n when last_touch_id is not null then session_start_at \n else null end as last_touch_at,\n case \n when last_touch_id is not null then session_event_type \n else null end as last_touch_event_type,\n case \n when last_touch_id is not null then session_touch_type \n else null end as last_touch_type -- flow vs campaign\n\n \n from events\n),\n\ncampaign as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__campaign`\n),\n\nflow as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__flow`\n),\n\nperson as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__person`\n),\n\n-- just pulling this to join with INTEGRATION\nmetric as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__metric`\n),\n\nintegration as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__integration`\n),\n\njoin_fields as (\n\n select\n event_fields.*,\n campaign.campaign_name,\n campaign.campaign_type,\n campaign.subject as campaign_subject_line,\n flow.flow_name, \n person.city as person_city,\n person.country as person_country,\n person.region as person_region,\n person.email as person_email,\n person.timezone as person_timezone,\n integration.integration_name,\n integration.category as integration_category\n\n from event_fields\n left join campaign on (\n event_fields.last_touch_campaign_id = campaign.campaign_id\n and\n event_fields.source_relation = campaign.source_relation\n )\n left join flow on (\n event_fields.last_touch_flow_id = flow.flow_id\n and\n event_fields.source_relation = flow.source_relation \n )\n left join person on (\n event_fields.person_id = person.person_id\n and\n event_fields.source_relation = person.source_relation\n )\n left join metric on (\n event_fields.metric_id = metric.metric_id\n and\n event_fields.source_relation = metric.source_relation\n )\n left join integration on (\n metric.integration_id = integration.integration_id\n and\n metric.source_relation = integration.source_relation\n )\n)\n\nselect * from join_fields", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_klaviyo`.`klaviyo__events`"}, "model.klaviyo.int_klaviyo__campaign_flow_metrics": {"raw_sql": "with person_campaign_flow as (\n\n select *\n from {{ ref('klaviyo__person_campaign_flow') }}\n),\n\n{%- set pcf_columns = adapter.get_columns_in_relation(ref('klaviyo__person_campaign_flow')) %}\n\n-- aggregating to the campaign/flow - variation level. so a flow with A/B versions will have 2 rows\nagg_metrics as (\n\n select\n last_touch_campaign_id,\n last_touch_flow_id,\n variation_id,\n source_relation,\n count(distinct person_id) as total_count_unique_people,\n min(first_event_at) as first_event_at,\n max(last_event_at) as last_event_at\n \n {% for col in pcf_columns if col.name|lower not in ['last_touch_campaign_id', 'person_id', 'last_touch_flow_id', 'source_relation',\n 'campaign_name', 'flow_name','variation_id', 'first_event_at', 'last_event_at'] %}\n -- sum up any person-level metrics to the flow/campaign level\n , sum( {{ col.name }} ) as {{ col.name }}\n\n {% if 'sum_revenue' not in col.name|lower %} -- only look at 'count' metrics for unique people counts\n -- get unique number of people who did each kind of event\n -- each record in person_campaign_flow is at the person-campaign/flow-variation level, \n -- so we can just sum up 0s and 1s to get totals at the campaign/flow-variation grain.\n , sum(case when {{ col.name }} > 0 then 1 else 0 end) as {{ 'unique_' ~ col.name }}\n\n {% endif %}\n {% endfor -%}\n\n from person_campaign_flow\n group by 1,2,3,4\n)\n\nselect * from agg_metrics", "compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["model.klaviyo.klaviyo__person_campaign_flow", "model.klaviyo.klaviyo__person_campaign_flow"]}, "config": {"enabled": true, "alias": null, "schema": "int_klaviyo", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_int_klaviyo", "fqn": ["klaviyo", "intermediate", "int_klaviyo__campaign_flow_metrics"], "unique_id": "model.klaviyo.int_klaviyo__campaign_flow_metrics", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "intermediate/int_klaviyo__campaign_flow_metrics.sql", "original_file_path": "models/intermediate/int_klaviyo__campaign_flow_metrics.sql", "name": "int_klaviyo__campaign_flow_metrics", "alias": "int_klaviyo__campaign_flow_metrics", "checksum": {"name": "sha256", "checksum": "05f2223e2d8ab2cbcb57045b3008aee2e9c74f1803cb5e3b658b8b92b7b22e9d"}, "tags": [], "refs": [["klaviyo__person_campaign_flow"], ["klaviyo__person_campaign_flow"]], "sources": [], "metrics": [], "description": "Table that draws from the `klaviyo__person_campaign_flow` model to aggregate event metrics to the campaign or flow AND variation grain. A campaign with A/B versions will have 2 records. **Counts** of the unique users and instances of the events, as well as **sums** of the numeric value associated with events (i.e. revenue) will be pivoted out into columns, as configured by the `klaviyo__count_metrics` and `klaviyo__sum_revenue_metrics` variables, respectively. See the dbt_project.yml file for the default metrics used. These columns will be prefixed with `count_`, `unique_count_`, and `sum_revenue_`.\n", "columns": {"last_touch_campaign_id": {"name": "last_touch_campaign_id", "description": "Foreign key referencing the CAMPAIGN attributed with these metrics (by the package's attribution model).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_flow_id": {"name": "last_touch_flow_id", "description": "Foreign key referencing the FLOW attributed with these metrics (by the package's attribution model).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variation_id": {"name": "variation_id", "description": "Unique ID of the attributed flow or campaign variation group. This does not map onto another table. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_count_unique_people": {"name": "total_count_unique_people", "description": "The count of the distinct people that have interacted with this campaign or flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_event_at": {"name": "first_event_at", "description": "Timestamp of the first ever interaction between this campaign/flow and a person.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_event_at": {"name": "last_event_at", "description": "Timestamp of the most recent interaction between this campaign/flow and a person.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_relation": {"name": "source_relation", "description": "The source where this data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioining together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "klaviyo://models/intermediate/int_klaviyo.yml", "compiled_path": "target/compiled/klaviyo/models/intermediate/int_klaviyo__campaign_flow_metrics.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "int_klaviyo"}, "created_at": 1665702405.2199821, "compiled_sql": "with person_campaign_flow as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_klaviyo`.`klaviyo__person_campaign_flow`\n),\n\n-- aggregating to the campaign/flow - variation level. so a flow with A/B versions will have 2 rows\nagg_metrics as (\n\n select\n last_touch_campaign_id,\n last_touch_flow_id,\n variation_id,\n source_relation,\n count(distinct person_id) as total_count_unique_people,\n min(first_event_at) as first_event_at,\n max(last_event_at) as last_event_at\n \n from person_campaign_flow\n group by 1,2,3,4\n)\n\nselect * from agg_metrics", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_int_klaviyo`.`int_klaviyo__campaign_flow_metrics`"}, "model.klaviyo.int_klaviyo__person_metrics": {"raw_sql": "with person_campaign_flow as (\n\n select *\n from {{ ref('klaviyo__person_campaign_flow') }}\n),\n\n{%- set pcf_columns = adapter.get_columns_in_relation(ref('klaviyo__person_campaign_flow')) %}\n\nagg_metrics as (\n\n select\n person_id,\n source_relation,\n count(distinct last_touch_campaign_id) as count_total_campaigns,\n count(distinct last_touch_flow_id) as count_total_flows,\n min(first_event_at) as first_event_at, -- first ever event occurred at\n max(last_event_at) as last_event_at, -- last ever event occurred at\n min(distinct case when last_touch_campaign_id is not null then first_event_at end) as first_campaign_touch_at,\n max(distinct case when last_touch_campaign_id is not null then last_event_at end) as last_campaign_touch_at,\n min(distinct case when last_touch_flow_id is not null then first_event_at end) as first_flow_touch_at,\n max(distinct case when last_touch_flow_id is not null then last_event_at end) as last_flow_touch_at\n\n {% for col in pcf_columns if col.name|lower not in ['last_touch_campaign_id', 'person_id', 'last_touch_flow_id', 'source_relation',\n 'campaign_name', 'flow_name','variation_id', 'first_event_at', 'last_event_at'] %}\n -- sum up any count/sum_revenue metrics -> prefix with `total` since we're pulling out organic sums as well\n , sum( {{ col.name }} ) as {{ 'total_' ~ col.name }}\n\n -- let's pull out the organic (not attributed to a flow or campaign) revenue sums\n {% if 'sum_revenue' in col.name|lower %}\n , sum( case when coalesce(last_touch_campaign_id, last_touch_flow_id) is null then {{ col.name }} else 0 end ) as {{ 'organic_' ~ col.name }}\n {% endif %}\n\n {% endfor -%}\n\n from person_campaign_flow\n group by 1,2\n\n)\n\nselect * from agg_metrics", "compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["model.klaviyo.klaviyo__person_campaign_flow", "model.klaviyo.klaviyo__person_campaign_flow"]}, "config": {"enabled": true, "alias": null, "schema": "int_klaviyo", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_int_klaviyo", "fqn": ["klaviyo", "intermediate", "int_klaviyo__person_metrics"], "unique_id": "model.klaviyo.int_klaviyo__person_metrics", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "intermediate/int_klaviyo__person_metrics.sql", "original_file_path": "models/intermediate/int_klaviyo__person_metrics.sql", "name": "int_klaviyo__person_metrics", "alias": "int_klaviyo__person_metrics", "checksum": {"name": "sha256", "checksum": "a17b4d3bfd7f6a19bc40dc8199f22c30594994645f31cc2bd72280e8ac429259"}, "tags": [], "refs": [["klaviyo__person_campaign_flow"], ["klaviyo__person_campaign_flow"]], "sources": [], "metrics": [], "description": "Table that draws from the `klaviyo__person_campaign_flow` model to aggregate event metrics to the person grain. \n**Counts** of instances of the events and **sums** of the numeric value (i.e. revenue) associated with events (total vs organic/not attributed to flows or campaigns) will be pivoted out into columns, as configured by the `klaviyo__count_metrics` and `klaviyo__sum_revenue_metrics`variables, respectively. See the dbt_project.yml file for the default metrics used. \nThese columns will be prefixed with `total_count_`, `total_sum_revenue_` (organic + attributed), and `organic_sum_revenue_` (not attributed to a campaign or flow). \n", "columns": {"person_id": {"name": "person_id", "description": "Unique ID of the person.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "count_total_campaigns": {"name": "count_total_campaigns", "description": "Count of the number of campaigns this person has interacted with.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "count_total_flows": {"name": "count_total_flows", "description": "Count of the number of flows this person has interacted with.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_event_at": {"name": "first_event_at", "description": "Timestamp of when the user first triggered an event (not limited to campaign and flow interactions).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_event_at": {"name": "last_event_at", "description": "Timestamp of when the user last triggered an event (not limited to campaign and flow interactions).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_campaign_touch_at": {"name": "first_campaign_touch_at", "description": "Timestamp of when the user first interacted with a campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_campaign_touch_at": {"name": "last_campaign_touch_at", "description": "Timestamp of when the user last interacted with a campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_flow_touch_at": {"name": "first_flow_touch_at", "description": "Timestamp of when the user first interacted with a flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_flow_touch_at": {"name": "last_flow_touch_at", "description": "Timestamp of when the user last interacted with a flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_relation": {"name": "source_relation", "description": "The source where this data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioining together multiple sources, this will be an empty string.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "klaviyo://models/intermediate/int_klaviyo.yml", "compiled_path": "target/compiled/klaviyo/models/intermediate/int_klaviyo__person_metrics.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "int_klaviyo"}, "created_at": 1665702405.221685, "compiled_sql": "with person_campaign_flow as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_klaviyo`.`klaviyo__person_campaign_flow`\n),\n\nagg_metrics as (\n\n select\n person_id,\n source_relation,\n count(distinct last_touch_campaign_id) as count_total_campaigns,\n count(distinct last_touch_flow_id) as count_total_flows,\n min(first_event_at) as first_event_at, -- first ever event occurred at\n max(last_event_at) as last_event_at, -- last ever event occurred at\n min(distinct case when last_touch_campaign_id is not null then first_event_at end) as first_campaign_touch_at,\n max(distinct case when last_touch_campaign_id is not null then last_event_at end) as last_campaign_touch_at,\n min(distinct case when last_touch_flow_id is not null then first_event_at end) as first_flow_touch_at,\n max(distinct case when last_touch_flow_id is not null then last_event_at end) as last_flow_touch_at\n\n from person_campaign_flow\n group by 1,2\n\n)\n\nselect * from agg_metrics", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_int_klaviyo`.`int_klaviyo__person_metrics`"}, "model.klaviyo.int_klaviyo__event_attribution": {"raw_sql": "{{\n config(\n materialized='incremental',\n unique_key='unique_event_id',\n partition_by={\n \"field\": \"occurred_on\",\n \"data_type\": \"date\"\n } if target.type == 'bigquery' else none,\n incremental_strategy = 'merge' if target.type not in ('postgres', 'redshift') else 'delete+insert',\n file_format = 'delta'\n )\n}}\n\nwith events as (\n\n select \n *,\n -- no event will be attributed to both a campaign and flow\n coalesce(campaign_id, flow_id) as touch_id,\n case \n when campaign_id is not null then 'campaign' \n when flow_id is not null then 'flow' \n else null end as touch_type -- defintion: touch = interaction with campaign/flow\n\n from {{ var('event_table') }}\n\n {% if is_incremental() %}\n -- grab **ALL** events for users who have any events in this new increment\n where person_id in (\n\n select distinct person_id\n from {{ var('event_table') }}\n\n -- most events (from all kinds of integrations) at least once every hour\n -- https://help.klaviyo.com/hc/en-us/articles/115005253208\n where _fivetran_synced >= cast(coalesce( \n (\n select {{ dbt_utils.dateadd(datepart = 'hour', \n interval = -1,\n from_date_or_timestamp = 'max(_fivetran_synced)' ) }} \n from {{ this }}\n ), '2012-01-01') as {{ dbt_utils.type_timestamp() }} ) -- klaviyo was founded in 2012, so let's default the min date to then\n )\n {% endif %}\n),\n\n-- sessionize events based on attribution eligibility -- is it the right kind of event, and does it have a campaign or flow?\ncreate_sessions as (\n select\n *,\n -- default klaviyo__event_attribution_filter limits attribution-eligible events to to email opens, email clicks, and sms opens\n -- https://help.klaviyo.com/hc/en-us/articles/115005248128\n\n -- events that come with flow/campaign attributions (and are eligible event types) will create new sessions.\n -- non-attributed events that come in afterward will be batched into the same attribution-session\n sum(case when touch_id is not null\n {% if var('klaviyo__eligible_attribution_events') != [] %}\n and lower(type) in {{ \"('\" ~ (var('klaviyo__eligible_attribution_events') | join(\"', '\")) ~ \"')\" }}\n {% endif %}\n then 1 else 0 end) over (\n partition by person_id, source_relation order by occurred_at asc rows between unbounded preceding and current row) as touch_session \n\n from events\n\n),\n\n-- \"session start\" refers to the event in a \"touch session\" that is already attributed with a campaign or flow by Klaviyo\n-- a new event that is attributed with a campaign/flow will trigger a new session, so there will only be one already-attributed event per each session \n-- events that are missing attributions will borrow data from the event that triggered the session, if they are in the lookback window (see `attribute` CTE)\nlast_touches as (\n\n select \n *,\n -- when did the touch session begin?\n min(occurred_at) over(partition by person_id, source_relation, touch_session) as session_start_at,\n\n -- get the kind of metric/event that triggered the attribution session, in order to decide \n -- to use the sms or email lookback value. \n first_value(type) over(\n partition by person_id, source_relation, touch_session order by occurred_at asc rows between unbounded preceding and current row) as session_event_type\n\n from create_sessions\n),\n\nattribute as (\n\n select \n *,\n -- klaviyo uses different lookback windows for email and sms events\n -- default email lookback = 5 days (120 hours) -> https://help.klaviyo.com/hc/en-us/articles/115005248128#conversion-tracking1\n -- default sms lookback: 1 day (24 hours -> https://help.klaviyo.com/hc/en-us/articles/115005248128#sms-conversion-tracking7\n\n coalesce(touch_id, -- use pre-attributed flow/campaign if provided\n case \n when {{ dbt_utils.datediff('session_start_at', 'occurred_at', 'hour') }} <= (\n case \n when lower(session_event_type) like '%sms%' then {{ var('klaviyo__sms_attribution_lookback') }}\n else {{ var('klaviyo__email_attribution_lookback') }} end\n ) -- if the events fall within the lookback window, attribute\n then first_value(touch_id) over (\n partition by person_id, source_relation, touch_session order by occurred_at asc rows between unbounded preceding and current row)\n else null end) as last_touch_id -- session qualified for attribution -> we will call this \"last touch\"\n\n from last_touches \n),\n\nfinal as (\n\n select\n *,\n\n -- get whether the event is attributed to a flow or campaign\n coalesce(touch_type, first_value(touch_type) over(\n partition by person_id, source_relation, touch_session order by occurred_at asc rows between unbounded preceding and current row)) \n\n as session_touch_type -- if the session events qualified for attribution, extract the type of touch they are attributed to\n\n from attribute \n)\n\nselect * from final", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt.is_incremental", "macro.dbt_utils.datediff"], "nodes": ["model.klaviyo_source.stg_klaviyo__event"]}, "config": {"enabled": true, "alias": null, "schema": "int_klaviyo", "database": null, "tags": [], "meta": {}, "materialized": "incremental", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": "unique_event_id", "on_schema_change": "ignore", "grants": {}, "partition_by": {"field": "occurred_on", "data_type": "date"}, "incremental_strategy": "merge", "file_format": "delta", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_int_klaviyo", "fqn": ["klaviyo", "intermediate", "int_klaviyo__event_attribution"], "unique_id": "model.klaviyo.int_klaviyo__event_attribution", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "intermediate/int_klaviyo__event_attribution.sql", "original_file_path": "models/intermediate/int_klaviyo__event_attribution.sql", "name": "int_klaviyo__event_attribution", "alias": "int_klaviyo__event_attribution", "checksum": {"name": "sha256", "checksum": "0f50b3c667fde764eb0671135da6a44202089275d90ab399b5583c33bc71613e"}, "tags": [], "refs": [["stg_klaviyo__event"]], "sources": [], "metrics": [], "description": "Table enriching events with an additional layer of last-touch attribution. Though Klaviyo already performs attribution on events each day, this extra step is necessary, as certain kinds of events/metrics never get attributed to flows or campaigns via Klaviyo's internal model. \nBy default, the package performs attribution [in line with Klaviyo](https://help.klaviyo.com/hc/en-us/articles/115005248128). It considers email opens and clicks, and SMS opens as the events eligible to be credited with conversions. This attribution-eligibility can be configured by the `klaviyo__eligible_attribution_events` variable. Note that this refers to the events eligible to credit campaigns and flows with conversions, _not_ the events eligible to receive attribution (all kinds of events are privy to this).\nSimilar to Klaviyo, the package by default considers the conversion period/lookback window for email events to be 120 hours (5 days) and 24 hours for SMS events. These can be configured through the `klaviyo__email_attribution_lookback` and `klaviyo__sms_attribution_lookback` variables, respectively (in integer-hours).\nNote: this model has an incremental materialization. Custom event-columns specified by the `klaviyo__event_pass_through_columns` variable will appear here as well.\n", "columns": {"variation_id": {"name": "variation_id", "description": "Unique ID of the attributed flow or campaign variation group. This does not map onto another table. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Foreign key referencing the CAMPAIGN that the event is attributed to.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "occurred_at": {"name": "occurred_at", "description": "Timestamp of when the event was triggered.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_id": {"name": "flow_id", "description": "Foreign key referencing the FLOW that the event is attributed to.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_message_id": {"name": "flow_message_id", "description": "Unique ID of the FLOW_MESSAGE that the event is attributed to. This does not map onto another table.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "event_id": {"name": "event_id", "description": "Unique ID of the event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "metric_id": {"name": "metric_id", "description": "Foreign key referencing the metric being captured.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "person_id": {"name": "person_id", "description": "Foreign key referencing the PERSON who triggered the event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "type": {"name": "type", "description": "Type of event that was triggered. This is the same as the METRIC name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "uuid": {"name": "uuid", "description": "Universally Unique Identifier of the event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "numeric_value": {"name": "numeric_value", "description": "Numeric value associated with the event (ie the dollars associated with a purchase).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "touch_type": {"name": "touch_type", "description": "Type of touch/message that the event itself is already attributed to in Klaviyo. Either 'flow', 'campaign', or null. Note that the package will refer to campaign and flow interactions as \"touches\".\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "occurred_on": {"name": "occurred_on", "description": "Calendar date (UTC) on which the event occurred.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "touch_id": {"name": "touch_id", "description": "Coalescing of the Klaviyo-attributed campaign_id and flow_id.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "touch_session": {"name": "touch_session", "description": "ID used to batch an individual person's events into attribution-groups. Each event that comes attributed to a campaign or flow begins a new session/batch, in which the following events without a flow/campaign_id have the same `touch_session` (and may be attributed to the same flow/campaign).\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "session_start_at": {"name": "session_start_at", "description": "Timestamp of when, relative to the current event, this person last interacted with a campaign or flow according to Klaviyo. This is the beginning of the event's touch-session.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "session_event_type": {"name": "session_event_type", "description": "The type of event through which, relative to the current event, the person last interacted with a campaign or flow. This information is used to determine which lookback window to use (email vs sms).\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_id": {"name": "last_touch_id", "description": "The campaign or flow that the package attributed the event to.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_type": {"name": "last_touch_type", "description": "What kind of touch the event was attributed to by the package -- 'campaign', 'flow', or null.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "UTC Timestamp that indicates the start time of the Fivetran job that synced this event row.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "unique_event_id": {"name": "unique_event_id", "description": "The unique identifier for the combination of event_id and source_relation columns.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_relation": {"name": "source_relation", "description": "The source where this data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioining together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "klaviyo://models/intermediate/int_klaviyo.yml", "compiled_path": "target/compiled/klaviyo/models/intermediate/int_klaviyo__event_attribution.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "incremental", "schema": "int_klaviyo", "unique_key": "unique_event_id", "partition_by": {"field": "occurred_on", "data_type": "date"}, "incremental_strategy": "merge", "file_format": "delta"}, "created_at": 1665702405.21888, "compiled_sql": "\n\nwith events as (\n\n select \n *,\n -- no event will be attributed to both a campaign and flow\n coalesce(campaign_id, flow_id) as touch_id,\n case \n when campaign_id is not null then 'campaign' \n when flow_id is not null then 'flow' \n else null end as touch_type -- defintion: touch = interaction with campaign/flow\n\n from `dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__event`\n\n \n),\n\n-- sessionize events based on attribution eligibility -- is it the right kind of event, and does it have a campaign or flow?\ncreate_sessions as (\n select\n *,\n -- default klaviyo__event_attribution_filter limits attribution-eligible events to to email opens, email clicks, and sms opens\n -- https://help.klaviyo.com/hc/en-us/articles/115005248128\n\n -- events that come with flow/campaign attributions (and are eligible event types) will create new sessions.\n -- non-attributed events that come in afterward will be batched into the same attribution-session\n sum(case when touch_id is not null\n \n and lower(type) in ('opened email', 'clicked email', 'clicked sms')\n \n then 1 else 0 end) over (\n partition by person_id, source_relation order by occurred_at asc rows between unbounded preceding and current row) as touch_session \n\n from events\n\n),\n\n-- \"session start\" refers to the event in a \"touch session\" that is already attributed with a campaign or flow by Klaviyo\n-- a new event that is attributed with a campaign/flow will trigger a new session, so there will only be one already-attributed event per each session \n-- events that are missing attributions will borrow data from the event that triggered the session, if they are in the lookback window (see `attribute` CTE)\nlast_touches as (\n\n select \n *,\n -- when did the touch session begin?\n min(occurred_at) over(partition by person_id, source_relation, touch_session) as session_start_at,\n\n -- get the kind of metric/event that triggered the attribution session, in order to decide \n -- to use the sms or email lookback value. \n first_value(type) over(\n partition by person_id, source_relation, touch_session order by occurred_at asc rows between unbounded preceding and current row) as session_event_type\n\n from create_sessions\n),\n\nattribute as (\n\n select \n *,\n -- klaviyo uses different lookback windows for email and sms events\n -- default email lookback = 5 days (120 hours) -> https://help.klaviyo.com/hc/en-us/articles/115005248128#conversion-tracking1\n -- default sms lookback: 1 day (24 hours -> https://help.klaviyo.com/hc/en-us/articles/115005248128#sms-conversion-tracking7\n\n coalesce(touch_id, -- use pre-attributed flow/campaign if provided\n case \n when datetime_diff(\n cast(occurred_at as datetime),\n cast(session_start_at as datetime),\n hour\n ) <= (\n case \n when lower(session_event_type) like '%sms%' then 24\n else 120 end\n ) -- if the events fall within the lookback window, attribute\n then first_value(touch_id) over (\n partition by person_id, source_relation, touch_session order by occurred_at asc rows between unbounded preceding and current row)\n else null end) as last_touch_id -- session qualified for attribution -> we will call this \"last touch\"\n\n from last_touches \n),\n\nfinal as (\n\n select\n *,\n\n -- get whether the event is attributed to a flow or campaign\n coalesce(touch_type, first_value(touch_type) over(\n partition by person_id, source_relation, touch_session order by occurred_at asc rows between unbounded preceding and current row)) \n\n as session_touch_type -- if the session events qualified for attribution, extract the type of touch they are attributed to\n\n from attribute \n)\n\nselect * from final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_int_klaviyo`.`int_klaviyo__event_attribution`"}, "model.shopify.shopify__customer_cohorts": {"raw_sql": "with calendar as (\n\n select *\n from {{ ref('shopify__calendar') }}\n where cast({{ dbt_utils.date_trunc('month','date_day') }} as date) = date_day\n\n), customers as (\n\n select *\n from {{ ref('shopify__customers') }}\n\n), orders as (\n\n select *\n from {{ ref('shopify__orders') }}\n\n), customer_calendar as (\n\n select\n calendar.date_day as date_month,\n customers.customer_id,\n customers.first_order_timestamp,\n customers.source_relation,\n {{ dbt_utils.date_trunc('month', 'first_order_timestamp') }} as cohort_month\n from calendar\n inner join customers\n on cast({{ dbt_utils.date_trunc('month', 'first_order_timestamp') }} as date) <= calendar.date_day\n\n), orders_joined as (\n\n select \n customer_calendar.date_month, \n customer_calendar.customer_id, \n customer_calendar.first_order_timestamp,\n customer_calendar.cohort_month,\n customer_calendar.source_relation,\n coalesce(count(distinct orders.order_id), 0) as order_count_in_month,\n coalesce(sum(orders.order_adjusted_total), 0) as total_price_in_month,\n coalesce(sum(orders.line_item_count), 0) as line_item_count_in_month\n from customer_calendar\n left join orders\n on customer_calendar.customer_id = orders.customer_id\n and customer_calendar.source_relation = orders.source_relation\n and customer_calendar.date_month = cast({{ dbt_utils.date_trunc('month', 'created_timestamp') }} as date)\n group by 1,2,3,4,5\n\n), windows as (\n\n {% set partition_string = 'partition by customer_id, source_relation order by date_month rows between unbounded preceding and current row' %}\n\n select\n *,\n sum(total_price_in_month) over ({{ partition_string }}) as total_price_lifetime,\n sum(order_count_in_month) over ({{ partition_string }}) as order_count_lifetime,\n sum(line_item_count_in_month) over ({{ partition_string }}) as line_item_count_lifetime,\n row_number() over (partition by customer_id, source_relation order by date_month asc) as cohort_month_number\n from orders_joined\n \n), surrogate_key as (\n\n select \n *, \n {{ dbt_utils.surrogate_key(['date_month','customer_id','source_relation']) }} as customer_cohort_id\n from windows\n\n)\n\nselect *\nfrom surrogate_key", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt_utils.date_trunc", "macro.dbt_utils.surrogate_key"], "nodes": ["model.shopify.shopify__calendar", "model.shopify.shopify__customers", "model.shopify.shopify__orders"]}, "config": {"enabled": true, "alias": null, "schema": "shopify", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_shopify", "fqn": ["shopify", "shopify__customer_cohorts"], "unique_id": "model.shopify.shopify__customer_cohorts", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify", "path": "shopify__customer_cohorts.sql", "original_file_path": "models/shopify__customer_cohorts.sql", "name": "shopify__customer_cohorts", "alias": "shopify__customer_cohorts", "checksum": {"name": "sha256", "checksum": "4179fd82cc1aafd2c0e61ad2e4d8d0a2d4a6daf2afbb91a70bc77cc7311cf1aa"}, "tags": [], "refs": [["shopify__calendar"], ["shopify__customers"], ["shopify__orders"]], "sources": [], "metrics": [], "description": "Each record represents a customer's performance in a calendar month.", "columns": {"cohort_month": {"name": "cohort_month", "description": "The month the cohort belongs to, i.e the first month the customer had an order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "cohort_month_number": {"name": "cohort_month_number", "description": "The 'number' of the `date_month` of the record, i.e. how many months from their start month this cohort occurred", "meta": {}, "data_type": null, "quote": null, "tags": []}, "customer_cohort_id": {"name": "customer_cohort_id", "description": "Unique key representing a customer in a given month.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "customer_id": {"name": "customer_id", "description": "The ID of the related customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "date_month": {"name": "date_month", "description": "The calendar month the customer stats relate to.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_order_timestamp": {"name": "first_order_timestamp", "description": "The timestamp of the customer's first order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "line_item_count_in_month": {"name": "line_item_count_in_month", "description": "Number of line items purchased in the `date_month`", "meta": {}, "data_type": null, "quote": null, "tags": []}, "line_item_count_lifetime": {"name": "line_item_count_lifetime", "description": "Number of line items purchased up until and including this `date_month`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_count_in_month": {"name": "order_count_in_month", "description": "Number of orders purchased in the `date_month`", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_count_lifetime": {"name": "order_count_lifetime", "description": "Number of orders purchased up until and including this `date_month`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_price_in_month": {"name": "total_price_in_month", "description": "Total amount (in currency) purchased in the `date_month`", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_price_lifetime": {"name": "total_price_lifetime", "description": "Total amount (in currency) up until and including this `date_month`.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify://models/shopify.yml", "compiled_path": "target/compiled/shopify/models/shopify__customer_cohorts.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "shopify", "materialized": "table"}, "created_at": 1665702405.236348, "compiled_sql": "with calendar as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_shopify`.`shopify__calendar`\n where cast(timestamp_trunc(\n cast(date_day as timestamp),\n month\n ) as date) = date_day\n\n), customers as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_shopify`.`shopify__customers`\n\n), orders as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_shopify`.`shopify__orders`\n\n), customer_calendar as (\n\n select\n calendar.date_day as date_month,\n customers.customer_id,\n customers.first_order_timestamp,\n customers.source_relation,\n timestamp_trunc(\n cast(first_order_timestamp as timestamp),\n month\n ) as cohort_month\n from calendar\n inner join customers\n on cast(timestamp_trunc(\n cast(first_order_timestamp as timestamp),\n month\n ) as date) <= calendar.date_day\n\n), orders_joined as (\n\n select \n customer_calendar.date_month, \n customer_calendar.customer_id, \n customer_calendar.first_order_timestamp,\n customer_calendar.cohort_month,\n customer_calendar.source_relation,\n coalesce(count(distinct orders.order_id), 0) as order_count_in_month,\n coalesce(sum(orders.order_adjusted_total), 0) as total_price_in_month,\n coalesce(sum(orders.line_item_count), 0) as line_item_count_in_month\n from customer_calendar\n left join orders\n on customer_calendar.customer_id = orders.customer_id\n and customer_calendar.source_relation = orders.source_relation\n and customer_calendar.date_month = cast(timestamp_trunc(\n cast(created_timestamp as timestamp),\n month\n ) as date)\n group by 1,2,3,4,5\n\n), windows as (\n\n \n\n select\n *,\n sum(total_price_in_month) over (partition by customer_id, source_relation order by date_month rows between unbounded preceding and current row) as total_price_lifetime,\n sum(order_count_in_month) over (partition by customer_id, source_relation order by date_month rows between unbounded preceding and current row) as order_count_lifetime,\n sum(line_item_count_in_month) over (partition by customer_id, source_relation order by date_month rows between unbounded preceding and current row) as line_item_count_lifetime,\n row_number() over (partition by customer_id, source_relation order by date_month asc) as cohort_month_number\n from orders_joined\n \n), surrogate_key as (\n\n select \n *, \n to_hex(md5(cast(coalesce(cast(date_month as \n string\n), '') || '-' || coalesce(cast(customer_id as \n string\n), '') || '-' || coalesce(cast(source_relation as \n string\n), '') as \n string\n))) as customer_cohort_id\n from windows\n\n)\n\nselect *\nfrom surrogate_key", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_shopify`.`shopify__customer_cohorts`"}, "model.shopify.shopify__orders": {"raw_sql": "with orders as (\n\n select *\n from {{ var('shopify_order') }}\n\n), order_lines as (\n\n select *\n from {{ ref('shopify__orders__order_line_aggregates') }}\n\n{% if var('shopify__using_order_adjustment', true) %}\n), order_adjustments as (\n\n select *\n from {{ var('shopify_order_adjustment') }}\n\n), order_adjustments_aggregates as (\n select\n order_id,\n source_relation,\n sum(amount) as order_adjustment_amount,\n sum(tax_amount) as order_adjustment_tax_amount\n from order_adjustments\n group by 1,2\n{% endif %}\n\n{% if fivetran_utils.enabled_vars(vars=[\"shopify__using_order_line_refund\", \"shopify__using_refund\"]) %}\n), refunds as (\n\n select *\n from {{ ref('shopify__orders__order_refunds') }}\n\n), refund_aggregates as (\n select\n order_id,\n source_relation,\n sum(subtotal) as refund_subtotal,\n sum(total_tax) as refund_total_tax\n from refunds\n group by 1,2\n{% endif %}\n\n), joined as (\n\n select\n orders.*,\n coalesce(cast({{ fivetran_utils.json_parse(\"total_shipping_price_set\",[\"shop_money\",\"amount\"]) }} as {{ dbt_utils.type_float() }}) ,0) as shipping_cost,\n \n {% if var('shopify__using_order_adjustment', true) %}\n order_adjustments_aggregates.order_adjustment_amount,\n order_adjustments_aggregates.order_adjustment_tax_amount,\n {% endif %}\n\n {% if fivetran_utils.enabled_vars(vars=[\"shopify__using_order_line_refund\", \"shopify__using_refund\"]) %}\n refund_aggregates.refund_subtotal,\n refund_aggregates.refund_total_tax,\n {% endif %}\n (orders.total_price\n {% if var('shopify__using_order_adjustment', true) %}\n + coalesce(order_adjustments_aggregates.order_adjustment_amount,0) + coalesce(order_adjustments_aggregates.order_adjustment_tax_amount,0) \n {% endif %}\n {% if fivetran_utils.enabled_vars(vars=[\"shopify__using_order_line_refund\", \"shopify__using_refund\"]) %}\n - coalesce(refund_aggregates.refund_subtotal,0) - coalesce(refund_aggregates.refund_total_tax,0)\n {% endif %} ) as order_adjusted_total,\n order_lines.line_item_count\n from orders\n left join order_lines\n on orders.order_id = order_lines.order_id\n and orders.source_relation = order_lines.source_relation\n\n {% if fivetran_utils.enabled_vars(vars=[\"shopify__using_order_line_refund\", \"shopify__using_refund\"]) %}\n left join refund_aggregates\n on orders.order_id = refund_aggregates.order_id\n and orders.source_relation = refund_aggregates.source_relation\n {% endif %}\n {% if var('shopify__using_order_adjustment', true) %}\n left join order_adjustments_aggregates\n on orders.order_id = order_adjustments_aggregates.order_id\n and orders.source_relation = order_adjustments_aggregates.source_relation\n {% endif %}\n\n), windows as (\n\n select \n *,\n row_number() over (partition by customer_id, source_relation order by created_timestamp) as customer_order_seq_number\n from joined\n\n), new_vs_repeat as (\n\n select \n *,\n case \n when customer_order_seq_number = 1 then 'new'\n else 'repeat'\n end as new_vs_repeat\n from windows\n\n)\n\nselect *\nfrom new_vs_repeat", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.json_parse", "macro.dbt_utils.type_float"], "nodes": ["model.shopify_source.stg_shopify__order", "model.shopify.shopify__orders__order_line_aggregates", "model.shopify_source.stg_shopify__order_adjustment", "model.shopify.shopify__orders__order_refunds"]}, "config": {"enabled": true, "alias": null, "schema": "shopify", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_shopify", "fqn": ["shopify", "shopify__orders"], "unique_id": "model.shopify.shopify__orders", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify", "path": "shopify__orders.sql", "original_file_path": "models/shopify__orders.sql", "name": "shopify__orders", "alias": "shopify__orders", "checksum": {"name": "sha256", "checksum": "314b165b27050181ab0f5a6e4bcd722c3f6918af348f575dd942f4c6aee4eb0c"}, "tags": [], "refs": [["stg_shopify__order"], ["shopify__orders__order_line_aggregates"], ["stg_shopify__order_adjustment"], ["shopify__orders__order_refunds"]], "sources": [], "metrics": [], "description": "Each record represents an order in Shopify.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "app_id": {"name": "app_id", "description": "The ID of the app that created the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_address_1": {"name": "billing_address_address_1", "description": "The street address of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_address_2": {"name": "billing_address_address_2", "description": "An optional additional field for the street address of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_city": {"name": "billing_address_city", "description": "The city, town, or village of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_company": {"name": "billing_address_company", "description": "The company of the person associated with the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_country": {"name": "billing_address_country", "description": "The name of the country of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_country_code": {"name": "billing_address_country_code", "description": "The two-letter code (ISO 3166-1 format) for the country of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_first_name": {"name": "billing_address_first_name", "description": "The first name of the person associated with the payment method.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_last_name": {"name": "billing_address_last_name", "description": "The last name of the person associated with the payment method.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_latitude": {"name": "billing_address_latitude", "description": "The latitude of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_longitude": {"name": "billing_address_longitude", "description": "The longitude of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_name": {"name": "billing_address_name", "description": "The full name of the person associated with the payment method.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_phone": {"name": "billing_address_phone", "description": "The phone number at the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_province": {"name": "billing_address_province", "description": "The name of the region (province, state, prefecture, \u2026) of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_province_code": {"name": "billing_address_province_code", "description": "The two-letter abbreviation of the region of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_zip": {"name": "billing_address_zip", "description": "The postal code (zip, postcode, Eircode, \u2026) of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "browser_ip": {"name": "browser_ip", "description": "The IP address of the browser used by the customer when they placed the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "has_buyer_accepted_marketing": {"name": "has_buyer_accepted_marketing", "description": "Whether the customer consented to receive email updates from the shop.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "cancel_reason": {"name": "cancel_reason", "description": "The reason why the order was canceled.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "cancelled_timestamp": {"name": "cancelled_timestamp", "description": "The date and time when the order was canceled.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "cart_token": {"name": "cart_token", "description": "The ID of the cart that's associated with the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "closed_timestamp": {"name": "closed_timestamp", "description": "The date and time when the order was closed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_timestamp": {"name": "created_timestamp", "description": "The autogenerated date and time when the order was created in Shopify.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "The three-letter code for the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "customer_id": {"name": "customer_id", "description": "The ID of the order's customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email": {"name": "email", "description": "The customer's email address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "financial_status": {"name": "financial_status", "description": "The status of payments associated with the order. Can only be set when the order is created", "meta": {}, "data_type": null, "quote": null, "tags": []}, "fulfillment_status": {"name": "fulfillment_status", "description": "The order's status in terms of fulfilled line items.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_id": {"name": "order_id", "description": "The ID of the order, used for API purposes. This is different from the order_number property, which is the ID used by the shop owner and customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "landing_site_base_url": {"name": "landing_site_base_url", "description": "The URL for the page where the buyer landed when they entered the shop.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "location_id": {"name": "location_id", "description": "The ID of the physical location where the order was processed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "name": {"name": "name", "description": "The order name, generated by combining the order_number property with the order prefix and suffix that are set in the merchant's general settings.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "note": {"name": "note", "description": "An optional note that a shop owner can attach to the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "number": {"name": "number", "description": "The order's position in the shop's count of orders. Numbers are sequential and start at 1.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_number": {"name": "order_number", "description": "The order 's position in the shop's count of orders starting at 1001. Order numbers are sequential and start at 1001.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "processed_timestamp": {"name": "processed_timestamp", "description": "The date and time when an order was processed. This value is the date that appears on your orders and that's used in the analytic reports.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "processing_method": {"name": "processing_method", "description": "How the payment was processed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "referring_site": {"name": "referring_site", "description": "The website where the customer clicked a link to the shop.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_address_1": {"name": "shipping_address_address_1", "description": "The street address of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_address_2": {"name": "shipping_address_address_2", "description": "An optional additional field for the street address of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_city": {"name": "shipping_address_city", "description": "The city, town, or village of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_company": {"name": "shipping_address_company", "description": "The company of the person associated with the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_country": {"name": "shipping_address_country", "description": "The name of the country of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_country_code": {"name": "shipping_address_country_code", "description": "The two-letter code (ISO 3166-1 format) for the country of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_first_name": {"name": "shipping_address_first_name", "description": "The first name of the person associated with the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_last_name": {"name": "shipping_address_last_name", "description": "The last name of the person associated with the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_latitude": {"name": "shipping_address_latitude", "description": "The latitude of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_longitude": {"name": "shipping_address_longitude", "description": "The longitude of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_name": {"name": "shipping_address_name", "description": "The full name of the person associated with the payment method.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_phone": {"name": "shipping_address_phone", "description": "The phone number at the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_province": {"name": "shipping_address_province", "description": "The name of the region (province, state, prefecture, \u2026) of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_province_code": {"name": "shipping_address_province_code", "description": "The two-letter abbreviation of the region of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_zip": {"name": "shipping_address_zip", "description": "The postal code (zip, postcode, Eircode, \u2026) of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_name": {"name": "source_name", "description": "Where the order originated. Can be set only during order creation, and is not writeable afterwards.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "subtotal_price": {"name": "subtotal_price", "description": "The price of the order in the shop currency after discounts but before shipping, taxes, and tips.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "has_taxes_included": {"name": "has_taxes_included", "description": "Whether taxes are included in the order subtotal.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_test_order": {"name": "is_test_order", "description": "Whether this is a test order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "token": {"name": "token", "description": "A unique token for the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_discounts": {"name": "total_discounts", "description": "The total discounts applied to the price of the order in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_line_items_price": {"name": "total_line_items_price", "description": "The sum of all line item prices in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_price": {"name": "total_price", "description": "The sum of all line item prices, discounts, shipping, taxes, and tips in the shop currency. Must be positive.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_tax": {"name": "total_tax", "description": "The sum of all the taxes applied to the order in th shop currency. Must be positive).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_weight": {"name": "total_weight", "description": "The sum of all line item weights in grams.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_timestamp": {"name": "updated_timestamp", "description": "The date and time (ISO 8601 format) when the order was last modified.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "user_id": {"name": "user_id", "description": "The ID of the user logged into Shopify POS who processed the order, if applicable.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "line_item_count": {"name": "line_item_count", "description": "Number of line items included in the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "customer_order_seq_number": {"name": "customer_order_seq_number", "description": "The sequential number of the order as it relates to the customer", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_vs_repeat": {"name": "new_vs_repeat", "description": "Whether the order was a new or repeat order for the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_cost": {"name": "shipping_cost", "description": "The shipping cost of the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_adjustment_amount": {"name": "order_adjustment_amount", "description": "Total adjustment amount applied to the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_adjustment_tax_amount": {"name": "order_adjustment_tax_amount", "description": "Total tax applied to the adjustment on the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refund_subtotal": {"name": "refund_subtotal", "description": "Total refund amount applied to the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refund_total_tax": {"name": "refund_total_tax", "description": "Total tax applied to the refund on the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_adjusted_total": {"name": "order_adjusted_total", "description": "Order total adjusted for refunds and other adjustments. The calculation used for this field is as follows: total price listed on the original order (including shipping costs and discounts) + adjustments + adjustments tax - total refunds - refunds tax The order_adjusted_total will equate to the total sales - refunds listed within the transactions table for the order (after currency exchange).\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "index": {"name": "index", "description": "Field representing the index of the order line in relation to the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "pre_tax_price": {"name": "pre_tax_price", "description": "The pre tax price of the order line.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "checkout_token": {"name": "checkout_token", "description": "The checkout token applied to the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_shipping_price_set": {"name": "total_shipping_price_set", "description": "The total shipping price set to the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify://models/shopify.yml", "compiled_path": "target/compiled/shopify/models/shopify__orders.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "shopify", "materialized": "table"}, "created_at": 1665702405.246819, "compiled_sql": "with __dbt__cte__shopify__orders__order_line_aggregates as (\nwith order_line as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__order_line`\n\n), aggregated as (\n\n select \n order_id,\n source_relation,\n count(*) as line_item_count\n from order_line\n group by 1,2\n\n)\n\nselect *\nfrom aggregated\n), __dbt__cte__shopify__orders__order_refunds as (\n\n\nwith refunds as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__refund`\n\n), order_line_refunds as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__order_line_refund`\n \n), refund_join as (\n\n select \n refunds.refund_id,\n refunds.created_at,\n refunds.order_id,\n refunds.user_id,\n refunds.source_relation,\n order_line_refunds.order_line_refund_id,\n order_line_refunds.order_line_id,\n order_line_refunds.restock_type,\n order_line_refunds.quantity,\n order_line_refunds.subtotal,\n order_line_refunds.total_tax\n from refunds\n left join order_line_refunds\n on refunds.refund_id = order_line_refunds.refund_id\n and refunds.source_relation = order_line_refunds.source_relation\n\n)\n\nselect *\nfrom refund_join\n),orders as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__order`\n\n), order_lines as (\n\n select *\n from __dbt__cte__shopify__orders__order_line_aggregates\n\n\n), order_adjustments as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__order_adjustment`\n\n), order_adjustments_aggregates as (\n select\n order_id,\n source_relation,\n sum(amount) as order_adjustment_amount,\n sum(tax_amount) as order_adjustment_tax_amount\n from order_adjustments\n group by 1,2\n\n\n\n), refunds as (\n\n select *\n from __dbt__cte__shopify__orders__order_refunds\n\n), refund_aggregates as (\n select\n order_id,\n source_relation,\n sum(subtotal) as refund_subtotal,\n sum(total_tax) as refund_total_tax\n from refunds\n group by 1,2\n\n\n), joined as (\n\n select\n orders.*,\n coalesce(cast(\n\n \n json_extract_scalar(total_shipping_price_set, '$.shop_money.amount')\n\n as \n float64\n) ,0) as shipping_cost,\n \n \n order_adjustments_aggregates.order_adjustment_amount,\n order_adjustments_aggregates.order_adjustment_tax_amount,\n \n\n \n refund_aggregates.refund_subtotal,\n refund_aggregates.refund_total_tax,\n \n (orders.total_price\n \n + coalesce(order_adjustments_aggregates.order_adjustment_amount,0) + coalesce(order_adjustments_aggregates.order_adjustment_tax_amount,0) \n \n \n - coalesce(refund_aggregates.refund_subtotal,0) - coalesce(refund_aggregates.refund_total_tax,0)\n ) as order_adjusted_total,\n order_lines.line_item_count\n from orders\n left join order_lines\n on orders.order_id = order_lines.order_id\n and orders.source_relation = order_lines.source_relation\n\n \n left join refund_aggregates\n on orders.order_id = refund_aggregates.order_id\n and orders.source_relation = refund_aggregates.source_relation\n \n \n left join order_adjustments_aggregates\n on orders.order_id = order_adjustments_aggregates.order_id\n and orders.source_relation = order_adjustments_aggregates.source_relation\n \n\n), windows as (\n\n select \n *,\n row_number() over (partition by customer_id, source_relation order by created_timestamp) as customer_order_seq_number\n from joined\n\n), new_vs_repeat as (\n\n select \n *,\n case \n when customer_order_seq_number = 1 then 'new'\n else 'repeat'\n end as new_vs_repeat\n from windows\n\n)\n\nselect *\nfrom new_vs_repeat", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.shopify.shopify__orders__order_line_aggregates", "sql": " __dbt__cte__shopify__orders__order_line_aggregates as (\nwith order_line as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__order_line`\n\n), aggregated as (\n\n select \n order_id,\n source_relation,\n count(*) as line_item_count\n from order_line\n group by 1,2\n\n)\n\nselect *\nfrom aggregated\n)"}, {"id": "model.shopify.shopify__orders__order_refunds", "sql": " __dbt__cte__shopify__orders__order_refunds as (\n\n\nwith refunds as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__refund`\n\n), order_line_refunds as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__order_line_refund`\n \n), refund_join as (\n\n select \n refunds.refund_id,\n refunds.created_at,\n refunds.order_id,\n refunds.user_id,\n refunds.source_relation,\n order_line_refunds.order_line_refund_id,\n order_line_refunds.order_line_id,\n order_line_refunds.restock_type,\n order_line_refunds.quantity,\n order_line_refunds.subtotal,\n order_line_refunds.total_tax\n from refunds\n left join order_line_refunds\n on refunds.refund_id = order_line_refunds.refund_id\n and refunds.source_relation = order_line_refunds.source_relation\n\n)\n\nselect *\nfrom refund_join\n)"}], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_shopify`.`shopify__orders`"}, "model.shopify.shopify__products": {"raw_sql": "with products as (\n\n select *\n from {{ var('shopify_product') }}\n\n), order_lines as (\n\n select *\n from {{ ref('shopify__order_lines') }}\n\n), orders as (\n\n select *\n from {{ ref('shopify__orders')}}\n\n), order_lines_aggregated as (\n\n select \n order_lines.product_id, \n order_lines.source_relation,\n sum(order_lines.quantity) as quantity_sold,\n sum(order_lines.pre_tax_price) as subtotal_sold,\n\n {% if fivetran_utils.enabled_vars(vars=[\"shopify__using_order_line_refund\", \"shopify__using_refund\"]) %}\n sum(order_lines.quantity_net_refunds) as quantity_sold_net_refunds,\n sum(order_lines.subtotal_net_refunds) as subtotal_sold_net_refunds,\n {% endif %}\n\n min(orders.created_timestamp) as first_order_timestamp,\n max(orders.created_timestamp) as most_recent_order_timestamp\n from order_lines\n left join orders\n using (order_id, source_relation)\n group by 1,2\n\n), joined as (\n\n select\n products.*,\n coalesce(order_lines_aggregated.quantity_sold,0) as quantity_sold,\n coalesce(order_lines_aggregated.subtotal_sold,0) as subtotal_sold,\n\n {% if fivetran_utils.enabled_vars(vars=[\"shopify__using_order_line_refund\", \"shopify__using_refund\"]) %}\n coalesce(order_lines_aggregated.quantity_sold_net_refunds,0) as quantity_sold_net_refunds,\n coalesce(order_lines_aggregated.subtotal_sold_net_refunds,0) as subtotal_sold_net_refunds,\n {% endif %}\n \n order_lines_aggregated.first_order_timestamp,\n order_lines_aggregated.most_recent_order_timestamp\n from products\n left join order_lines_aggregated\n using (product_id, source_relation)\n\n)\n\nselect *\nfrom joined", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars"], "nodes": ["model.shopify_source.stg_shopify__product", "model.shopify.shopify__order_lines", "model.shopify.shopify__orders"]}, "config": {"enabled": true, "alias": null, "schema": "shopify", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_shopify", "fqn": ["shopify", "shopify__products"], "unique_id": "model.shopify.shopify__products", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify", "path": "shopify__products.sql", "original_file_path": "models/shopify__products.sql", "name": "shopify__products", "alias": "shopify__products", "checksum": {"name": "sha256", "checksum": "e699f3d418cc215e557b5a7ad0705f82470c62c8b54b3fbb29a2896c507ba033"}, "tags": [], "refs": [["stg_shopify__product"], ["shopify__order_lines"], ["shopify__orders"]], "sources": [], "metrics": [], "description": "Each record represents a product in Shopify.", "columns": {"_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Whether the record has been deleted in the source system.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_timestamp": {"name": "created_timestamp", "description": "The date and time when the product was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "handle": {"name": "handle", "description": "A unique human-friendly string for the product. Automatically generated from the product's title.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "product_id": {"name": "product_id", "description": "An unsigned 64-bit integer that's used as a unique identifier for the product. Each id is unique across the Shopify system. No two products will have the same id, even if they're from different shops.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "product_type": {"name": "product_type", "description": "A categorization for the product used for filtering and searching products.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "published_timestamp": {"name": "published_timestamp", "description": "The date and time (ISO 8601 format) when the product was published. Can be set to null to unpublish the product from the Online Store channel.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "published_scope": {"name": "published_scope", "description": "Whether the product is published to the Point of Sale channel.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "title": {"name": "title", "description": "The name of the product.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_timestamp": {"name": "updated_timestamp", "description": "The date and time when the product was last modified.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "vendor": {"name": "vendor", "description": "The name of the product's vendor.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "quantity_sold": {"name": "quantity_sold", "description": "Quantity of the product sold.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "subtotal_sold": {"name": "subtotal_sold", "description": "Total amount of the product sold.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "quantity_sold_net_refunds": {"name": "quantity_sold_net_refunds", "description": "Quantity of the product sold, excluding refunds.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "subtotal_sold_net_refunds": {"name": "subtotal_sold_net_refunds", "description": "Total amount of the product sold, excluding refunds.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_order_timestamp": {"name": "first_order_timestamp", "description": "The timestamp the product was first ordered.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "most_recent_order_timestamp": {"name": "most_recent_order_timestamp", "description": "The timestamp the product was most recently ordered.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify://models/shopify.yml", "compiled_path": "target/compiled/shopify/models/shopify__products.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "shopify", "materialized": "table"}, "created_at": 1665702405.251936, "compiled_sql": "with products as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__product`\n\n), order_lines as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_shopify`.`shopify__order_lines`\n\n), orders as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_shopify`.`shopify__orders`\n\n), order_lines_aggregated as (\n\n select \n order_lines.product_id, \n order_lines.source_relation,\n sum(order_lines.quantity) as quantity_sold,\n sum(order_lines.pre_tax_price) as subtotal_sold,\n\n \n sum(order_lines.quantity_net_refunds) as quantity_sold_net_refunds,\n sum(order_lines.subtotal_net_refunds) as subtotal_sold_net_refunds,\n \n\n min(orders.created_timestamp) as first_order_timestamp,\n max(orders.created_timestamp) as most_recent_order_timestamp\n from order_lines\n left join orders\n using (order_id, source_relation)\n group by 1,2\n\n), joined as (\n\n select\n products.*,\n coalesce(order_lines_aggregated.quantity_sold,0) as quantity_sold,\n coalesce(order_lines_aggregated.subtotal_sold,0) as subtotal_sold,\n\n \n coalesce(order_lines_aggregated.quantity_sold_net_refunds,0) as quantity_sold_net_refunds,\n coalesce(order_lines_aggregated.subtotal_sold_net_refunds,0) as subtotal_sold_net_refunds,\n \n \n order_lines_aggregated.first_order_timestamp,\n order_lines_aggregated.most_recent_order_timestamp\n from products\n left join order_lines_aggregated\n using (product_id, source_relation)\n\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_shopify`.`shopify__products`"}, "model.shopify.shopify__transactions": {"raw_sql": "with transactions as (\n select *\n from {{ var('shopify_transaction') }}\n\n), exchange_rate as (\n\n select\n *,\n coalesce(cast(nullif({{ fivetran_utils.json_parse(\"receipt\",[\"charges\",\"data\",0,\"balance_transaction\",\"exchange_rate\"]) }}, '') as {{ dbt_utils.type_numeric() }} ),1) as exchange_rate,\n coalesce(cast(nullif({{ fivetran_utils.json_parse(\"receipt\",[\"charges\",\"data\",0,\"balance_transaction\",\"exchange_rate\"]) }}, '') as {{ dbt_utils.type_numeric() }} ),1) * amount as currency_exchange_calculated_amount\n from transactions\n\n)\n\nselect *\nfrom exchange_rate", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.json_parse", "macro.dbt_utils.type_numeric"], "nodes": ["model.shopify_source.stg_shopify__transaction"]}, "config": {"enabled": true, "alias": null, "schema": "shopify", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_shopify", "fqn": ["shopify", "shopify__transactions"], "unique_id": "model.shopify.shopify__transactions", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify", "path": "shopify__transactions.sql", "original_file_path": "models/shopify__transactions.sql", "name": "shopify__transactions", "alias": "shopify__transactions", "checksum": {"name": "sha256", "checksum": "88e4a9aa6d2acc8dbe0e1d3f280087b5adb6a730391785680d0bf112b0923906"}, "tags": [], "refs": [["stg_shopify__transaction"]], "sources": [], "metrics": [], "description": "Each record represents a transaction in Shopify.", "columns": {"transaction_id": {"name": "transaction_id", "description": "The ID for the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_id": {"name": "order_id", "description": "The ID for the order that the transaction is associated with.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refund_id": {"name": "refund_id", "description": "The ID associated with a refund in the refund table.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "amount": {"name": "amount", "description": "The amount of money included in the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "authorization": {"name": "authorization", "description": "The authorization code associated with the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_timestamp": {"name": "created_timestamp", "description": "The date and time when the transaction was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "processed_timestamp": {"name": "processed_timestamp", "description": "The date and time when a transaction was processed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "device_id": {"name": "device_id", "description": "The ID for the device.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "gateway": {"name": "gateway", "description": "The name of the gateway the transaction was issued through.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_name": {"name": "source_name", "description": "The origin of the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "message": {"name": "message", "description": "A string generated by the payment provider with additional information about why the transaction succeeded or failed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "The three-letter code (ISO 4217 format) for the currency used for the payment.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "location_id": {"name": "location_id", "description": "The ID of the physical location where the transaction was processed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "parent_id": {"name": "parent_id", "description": "The ID of an associated transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payment_avs_result_code": {"name": "payment_avs_result_code", "description": "The response code from the address verification system.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payment_credit_card_bin": {"name": "payment_credit_card_bin", "description": "The issuer identification number (IIN), formerly known as bank identification number (BIN) of the customer's credit card.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payment_cvv_result_code": {"name": "payment_cvv_result_code", "description": "The response code from the credit card company indicating whether the customer entered the card security code, or card verification value, correctly.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payment_credit_card_number": {"name": "payment_credit_card_number", "description": "The customer's credit card number, with most of the leading digits redacted.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payment_credit_card_company": {"name": "payment_credit_card_company", "description": "The name of the company that issued the customer's credit card.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "kind": {"name": "kind", "description": "The transaction's type.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "receipt": {"name": "receipt", "description": "A transaction receipt attached to the transaction by the gateway.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency_exchange_id": {"name": "currency_exchange_id", "description": "The ID of the adjustment.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency_exchange_adjustment": {"name": "currency_exchange_adjustment", "description": "The difference between the amounts on the associated transaction and the parent transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency_exchange_original_amount": {"name": "currency_exchange_original_amount", "description": "The amount of the parent transaction in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency_exchange_final_amount": {"name": "currency_exchange_final_amount", "description": "The amount of the associated transaction in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency_exchange_currency": {"name": "currency_exchange_currency", "description": "The shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "error_code": {"name": "error_code", "description": "A standardized error code, independent of the payment provider.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status": {"name": "status", "description": "The status of the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "test": {"name": "test", "description": "Whether the transaction is a test transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "user_id": {"name": "user_id", "description": "The ID for the user who was logged into the Shopify POS device when the order was processed, if applicable.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of the date the record was synced by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "exchange_rate": {"name": "exchange_rate", "description": "The exchange rate between the home currency and the currency of sale at the time of the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency_exchange_calculated_amount": {"name": "currency_exchange_calculated_amount", "description": "The total amount of the transaction with the currency exchange rate applied.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify://models/shopify.yml", "compiled_path": "target/compiled/shopify/models/shopify__transactions.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "shopify", "materialized": "table"}, "created_at": 1665702405.2622888, "compiled_sql": "with transactions as (\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__transaction`\n\n), exchange_rate as (\n\n select\n *,\n coalesce(cast(nullif(\n\n \n json_extract_scalar(receipt, '$.charges.data.0.balance_transaction.exchange_rate')\n\n, '') as \n numeric\n ),1) as exchange_rate,\n coalesce(cast(nullif(\n\n \n json_extract_scalar(receipt, '$.charges.data.0.balance_transaction.exchange_rate')\n\n, '') as \n numeric\n ),1) * amount as currency_exchange_calculated_amount\n from transactions\n\n)\n\nselect *\nfrom exchange_rate", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_shopify`.`shopify__transactions`"}, "model.shopify.shopify__customers": {"raw_sql": "with customers as (\n\n select \n {{ dbt_utils.star(from=ref('stg_shopify__customer'), except=[\"orders_count\", \"total_spent\"]) }}\n from {{ var('shopify_customer') }}\n\n), orders as (\n\n select *\n from {{ ref('shopify__customers__order_aggregates' )}}\n\n), joined as (\n\n select \n customers.*,\n orders.first_order_timestamp,\n orders.most_recent_order_timestamp,\n coalesce(orders.average_order_value, 0) as average_order_value,\n coalesce(orders.lifetime_total_spent, 0) as lifetime_total_spent,\n coalesce(orders.lifetime_total_refunded, 0) as lifetime_total_refunded,\n (coalesce(orders.lifetime_total_spent, 0) - coalesce(orders.lifetime_total_refunded, 0)) as lifetime_total_amount,\n coalesce(orders.lifetime_count_orders, 0) as lifetime_count_orders\n from customers\n left join orders\n using (customer_id, source_relation)\n\n)\n\nselect *\nfrom joined", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": ["model.shopify_source.stg_shopify__customer", "model.shopify_source.stg_shopify__customer", "model.shopify.shopify__customers__order_aggregates"]}, "config": {"enabled": true, "alias": null, "schema": "shopify", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_shopify", "fqn": ["shopify", "shopify__customers"], "unique_id": "model.shopify.shopify__customers", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify", "path": "shopify__customers.sql", "original_file_path": "models/shopify__customers.sql", "name": "shopify__customers", "alias": "shopify__customers", "checksum": {"name": "sha256", "checksum": "70e28dce05bc26f7fc7678928e4bf4ab455d399c6f314f54d3c4671be96d3b7e"}, "tags": [], "refs": [["stg_shopify__customer"], ["stg_shopify__customer"], ["shopify__customers__order_aggregates"]], "sources": [], "metrics": [], "description": "Each record represents a customer in Shopify.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "has_accepted_marketing": {"name": "has_accepted_marketing", "description": "Whether the customer has consented to receive marketing material via email.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_timestamp": {"name": "created_timestamp", "description": "The date and time when the customer was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "default_address_id": {"name": "default_address_id", "description": "The default address for the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email": {"name": "email", "description": "The unique email address of the customer. Attempting to assign the same email address to multiple customers returns an error.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_name": {"name": "first_name", "description": "The customer's first name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "customer_id": {"name": "customer_id", "description": "A unique identifier for the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_name": {"name": "last_name", "description": "The customer's last name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "lifetime_count_orders": {"name": "lifetime_count_orders", "description": "The number of orders associated with this customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "phone": {"name": "phone", "description": "The unique phone number (E.164 format) for this customer. Attempting to assign the same phone number to multiple customers returns an error.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "account_state": {"name": "account_state", "description": "The state of the customer's account with a shop.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_tax_exempt": {"name": "is_tax_exempt", "description": "Whether the customer is exempt from paying taxes on their order. If true, then taxes won't be applied to an order at checkout. If false, then taxes will be applied at checkout.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_timestamp": {"name": "updated_timestamp", "description": "The date and time when the customer information was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_verified_email": {"name": "is_verified_email", "description": "Whether the customer has verified their email address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_order_timestamp": {"name": "first_order_timestamp", "description": "The timestamp the customer completed their first order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "most_recent_order_timestamp": {"name": "most_recent_order_timestamp", "description": "The timestamp the customer completed their most recent order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "average_order_value": {"name": "average_order_value", "description": "The average order value for the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "lifetime_total_spent": {"name": "lifetime_total_spent", "description": "The total amount of money that the customer has spent on orders across their order history.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "lifetime_total_refunded": {"name": "lifetime_total_refunded", "description": "The total amount of money that the customer has been refunded on orders across their order history.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "lifetime_total_amount": {"name": "lifetime_total_amount", "description": "The total amount of money (minus refunds) that the customer has spent across their order history.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify://models/shopify.yml", "compiled_path": "target/compiled/shopify/models/shopify__customers.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "shopify", "materialized": "table"}, "created_at": 1665702405.249553, "compiled_sql": "with __dbt__cte__shopify__customers__order_aggregates as (\nwith orders as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__order`\n\n), transactions as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_shopify`.`shopify__transactions`\n where lower(status) = 'success'\n\n), aggregated as (\n\n select\n orders.customer_id,\n orders.source_relation,\n min(orders.created_timestamp) as first_order_timestamp,\n max(orders.created_timestamp) as most_recent_order_timestamp,\n avg(case when lower(transactions.kind) in ('sale','capture') then transactions.currency_exchange_calculated_amount end) as average_order_value,\n sum(case when lower(transactions.kind) in ('sale','capture') then transactions.currency_exchange_calculated_amount end) as lifetime_total_spent,\n sum(case when lower(transactions.kind) in ('refund') then transactions.currency_exchange_calculated_amount end) as lifetime_total_refunded,\n count(distinct orders.order_id) as lifetime_count_orders\n from orders\n left join transactions\n using (order_id, source_relation)\n where customer_id is not null\n group by 1,2\n\n)\n\nselect *\nfrom aggregated\n),customers as (\n\n select \n *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__customer`\n\n), orders as (\n\n select *\n from __dbt__cte__shopify__customers__order_aggregates\n\n), joined as (\n\n select \n customers.*,\n orders.first_order_timestamp,\n orders.most_recent_order_timestamp,\n coalesce(orders.average_order_value, 0) as average_order_value,\n coalesce(orders.lifetime_total_spent, 0) as lifetime_total_spent,\n coalesce(orders.lifetime_total_refunded, 0) as lifetime_total_refunded,\n (coalesce(orders.lifetime_total_spent, 0) - coalesce(orders.lifetime_total_refunded, 0)) as lifetime_total_amount,\n coalesce(orders.lifetime_count_orders, 0) as lifetime_count_orders\n from customers\n left join orders\n using (customer_id, source_relation)\n\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.shopify.shopify__customers__order_aggregates", "sql": " __dbt__cte__shopify__customers__order_aggregates as (\nwith orders as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__order`\n\n), transactions as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_shopify`.`shopify__transactions`\n where lower(status) = 'success'\n\n), aggregated as (\n\n select\n orders.customer_id,\n orders.source_relation,\n min(orders.created_timestamp) as first_order_timestamp,\n max(orders.created_timestamp) as most_recent_order_timestamp,\n avg(case when lower(transactions.kind) in ('sale','capture') then transactions.currency_exchange_calculated_amount end) as average_order_value,\n sum(case when lower(transactions.kind) in ('sale','capture') then transactions.currency_exchange_calculated_amount end) as lifetime_total_spent,\n sum(case when lower(transactions.kind) in ('refund') then transactions.currency_exchange_calculated_amount end) as lifetime_total_refunded,\n count(distinct orders.order_id) as lifetime_count_orders\n from orders\n left join transactions\n using (order_id, source_relation)\n where customer_id is not null\n group by 1,2\n\n)\n\nselect *\nfrom aggregated\n)"}], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_shopify`.`shopify__customers`"}, "model.shopify.shopify__order_lines": {"raw_sql": "with order_lines as (\n\n select *\n from {{ var('shopify_order_line') }}\n\n), product_variants as (\n\n select *\n from {{ var('shopify_product_variant') }}\n\n{% if fivetran_utils.enabled_vars(vars=[\"shopify__using_order_line_refund\", \"shopify__using_refund\"]) %}\n), refunds as (\n\n select *\n from {{ ref('shopify__orders__order_refunds') }}\n\n), refunds_aggregated as (\n \n select\n order_line_id,\n source_relation,\n sum(quantity) as quantity,\n sum(coalesce(subtotal, 0)) as subtotal\n from refunds\n group by 1,2\n{% endif %}\n\n), joined as (\n\n select\n order_lines.*,\n\n {% if fivetran_utils.enabled_vars(vars=[\"shopify__using_order_line_refund\", \"shopify__using_refund\"]) %}\n coalesce(refunds_aggregated.quantity,0) as refunded_quantity,\n coalesce(refunds_aggregated.subtotal,0) as refunded_subtotal,\n order_lines.quantity - coalesce(refunds_aggregated.quantity,0) as quantity_net_refunds,\n order_lines.pre_tax_price - coalesce(refunds_aggregated.subtotal,0) as subtotal_net_refunds,\n {% endif %}\n \n product_variants.created_timestamp as variant_created_at,\n product_variants.updated_timestamp as variant_updated_at,\n product_variants.inventory_item_id,\n product_variants.image_id,\n product_variants.title as variant_title,\n product_variants.price as variant_price,\n product_variants.sku as variant_sku,\n product_variants.position as variant_position,\n product_variants.inventory_policy as variant_inventory_policy,\n product_variants.compare_at_price as variant_compare_at_price,\n product_variants.fulfillment_service as variant_fulfillment_service,\n product_variants.inventory_management as variant_inventory_management,\n product_variants.is_taxable as variant_is_taxable,\n product_variants.barcode as variant_barcode,\n product_variants.grams as variant_grams,\n product_variants.inventory_quantity as variant_inventory_quantity,\n product_variants.weight as variant_weight,\n product_variants.weight_unit as variant_weight_unit,\n product_variants.option_1 as variant_option_1,\n product_variants.option_2 as variant_option_2,\n product_variants.option_3 as variant_option_3,\n product_variants.tax_code as variant_tax_code,\n product_variants.is_requiring_shipping as variant_is_requiring_shipping\n from order_lines\n {% if fivetran_utils.enabled_vars(vars=[\"shopify__using_order_line_refund\", \"shopify__using_refund\"]) %}\n left join refunds_aggregated\n on refunds_aggregated.order_line_id = order_lines.order_line_id\n and refunds_aggregated.source_relation = order_lines.source_relation\n {% endif %}\n left join product_variants\n on product_variants.variant_id = order_lines.variant_id\n and product_variants.source_relation = order_lines.source_relation\n\n)\n\nselect *\nfrom joined", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars"], "nodes": ["model.shopify_source.stg_shopify__order_line", "model.shopify_source.stg_shopify__product_variant", "model.shopify.shopify__orders__order_refunds"]}, "config": {"enabled": true, "alias": null, "schema": "shopify", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_shopify", "fqn": ["shopify", "shopify__order_lines"], "unique_id": "model.shopify.shopify__order_lines", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify", "path": "shopify__order_lines.sql", "original_file_path": "models/shopify__order_lines.sql", "name": "shopify__order_lines", "alias": "shopify__order_lines", "checksum": {"name": "sha256", "checksum": "c9fa8308e1257375b69ec4b40135a4d1ad64fab1d9e0c14b7a353132438df5d8"}, "tags": [], "refs": [["stg_shopify__order_line"], ["stg_shopify__product_variant"], ["shopify__orders__order_refunds"]], "sources": [], "metrics": [], "description": "Each record represents a line item of an order in Shopify.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "fulfillable_quantity": {"name": "fulfillable_quantity", "description": "The amount available to fulfill, calculated as follows: quantity - max(refunded_quantity, fulfilled_quantity) - pending_fulfilled_quantity - open_fulfilled_quantity", "meta": {}, "data_type": null, "quote": null, "tags": []}, "fulfillment_service": {"name": "fulfillment_service", "description": "The service provider that's fulfilling the item.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "fulfillment_status": {"name": "fulfillment_status", "description": "How far along an order is in terms line items fulfilled.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_gift_card": {"name": "is_gift_card", "description": "Whether the item is a gift card. If true, then the item is not taxed or considered for shipping charges.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "grams": {"name": "grams", "description": "The weight of the item in grams.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_line_id": {"name": "order_line_id", "description": "The ID of the line item.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "name": {"name": "name", "description": "The name of the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_id": {"name": "order_id", "description": "The ID of the related order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "price": {"name": "price", "description": "The price of the item before discounts have been applied in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "product_id": {"name": "product_id", "description": "The ID of the product that the line item belongs to. Can be null if the original product associated with the order is deleted at a later date.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "quantity": {"name": "quantity", "description": "The number of items that were purchased.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_requiring_shipping": {"name": "is_requiring_shipping", "description": "Whether the item requires shipping.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "sku": {"name": "sku", "description": "The item's SKU (stock keeping unit).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_taxable": {"name": "is_taxable", "description": "Whether the item was taxable.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "title": {"name": "title", "description": "The title of the product.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_discount": {"name": "total_discount", "description": "The total amount of the discount allocated to the line item in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_id": {"name": "variant_id", "description": "The ID of the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "vendor": {"name": "vendor", "description": "The name of the item's supplier.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refunded_quantity": {"name": "refunded_quantity", "description": "Quantity of the item that has been refunded.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "quantity_net_refunds": {"name": "quantity_net_refunds", "description": "Quantity ordered, excluding refunds.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_barcode": {"name": "variant_barcode", "description": "The barcode, UPC, or ISBN number for the product.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_compare_at_price": {"name": "variant_compare_at_price", "description": "The original price of the item before an adjustment or a sale.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_created_at": {"name": "variant_created_at", "description": "The date and time (ISO 8601 format) when the product variant was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_fulfillment_service": {"name": "variant_fulfillment_service", "description": "The fulfillment service associated with the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_grams": {"name": "variant_grams", "description": "The weight of the product variant in grams.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_image_id": {"name": "variant_image_id", "description": "The unique numeric identifier for a product's image. The image must be associated to the same product as the variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "inventory_item_id": {"name": "inventory_item_id", "description": "The unique identifier for the inventory item, which is used in the Inventory API to query for inventory information.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_inventory_management": {"name": "variant_inventory_management", "description": "The fulfillment service that tracks the number of items in stock for the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_inventory_policy": {"name": "variant_inventory_policy", "description": "Whether customers are allowed to place an order for the product variant when it's out of stock.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_inventory_quantity": {"name": "variant_inventory_quantity", "description": "An aggregate of inventory across all locations. To adjust inventory at a specific location, use the InventoryLevel resource.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_option_1": {"name": "variant_option_1", "description": "The custom properties that a shop owner uses to define product variants. You can define three options for a product variant: option1, option2, option3.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_option_2": {"name": "variant_option_2", "description": "The custom properties that a shop owner uses to define product variants. You can define three options for a product variant: option1, option2, option3.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_option_3": {"name": "variant_option_3", "description": "The custom properties that a shop owner uses to define product variants. You can define three options for a product variant: option1, option2, option3.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_position": {"name": "variant_position", "description": "The order of the product variant in the list of product variants. The first position in the list is 1. The position of variants is indicated by the order in which they are listed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_price": {"name": "variant_price", "description": "The price of the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_is_requiring_shipping": {"name": "variant_is_requiring_shipping", "description": "This property is deprecated. Use the `requires_shipping` property on the InventoryItem resource instead.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_sku": {"name": "variant_sku", "description": "A unique identifier for the product variant in the shop. Required in order to connect to a FulfillmentService.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_is_taxable": {"name": "variant_is_taxable", "description": "Whether a tax is charged when the product variant is sold.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_title": {"name": "variant_title", "description": "The title of the product variant. The title field is a concatenation of the option1, option2, and option3 fields. You can only update title indirectly using the option fields.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_updated_at": {"name": "variant_updated_at", "description": "The date and time when the product variant was last modified. Gets returned in ISO 8601 format.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_weight": {"name": "variant_weight", "description": "The weight of the product variant in the unit system specified with weight_unit.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_weight_unit": {"name": "variant_weight_unit", "description": "The unit of measurement that applies to the product variant's weight. If you don't specify a value for weight_unit, then the shop's default unit of measurement is applied. Valid values: g, kg, oz, and lb.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refunded_subtotal": {"name": "refunded_subtotal", "description": "Subtotal amount of the refund applied to the order line.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "subtotal_net_refunds": {"name": "subtotal_net_refunds", "description": "Subtotal of the order line with refunds subtracted.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "image_id": {"name": "image_id", "description": "Image id of the product variant associated with the order line.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify://models/shopify.yml", "compiled_path": "target/compiled/shopify/models/shopify__order_lines.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "shopify", "materialized": "table"}, "created_at": 1665702405.257921, "compiled_sql": "with __dbt__cte__shopify__orders__order_refunds as (\n\n\nwith refunds as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__refund`\n\n), order_line_refunds as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__order_line_refund`\n \n), refund_join as (\n\n select \n refunds.refund_id,\n refunds.created_at,\n refunds.order_id,\n refunds.user_id,\n refunds.source_relation,\n order_line_refunds.order_line_refund_id,\n order_line_refunds.order_line_id,\n order_line_refunds.restock_type,\n order_line_refunds.quantity,\n order_line_refunds.subtotal,\n order_line_refunds.total_tax\n from refunds\n left join order_line_refunds\n on refunds.refund_id = order_line_refunds.refund_id\n and refunds.source_relation = order_line_refunds.source_relation\n\n)\n\nselect *\nfrom refund_join\n),order_lines as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__order_line`\n\n), product_variants as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__product_variant`\n\n\n), refunds as (\n\n select *\n from __dbt__cte__shopify__orders__order_refunds\n\n), refunds_aggregated as (\n \n select\n order_line_id,\n source_relation,\n sum(quantity) as quantity,\n sum(coalesce(subtotal, 0)) as subtotal\n from refunds\n group by 1,2\n\n\n), joined as (\n\n select\n order_lines.*,\n\n \n coalesce(refunds_aggregated.quantity,0) as refunded_quantity,\n coalesce(refunds_aggregated.subtotal,0) as refunded_subtotal,\n order_lines.quantity - coalesce(refunds_aggregated.quantity,0) as quantity_net_refunds,\n order_lines.pre_tax_price - coalesce(refunds_aggregated.subtotal,0) as subtotal_net_refunds,\n \n \n product_variants.created_timestamp as variant_created_at,\n product_variants.updated_timestamp as variant_updated_at,\n product_variants.inventory_item_id,\n product_variants.image_id,\n product_variants.title as variant_title,\n product_variants.price as variant_price,\n product_variants.sku as variant_sku,\n product_variants.position as variant_position,\n product_variants.inventory_policy as variant_inventory_policy,\n product_variants.compare_at_price as variant_compare_at_price,\n product_variants.fulfillment_service as variant_fulfillment_service,\n product_variants.inventory_management as variant_inventory_management,\n product_variants.is_taxable as variant_is_taxable,\n product_variants.barcode as variant_barcode,\n product_variants.grams as variant_grams,\n product_variants.inventory_quantity as variant_inventory_quantity,\n product_variants.weight as variant_weight,\n product_variants.weight_unit as variant_weight_unit,\n product_variants.option_1 as variant_option_1,\n product_variants.option_2 as variant_option_2,\n product_variants.option_3 as variant_option_3,\n product_variants.tax_code as variant_tax_code,\n product_variants.is_requiring_shipping as variant_is_requiring_shipping\n from order_lines\n \n left join refunds_aggregated\n on refunds_aggregated.order_line_id = order_lines.order_line_id\n and refunds_aggregated.source_relation = order_lines.source_relation\n \n left join product_variants\n on product_variants.variant_id = order_lines.variant_id\n and product_variants.source_relation = order_lines.source_relation\n\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.shopify.shopify__orders__order_refunds", "sql": " __dbt__cte__shopify__orders__order_refunds as (\n\n\nwith refunds as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__refund`\n\n), order_line_refunds as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__order_line_refund`\n \n), refund_join as (\n\n select \n refunds.refund_id,\n refunds.created_at,\n refunds.order_id,\n refunds.user_id,\n refunds.source_relation,\n order_line_refunds.order_line_refund_id,\n order_line_refunds.order_line_id,\n order_line_refunds.restock_type,\n order_line_refunds.quantity,\n order_line_refunds.subtotal,\n order_line_refunds.total_tax\n from refunds\n left join order_line_refunds\n on refunds.refund_id = order_line_refunds.refund_id\n and refunds.source_relation = order_line_refunds.source_relation\n\n)\n\nselect *\nfrom refund_join\n)"}], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_shopify`.`shopify__order_lines`"}, "model.shopify.shopify__calendar": {"raw_sql": "{{ dbt_utils.date_spine(\n datepart=\"day\",\n start_date=\"cast('2019-01-01' as date)\",\n end_date=\"current_date\"\n )\n}}", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt_utils.date_spine"], "nodes": []}, "config": {"enabled": true, "alias": null, "schema": "shopify", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_shopify", "fqn": ["shopify", "utils", "shopify__calendar"], "unique_id": "model.shopify.shopify__calendar", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify", "path": "utils/shopify__calendar.sql", "original_file_path": "models/utils/shopify__calendar.sql", "name": "shopify__calendar", "alias": "shopify__calendar", "checksum": {"name": "sha256", "checksum": "330711091f6b47526ac5e8bc39960b2d171633362c0e10b666931be500abeddd"}, "tags": [], "refs": [], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify/models/utils/shopify__calendar.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "shopify", "materialized": "table"}, "created_at": 1665702404.927511, "compiled_sql": "\n\n\n\n\n\nwith rawdata as (\n\n \n\n \n\n with p as (\n select 0 as generated_number union all select 1\n ), unioned as (\n\n select\n\n \n p0.generated_number * power(2, 0)\n + \n \n p1.generated_number * power(2, 1)\n + \n \n p2.generated_number * power(2, 2)\n + \n \n p3.generated_number * power(2, 3)\n + \n \n p4.generated_number * power(2, 4)\n + \n \n p5.generated_number * power(2, 5)\n + \n \n p6.generated_number * power(2, 6)\n + \n \n p7.generated_number * power(2, 7)\n + \n \n p8.generated_number * power(2, 8)\n + \n \n p9.generated_number * power(2, 9)\n + \n \n p10.generated_number * power(2, 10)\n \n \n + 1\n as generated_number\n\n from\n\n \n p as p0\n cross join \n \n p as p1\n cross join \n \n p as p2\n cross join \n \n p as p3\n cross join \n \n p as p4\n cross join \n \n p as p5\n cross join \n \n p as p6\n cross join \n \n p as p7\n cross join \n \n p as p8\n cross join \n \n p as p9\n cross join \n \n p as p10\n \n \n\n )\n\n select *\n from unioned\n where generated_number <= 1381\n order by generated_number\n\n\n\n),\n\nall_periods as (\n\n select (\n \n\n datetime_add(\n cast( cast('2019-01-01' as date) as datetime),\n interval row_number() over (order by 1) - 1 day\n )\n\n\n ) as date_day\n from rawdata\n\n),\n\nfiltered as (\n\n select *\n from all_periods\n where date_day <= current_date\n\n)\n\nselect * from filtered\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_shopify`.`shopify__calendar`"}, "model.shopify.shopify__orders__order_line_aggregates": {"raw_sql": "with order_line as (\n\n select *\n from {{ var('shopify_order_line') }}\n\n), aggregated as (\n\n select \n order_id,\n source_relation,\n count(*) as line_item_count\n from order_line\n group by 1,2\n\n)\n\nselect *\nfrom aggregated", "compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["model.shopify_source.stg_shopify__order_line"]}, "config": {"enabled": true, "alias": null, "schema": "shopify", "database": null, "tags": [], "meta": {}, "materialized": "ephemeral", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_shopify", "fqn": ["shopify", "intermediate", "shopify__orders__order_line_aggregates"], "unique_id": "model.shopify.shopify__orders__order_line_aggregates", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify", "path": "intermediate/shopify__orders__order_line_aggregates.sql", "original_file_path": "models/intermediate/shopify__orders__order_line_aggregates.sql", "name": "shopify__orders__order_line_aggregates", "alias": "shopify__orders__order_line_aggregates", "checksum": {"name": "sha256", "checksum": "837181b671b2beb8e58924357d213e33d6479a47e16c604db35cbb6ce6489fa8"}, "tags": [], "refs": [["stg_shopify__order_line"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify://models/intermediate/intermediate.yml", "compiled_path": "target/compiled/shopify/models/intermediate/shopify__orders__order_line_aggregates.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "shopify", "materialized": "ephemeral"}, "created_at": 1665702405.277619, "compiled_sql": "with order_line as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__order_line`\n\n), aggregated as (\n\n select \n order_id,\n source_relation,\n count(*) as line_item_count\n from order_line\n group by 1,2\n\n)\n\nselect *\nfrom aggregated", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null}, "model.shopify.shopify__customers__order_aggregates": {"raw_sql": "with orders as (\n\n select *\n from {{ var('shopify_order') }}\n\n), transactions as (\n\n select *\n from {{ ref('shopify__transactions' )}}\n where lower(status) = 'success'\n\n), aggregated as (\n\n select\n orders.customer_id,\n orders.source_relation,\n min(orders.created_timestamp) as first_order_timestamp,\n max(orders.created_timestamp) as most_recent_order_timestamp,\n avg(case when lower(transactions.kind) in ('sale','capture') then transactions.currency_exchange_calculated_amount end) as average_order_value,\n sum(case when lower(transactions.kind) in ('sale','capture') then transactions.currency_exchange_calculated_amount end) as lifetime_total_spent,\n sum(case when lower(transactions.kind) in ('refund') then transactions.currency_exchange_calculated_amount end) as lifetime_total_refunded,\n count(distinct orders.order_id) as lifetime_count_orders\n from orders\n left join transactions\n using (order_id, source_relation)\n where customer_id is not null\n group by 1,2\n\n)\n\nselect *\nfrom aggregated", "compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["model.shopify_source.stg_shopify__order", "model.shopify.shopify__transactions"]}, "config": {"enabled": true, "alias": null, "schema": "shopify", "database": null, "tags": [], "meta": {}, "materialized": "ephemeral", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_shopify", "fqn": ["shopify", "intermediate", "shopify__customers__order_aggregates"], "unique_id": "model.shopify.shopify__customers__order_aggregates", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify", "path": "intermediate/shopify__customers__order_aggregates.sql", "original_file_path": "models/intermediate/shopify__customers__order_aggregates.sql", "name": "shopify__customers__order_aggregates", "alias": "shopify__customers__order_aggregates", "checksum": {"name": "sha256", "checksum": "902e082d29e1b00c443c6d18109a496dc53a1a7e927134bc8a523cdc106076bd"}, "tags": [], "refs": [["stg_shopify__order"], ["shopify__transactions"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify://models/intermediate/intermediate.yml", "compiled_path": "target/compiled/shopify/models/intermediate/shopify__customers__order_aggregates.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "shopify", "materialized": "ephemeral"}, "created_at": 1665702405.277395, "compiled_sql": "with orders as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__order`\n\n), transactions as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_shopify`.`shopify__transactions`\n where lower(status) = 'success'\n\n), aggregated as (\n\n select\n orders.customer_id,\n orders.source_relation,\n min(orders.created_timestamp) as first_order_timestamp,\n max(orders.created_timestamp) as most_recent_order_timestamp,\n avg(case when lower(transactions.kind) in ('sale','capture') then transactions.currency_exchange_calculated_amount end) as average_order_value,\n sum(case when lower(transactions.kind) in ('sale','capture') then transactions.currency_exchange_calculated_amount end) as lifetime_total_spent,\n sum(case when lower(transactions.kind) in ('refund') then transactions.currency_exchange_calculated_amount end) as lifetime_total_refunded,\n count(distinct orders.order_id) as lifetime_count_orders\n from orders\n left join transactions\n using (order_id, source_relation)\n where customer_id is not null\n group by 1,2\n\n)\n\nselect *\nfrom aggregated", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null}, "model.shopify.shopify__orders__order_refunds": {"raw_sql": "{{ config(enabled=fivetran_utils.enabled_vars(['shopify__using_order_line_refund','shopify__using_refund'])) }}\n\nwith refunds as (\n\n select *\n from {{ var('shopify_refund') }}\n\n), order_line_refunds as (\n\n select *\n from {{ var('shopify_order_line_refund') }}\n \n), refund_join as (\n\n select \n refunds.refund_id,\n refunds.created_at,\n refunds.order_id,\n refunds.user_id,\n refunds.source_relation,\n order_line_refunds.order_line_refund_id,\n order_line_refunds.order_line_id,\n order_line_refunds.restock_type,\n order_line_refunds.quantity,\n order_line_refunds.subtotal,\n order_line_refunds.total_tax\n from refunds\n left join order_line_refunds\n on refunds.refund_id = order_line_refunds.refund_id\n and refunds.source_relation = order_line_refunds.source_relation\n\n)\n\nselect *\nfrom refund_join", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars"], "nodes": ["model.shopify_source.stg_shopify__refund", "model.shopify_source.stg_shopify__order_line_refund"]}, "config": {"enabled": true, "alias": null, "schema": "shopify", "database": null, "tags": [], "meta": {}, "materialized": "ephemeral", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_shopify", "fqn": ["shopify", "intermediate", "shopify__orders__order_refunds"], "unique_id": "model.shopify.shopify__orders__order_refunds", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify", "path": "intermediate/shopify__orders__order_refunds.sql", "original_file_path": "models/intermediate/shopify__orders__order_refunds.sql", "name": "shopify__orders__order_refunds", "alias": "shopify__orders__order_refunds", "checksum": {"name": "sha256", "checksum": "1bcc3be258e3bdda4c6845e465f95e7e5b4e0eee823b169e0cd5e7eff4cf7792"}, "tags": [], "refs": [["stg_shopify__refund"], ["stg_shopify__order_line_refund"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify://models/intermediate/intermediate.yml", "compiled_path": "target/compiled/shopify/models/intermediate/shopify__orders__order_refunds.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "shopify", "materialized": "ephemeral", "enabled": true}, "created_at": 1665702405.277806, "compiled_sql": "\n\nwith refunds as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__refund`\n\n), order_line_refunds as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__order_line_refund`\n \n), refund_join as (\n\n select \n refunds.refund_id,\n refunds.created_at,\n refunds.order_id,\n refunds.user_id,\n refunds.source_relation,\n order_line_refunds.order_line_refund_id,\n order_line_refunds.order_line_id,\n order_line_refunds.restock_type,\n order_line_refunds.quantity,\n order_line_refunds.subtotal,\n order_line_refunds.total_tax\n from refunds\n left join order_line_refunds\n on refunds.refund_id = order_line_refunds.refund_id\n and refunds.source_relation = order_line_refunds.source_relation\n\n)\n\nselect *\nfrom refund_join", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null}, "model.shopify_holistic_reporting.shopify_holistic_reporting__customer_enhanced": {"raw_sql": "with shopify_customers as (\n\n select *\n from {{ ref('int__shopify_customer_rollup') }}\n\n), klaviyo_persons as (\n\n select *\n from {{ ref('int__klaviyo_person_rollup') }}\n\n), combine_customer_info as (\n\n select\n coalesce(shopify_customers.email, klaviyo_persons.email) as email,\n\n coalesce(klaviyo_persons.full_name, shopify_customers.full_name) as full_name,\n shopify_customers.customer_ids as shopify_customer_ids,\n klaviyo_persons.person_ids as klaviyo_person_ids,\n coalesce(shopify_customers.phone_numbers, klaviyo_persons.phone_numbers) as phone_number,\n shopify_customers.first_shopify_account_made_at as shopify_customer_first_created_at,\n shopify_customers.last_shopify_account_made_at as shopify_customer_last_created_at,\n klaviyo_persons.first_klaviyo_account_made_at as klaviyo_person_first_created_at,\n klaviyo_persons.last_klaviyo_account_made_at as klaviyo_person_last_created_at,\n shopify_customers.last_updated_at as shopify_customer_last_updated_at,\n klaviyo_persons.last_updated_at as klaviyo_person_last_updated_at,\n shopify_customers.is_verified_email as is_shopify_email_verified,\n\n {{ dbt_utils.star(from=ref('int__shopify_customer_rollup'), relation_alias='shopify_customers', prefix='shopify_',\n except=['source_relation','email', 'full_name', 'customer_ids', 'phone_numbers', 'first_shopify_account_made_at','last_shopify_account_made_at', \n 'last_updated_at', 'is_verified_email'] ) \n }},\n shopify_customers.source_relation as shopify_source_relation,\n\n {{ dbt_utils.star(from=ref('int__klaviyo_person_rollup'), relation_alias='klaviyo_persons', prefix='klaviyo_',\n except=['source_relation','email', 'full_name', 'first_klaviyo_account_made_at', 'last_klaviyo_account_made_at', 'person_ids', 'phone_numbers', 'last_updated_at'] ) \n }},\n klaviyo_persons.source_relation as klaviyo_source_relation\n\n from shopify_customers\n full outer join klaviyo_persons \n on shopify_customers.email = lower(klaviyo_persons.email) -- redshift doesn't like doing 2 lowers here. we lowercase shopify.email in an intermediate model\n\n)\n\nselect *\nfrom combine_customer_info", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": ["model.shopify_holistic_reporting.int__shopify_customer_rollup", "model.shopify_holistic_reporting.int__klaviyo_person_rollup", "model.shopify_holistic_reporting.int__shopify_customer_rollup", "model.shopify_holistic_reporting.int__klaviyo_person_rollup"]}, "config": {"enabled": true, "alias": null, "schema": "shopify_holistic", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_shopify_holistic", "fqn": ["shopify_holistic_reporting", "shopify_holistic_reporting__customer_enhanced"], "unique_id": "model.shopify_holistic_reporting.shopify_holistic_reporting__customer_enhanced", "package_name": "shopify_holistic_reporting", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_holistic_reporting", "path": "shopify_holistic_reporting__customer_enhanced.sql", "original_file_path": "models/shopify_holistic_reporting__customer_enhanced.sql", "name": "shopify_holistic_reporting__customer_enhanced", "alias": "shopify_holistic_reporting__customer_enhanced", "checksum": {"name": "sha256", "checksum": "db442dfeedb2bb460e284b8e3d2742abc3f9ae90d8db670d6019afc567b53a09"}, "tags": [], "refs": [["int__shopify_customer_rollup"], ["int__klaviyo_person_rollup"], ["int__shopify_customer_rollup"], ["int__klaviyo_person_rollup"]], "sources": [], "metrics": [], "description": "Table consolidating customers and their information and activity metrics from across all platforms. A full outer join is performed in order to union together users who may not exist in both sources, and personal information is coalesced to consolidate as much information as possible. Includes any custom columns specified in passthrough variables for both Shopify and Klaviyo.\nFor **Klaviyo** metrics: Counts of instances of triggered events and sums of the numeric value (i.e. revenue) associated with events (total vs organic/not attributed to flows or campaigns) will be pivoted out into columns, as configured by the klaviyo__count_metrics and klaviyo__sum_revenue_metricsvariables, respectively. See the Klaviyo dbt_project.yml file for the default metrics used. These columns will be prefixed with total_count_, total_sum_revenue_ (organic + attributed), and organic_sum_revenue_ (not attributed to a campaign or flow).\nColumns that come _only_ from one source will be prefixed with that source name (ie klaviyo_)\n", "columns": {"shopify_source_relation": {"name": "shopify_source_relation", "description": "The source where this Shopify data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioning together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_source_relation": {"name": "klaviyo_source_relation", "description": "The source where this Klaviyo data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioning together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_has_accepted_marketing": {"name": "shopify_has_accepted_marketing", "description": "Whether the customer has consented to receive marketing material via email.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_customer_first_created_at": {"name": "shopify_customer_first_created_at", "description": "The date and time when the customer account first associated with this email was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_customer_last_created_at": {"name": "shopify_customer_last_created_at", "description": "The date and time when the customer account first associated with this email was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_customer_last_updated_at": {"name": "shopify_customer_last_updated_at", "description": "Timestamp of when the shopify customer was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_default_address_id": {"name": "shopify_default_address_id", "description": "The default address for the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email": {"name": "email", "description": "The unique email address of the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "full_name": {"name": "full_name", "description": "The customer's full name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_customer_ids": {"name": "shopify_customer_ids", "description": "A comma-separated aggregated list of Shopify IDs for the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_lifetime_count_orders": {"name": "shopify_lifetime_count_orders", "description": "The number of orders associated with this customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "phone_number": {"name": "phone_number", "description": "The unique phone number (E.164 format) for this customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_account_state": {"name": "shopify_account_state", "description": "The state of the customer's account with a shop.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_is_tax_exempt": {"name": "shopify_is_tax_exempt", "description": "Whether the customer is exempt from paying taxes on their order. If true, then taxes won't be applied to an order at checkout. If false, then taxes will be applied at checkout.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_last_updated_at": {"name": "shopify_last_updated_at", "description": "The date and time when the customer information was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_shopify_email_verified": {"name": "is_shopify_email_verified", "description": "Whether the customer has verified their email address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_first_order_at": {"name": "shopify_first_order_at", "description": "The timestamp the customer completed their first order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_last_order_at": {"name": "shopify_last_order_at", "description": "The timestamp the customer completed their most recent order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_average_order_value": {"name": "shopify_average_order_value", "description": "The average order value for the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_lifetime_total_spent": {"name": "shopify_lifetime_total_spent", "description": "The total amount of money that the customer has spent on orders across their order history.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_lifetime_total_refunded": {"name": "shopify_lifetime_total_refunded", "description": "The total amount of money that the customer has been refunded on orders across their order history.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_lifetime_total_amount": {"name": "shopify_lifetime_total_amount", "description": "The total amount of money (minus refunds) that the customer has spent across their order history.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_person_id": {"name": "klaviyo_person_id", "description": "Unique ID of the user if you use your own unique identifier. Otherwise, Klaviyo recommends using the email as the primary key. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_address_1": {"name": "klaviyo_address_1", "description": "First line of the person's address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_address_2": {"name": "klaviyo_address_2", "description": "Second line of the person's address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_city": {"name": "klaviyo_city", "description": "City they live in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_country": {"name": "klaviyo_country", "description": "Country they live in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_zip": {"name": "klaviyo_zip", "description": "Postal code where they live.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_person_created_at": {"name": "klaviyo_person_created_at", "description": "Timestamp of when the person's profile was created in Klaviyo.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_latitude": {"name": "klaviyo_latitude", "description": "Latitude of the person's location.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_longitude": {"name": "klaviyo_longitude", "description": "Longitude of the person's location.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_organization": {"name": "klaviyo_organization", "description": "Business organization they belong to.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_region": {"name": "klaviyo_region", "description": "Region or state they live in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_timezone": {"name": "klaviyo_timezone", "description": "Timezone they are situated in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_title": {"name": "klaviyo_title", "description": "Title at their business or organization.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_person_updated_at": {"name": "klaviyo_person_updated_at", "description": "Timestamp of when the person profile was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_count_total_campaigns": {"name": "klaviyo_count_total_campaigns", "description": "Count of the number of campaigns this person has interacted with.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_count_total_flows": {"name": "klaviyo_count_total_flows", "description": "Count of the number of flows this person has interacted with.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_first_event_at": {"name": "klaviyo_first_event_at", "description": "Timestamp of when the user first triggered an event (not limited to campaign and flow interactions).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_last_event_at": {"name": "klaviyo_last_event_at", "description": "Timestamp of when the user last triggered an event (not limited to campaign and flow interactions).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_first_campaign_touch_at": {"name": "klaviyo_first_campaign_touch_at", "description": "Timestamp of when the user first interacted with a campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_last_campaign_touch_at": {"name": "klaviyo_last_campaign_touch_at", "description": "Timestamp of when the user last interacted with a campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_first_flow_touch_at": {"name": "klaviyo_first_flow_touch_at", "description": "Timestamp of when the user first interacted with a flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_last_flow_touch_at": {"name": "klaviyo_last_flow_touch_at", "description": "Timestamp of when the user last interacted with a flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify_holistic_reporting://models/shopify_holistic_reporting.yml", "compiled_path": "target/compiled/shopify_holistic_reporting/models/shopify_holistic_reporting__customer_enhanced.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "shopify_holistic"}, "created_at": 1665702405.292048, "compiled_sql": "with shopify_customers as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_shopify_holistic`.`int__shopify_customer_rollup`\n\n), klaviyo_persons as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_shopify_holistic`.`int__klaviyo_person_rollup`\n\n), combine_customer_info as (\n\n select\n coalesce(shopify_customers.email, klaviyo_persons.email) as email,\n\n coalesce(klaviyo_persons.full_name, shopify_customers.full_name) as full_name,\n shopify_customers.customer_ids as shopify_customer_ids,\n klaviyo_persons.person_ids as klaviyo_person_ids,\n coalesce(shopify_customers.phone_numbers, klaviyo_persons.phone_numbers) as phone_number,\n shopify_customers.first_shopify_account_made_at as shopify_customer_first_created_at,\n shopify_customers.last_shopify_account_made_at as shopify_customer_last_created_at,\n klaviyo_persons.first_klaviyo_account_made_at as klaviyo_person_first_created_at,\n klaviyo_persons.last_klaviyo_account_made_at as klaviyo_person_last_created_at,\n shopify_customers.last_updated_at as shopify_customer_last_updated_at,\n klaviyo_persons.last_updated_at as klaviyo_person_last_updated_at,\n shopify_customers.is_verified_email as is_shopify_email_verified,\n\n *,\n shopify_customers.source_relation as shopify_source_relation,\n\n *,\n klaviyo_persons.source_relation as klaviyo_source_relation\n\n from shopify_customers\n full outer join klaviyo_persons \n on shopify_customers.email = lower(klaviyo_persons.email) -- redshift doesn't like doing 2 lowers here. we lowercase shopify.email in an intermediate model\n\n)\n\nselect *\nfrom combine_customer_info", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_shopify_holistic`.`shopify_holistic_reporting__customer_enhanced`"}, "model.shopify_holistic_reporting.shopify_holistic_reporting__orders_attribution": {"raw_sql": "{{\n config(\n materialized='incremental',\n unique_key='unique_order_key',\n partition_by={\n \"field\": \"created_timestamp\",\n \"data_type\": \"timestamp\"\n } if target.type == 'bigquery' else none,\n incremental_strategy = 'merge' if target.type not in ('postgres', 'redshift') else 'delete+insert',\n file_format = 'delta'\n )\n}}\n\nwith orders as (\n\n select *\n from {{ ref('shopify__orders') }}\n\n -- just grab new + newly updated orders\n {% if is_incremental() %}\n where updated_timestamp >= (select max(updated_timestamp) from {{ this }})\n {% endif %}\n\n), events as (\n\n select \n *\n from {{ ref('klaviyo__events') }}\n\n where \n coalesce(last_touch_campaign_id, last_touch_flow_id) is not null\n {% if var('klaviyo__eligible_attribution_events') != [] %}\n and lower(type) in {{ \"('\" ~ (var('klaviyo__eligible_attribution_events') | join(\"', '\")) ~ \"')\" }}\n {% endif %}\n\n -- only grab the events for users who are in the new increment of orders\n {% if is_incremental() %}\n and lower(person_email) in (select distinct lower(email) from orders)\n {% endif %}\n\n), join_orders_w_events as (\n\n select \n orders.*,\n events.last_touch_campaign_id,\n events.last_touch_flow_id,\n events.variation_id as last_touch_variation_id,\n events.campaign_name as last_touch_campaign_name,\n events.campaign_subject_line as last_touch_campaign_subject_line,\n events.flow_name as last_touch_flow_name,\n events.campaign_type as last_touch_campaign_type,\n events.event_id as last_touch_event_id,\n events.occurred_at as last_touch_event_occurred_at,\n events.type as last_touch_event_type,\n events.integration_name as last_touch_integration_name,\n events.integration_category as last_touch_integration_category,\n events.source_relation as klaviyo_source_relation\n\n from orders \n left join events on \n lower(orders.email) = lower(events.person_email)\n and {{ dbt_utils.datediff('events.occurred_at', 'orders.created_timestamp', 'hour') }} <= (\n case when events.type like '%sms%' then {{ var('klaviyo__sms_attribution_lookback') }}\n else {{ var('klaviyo__email_attribution_lookback') }} end)\n and orders.created_timestamp > events.occurred_at\n\n), order_events as (\n\n select\n *,\n row_number() over (partition by order_id order by last_touch_event_occurred_at desc) as event_index,\n\n -- the order was made after X interactions with campaign/flow\n count(last_touch_event_id) over (partition by order_id, last_touch_campaign_id) as count_interactions_with_campaign,\n count(last_touch_event_id) over (partition by order_id, last_touch_flow_id) as count_interactions_with_flow\n\n\n from join_orders_w_events\n\n), last_touches as (\n\n select \n {{ dbt_utils.star(from=ref('shopify__orders'), except=['source_relation']) }},\n last_touch_campaign_id is not null or last_touch_flow_id is not null as is_attributed,\n last_touch_campaign_id,\n last_touch_flow_id,\n last_touch_variation_id,\n last_touch_campaign_name,\n last_touch_campaign_subject_line,\n last_touch_campaign_type,\n last_touch_flow_name,\n case when last_touch_campaign_id is not null then count_interactions_with_campaign else null end as count_interactions_with_campaign, -- will be null if it's associated with a flow\n count_interactions_with_flow, -- will be null if it's associated with a campaign\n last_touch_event_id,\n last_touch_event_occurred_at,\n last_touch_event_type,\n last_touch_integration_name,\n last_touch_integration_category,\n source_relation as shopify_source_relation,\n klaviyo_source_relation,\n {{ dbt_utils.surrogate_key(['order_id', 'source_relation']) }} as unique_order_key\n\n from order_events\n where event_index = 1\n)\n\nselect *\nfrom last_touches", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt.is_incremental", "macro.dbt_utils.datediff", "macro.dbt_utils.star", "macro.dbt_utils.surrogate_key"], "nodes": ["model.shopify.shopify__orders", "model.klaviyo.klaviyo__events", "model.shopify.shopify__orders"]}, "config": {"enabled": true, "alias": null, "schema": "shopify_holistic", "database": null, "tags": [], "meta": {}, "materialized": "incremental", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": "unique_order_key", "on_schema_change": "ignore", "grants": {}, "partition_by": {"field": "created_timestamp", "data_type": "timestamp"}, "incremental_strategy": "merge", "file_format": "delta", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_shopify_holistic", "fqn": ["shopify_holistic_reporting", "shopify_holistic_reporting__orders_attribution"], "unique_id": "model.shopify_holistic_reporting.shopify_holistic_reporting__orders_attribution", "package_name": "shopify_holistic_reporting", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_holistic_reporting", "path": "shopify_holistic_reporting__orders_attribution.sql", "original_file_path": "models/shopify_holistic_reporting__orders_attribution.sql", "name": "shopify_holistic_reporting__orders_attribution", "alias": "shopify_holistic_reporting__orders_attribution", "checksum": {"name": "sha256", "checksum": "73fb2fe152a44cae675c50dde3179125d102ace0e7450e941072ce481be68efa"}, "tags": [], "refs": [["shopify__orders"], ["klaviyo__events"], ["shopify__orders"]], "sources": [], "metrics": [], "description": "Table of Shopify orders, enriched with a last-touch attribution model associating orders (as conversions) to campaigns or flows in Klaviyo. \nBy default, the package performs attribution [in line with Klaviyo](https://help.klaviyo.com/hc/en-us/articles/115005248128). It considers email opens and clicks, and SMS opens as the events eligible to be credited with orders. This attribution-eligibility can be configured by the `klaviyo__eligible_attribution_events` variable. \nSimilar to the Klaviyo app, the package by default considers the conversion period/lookback window for email events to be 120 hours (5 days) and 24 hours for SMS events. These can be configured through the `klaviyo__email_attribution_lookback` and `klaviyo__sms_attribution_lookback` variables, respectively (in integer-hours).\nRefer to the Klaviyo package [README](https://github.com/fivetran/dbt_klaviyo#attribution-lookback-window) for more details.\nMaterialized incrementally by default.\n", "columns": {"app_id": {"name": "app_id", "description": "The ID of the app that created the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_address_1": {"name": "billing_address_address_1", "description": "The street address of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_address_2": {"name": "billing_address_address_2", "description": "An optional additional field for the street address of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_city": {"name": "billing_address_city", "description": "The city, town, or village of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_company": {"name": "billing_address_company", "description": "The company of the person associated with the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_country": {"name": "billing_address_country", "description": "The name of the country of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_country_code": {"name": "billing_address_country_code", "description": "The two-letter code (ISO 3166-1 format) for the country of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_first_name": {"name": "billing_address_first_name", "description": "The first name of the person associated with the payment method.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_last_name": {"name": "billing_address_last_name", "description": "The last name of the person associated with the payment method.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_latitude": {"name": "billing_address_latitude", "description": "The latitude of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_longitude": {"name": "billing_address_longitude", "description": "The longitude of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_name": {"name": "billing_address_name", "description": "The full name of the person associated with the payment method.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_phone": {"name": "billing_address_phone", "description": "The phone number at the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_province": {"name": "billing_address_province", "description": "The name of the region (province, state, prefecture, \u2026) of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_province_code": {"name": "billing_address_province_code", "description": "The two-letter abbreviation of the region of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_zip": {"name": "billing_address_zip", "description": "The postal code (zip, postcode, Eircode, \u2026) of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "browser_ip": {"name": "browser_ip", "description": "The IP address of the browser used by the customer when they placed the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "has_buyer_accepted_marketing": {"name": "has_buyer_accepted_marketing", "description": "Whether the customer consented to receive email updates from the shop.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "cancel_reason": {"name": "cancel_reason", "description": "The reason why the order was canceled.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "cancelled_timestamp": {"name": "cancelled_timestamp", "description": "The date and time when the order was canceled.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "cart_token": {"name": "cart_token", "description": "The ID of the cart that's associated with the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "closed_timestamp": {"name": "closed_timestamp", "description": "The date and time when the order was closed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_timestamp": {"name": "created_timestamp", "description": "The autogenerated date and time when the order was created in Shopify.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "The three-letter code for the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "customer_id": {"name": "customer_id", "description": "The ID of the order's customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email": {"name": "email", "description": "The customer's email address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "financial_status": {"name": "financial_status", "description": "The status of payments associated with the order. Can only be set when the order is created", "meta": {}, "data_type": null, "quote": null, "tags": []}, "fulfillment_status": {"name": "fulfillment_status", "description": "The order's status in terms of fulfilled line items.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_id": {"name": "order_id", "description": "The ID of the order, used for API purposes. This is different from the order_number property, which is the ID used by the shop owner and customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "landing_site_base_url": {"name": "landing_site_base_url", "description": "The URL for the page where the buyer landed when they entered the shop.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "location_id": {"name": "location_id", "description": "The ID of the physical location where the order was processed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "name": {"name": "name", "description": "The order name, generated by combining the order_number property with the order prefix and suffix that are set in the merchant's general settings.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "note": {"name": "note", "description": "An optional note that a shop owner can attach to the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "number": {"name": "number", "description": "The order's position in the shop's count of orders. Numbers are sequential and start at 1.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_number": {"name": "order_number", "description": "The order 's position in the shop's count of orders starting at 1001. Order numbers are sequential and start at 1001.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "processed_timestamp": {"name": "processed_timestamp", "description": "The date and time when an order was processed. This value is the date that appears on your orders and that's used in the analytic reports.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "processing_method": {"name": "processing_method", "description": "How the payment was processed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "referring_site": {"name": "referring_site", "description": "The website where the customer clicked a link to the shop.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_address_1": {"name": "shipping_address_address_1", "description": "The street address of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_address_2": {"name": "shipping_address_address_2", "description": "An optional additional field for the street address of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_city": {"name": "shipping_address_city", "description": "The city, town, or village of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_company": {"name": "shipping_address_company", "description": "The company of the person associated with the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_country": {"name": "shipping_address_country", "description": "The name of the country of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_country_code": {"name": "shipping_address_country_code", "description": "The two-letter code (ISO 3166-1 format) for the country of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_first_name": {"name": "shipping_address_first_name", "description": "The first name of the person associated with the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_last_name": {"name": "shipping_address_last_name", "description": "The last name of the person associated with the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_latitude": {"name": "shipping_address_latitude", "description": "The latitude of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_longitude": {"name": "shipping_address_longitude", "description": "The longitude of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_name": {"name": "shipping_address_name", "description": "The full name of the person associated with the payment method.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_phone": {"name": "shipping_address_phone", "description": "The phone number at the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_province": {"name": "shipping_address_province", "description": "The name of the region (province, state, prefecture, \u2026) of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_province_code": {"name": "shipping_address_province_code", "description": "The two-letter abbreviation of the region of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_zip": {"name": "shipping_address_zip", "description": "The postal code (zip, postcode, Eircode, \u2026) of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_name": {"name": "source_name", "description": "Where the order originated. Can be set only during order creation, and is not writeable afterwards.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "subtotal_price": {"name": "subtotal_price", "description": "The price of the order in the shop currency after discounts but before shipping, taxes, and tips.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "has_taxes_included": {"name": "has_taxes_included", "description": "Whether taxes are included in the order subtotal.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_test_order": {"name": "is_test_order", "description": "Whether this is a test order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "token": {"name": "token", "description": "A unique token for the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_discounts": {"name": "total_discounts", "description": "The total discounts applied to the price of the order in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_line_items_price": {"name": "total_line_items_price", "description": "The sum of all line item prices in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_price": {"name": "total_price", "description": "The sum of all line item prices, discounts, shipping, taxes, and tips in the shop currency. Must be positive.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_tax": {"name": "total_tax", "description": "The sum of all the taxes applied to the order in th shop currency. Must be positive).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_weight": {"name": "total_weight", "description": "The sum of all line item weights in grams.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_timestamp": {"name": "updated_timestamp", "description": "The date and time (ISO 8601 format) when the order was last modified.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "user_id": {"name": "user_id", "description": "The ID of the user logged into Shopify POS who processed the order, if applicable.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "line_item_count": {"name": "line_item_count", "description": "Number of line items included in the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "customer_order_seq_number": {"name": "customer_order_seq_number", "description": "The sequential number of the order as it relates to the customer", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_vs_repeat": {"name": "new_vs_repeat", "description": "Whether the order was a new or repeat order for the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_cost": {"name": "shipping_cost", "description": "The shipping cost of the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_adjustment_amount": {"name": "order_adjustment_amount", "description": "Total adjustment amount applied to the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_adjustment_tax_amount": {"name": "order_adjustment_tax_amount", "description": "Total tax applied to the adjustment on the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refund_subtotal": {"name": "refund_subtotal", "description": "Total refund amount applied to the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refund_total_tax": {"name": "refund_total_tax", "description": "Total tax applied to the refund on the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_adjusted_total": {"name": "order_adjusted_total", "description": "Order total adjusted for refunds and other adjustments. The calculation used for this field is as follows: total price listed on the original order (including shipping costs and discounts) + adjustments + adjustments tax - total refunds - refunds tax The order_adjusted_total will equate to the total sales - refunds listed within the transactions table for the order (after currency exchange).\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "index": {"name": "index", "description": "Field representing the index of the order line in relation to the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "pre_tax_price": {"name": "pre_tax_price", "description": "The pre tax price of the order line.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "checkout_token": {"name": "checkout_token", "description": "The checkout token applied to the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_shipping_price_set": {"name": "total_shipping_price_set", "description": "The total shipping price set to the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_campaign_id": {"name": "last_touch_campaign_id", "description": "The Klaviyo campaign that the order has been attributed to by the package.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_flow_id": {"name": "last_touch_flow_id", "description": "The Klaviyo flow that the order has been attributed to by the package.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_variation_id": {"name": "last_touch_variation_id", "description": "Unique ID of the attributed Klaviyo flow or campaign variation group. This does not map onto another table. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_campaign_name": {"name": "last_touch_campaign_name", "description": "Name of the attributed Klaviyo campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_campaign_subject_line": {"name": "last_touch_campaign_subject_line", "description": "Email subject line of the attributed Klaviyo campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_flow_name": {"name": "last_touch_flow_name", "description": "Name of the attributed Klaviyo flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_campaign_type": {"name": "last_touch_campaign_type", "description": "Type of Klaviyo campaign that the order is attributed to.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_event_id": {"name": "last_touch_event_id", "description": "Unique Klaviyo event id of the interaction the customer had with the campaign or flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_event_occurred_at": {"name": "last_touch_event_occurred_at", "description": "Timestamp of when the customer interacted with the attributed campaign/flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_event_type": {"name": "last_touch_event_type", "description": "Type of interaction that the customer had with the campaign or flow. Will be one of the event types specified by the `klaviyo__eligible_attribution_events` variable. By default, this is just email opens, email clicks, and sms opens.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_integration_name": {"name": "last_touch_integration_name", "description": "Name of the platform that tracked the campaign/flow interaction (either Klaviyo, the API, or another integration).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_integration_category": {"name": "last_touch_integration_category", "description": "Use-case category of the platform that sent the campaign/flow interaction event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_source_relation": {"name": "shopify_source_relation", "description": "The source where this Shopify data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioning together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_source_relation": {"name": "klaviyo_source_relation", "description": "The source where Klaviyo campaign/flow data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioning together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "count_interactions_with_campaign": {"name": "count_interactions_with_campaign", "description": "The count of distinct attributable events the customer had with the campaign throughout the attribution window.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "count_interactions_with_flow": {"name": "count_interactions_with_flow", "description": "The count of distinct attributable events the customer had with the flow throughout the attribution window.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify_holistic_reporting://models/shopify_holistic_reporting.yml", "compiled_path": "target/compiled/shopify_holistic_reporting/models/shopify_holistic_reporting__orders_attribution.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "incremental", "schema": "shopify_holistic", "unique_key": "unique_order_key", "partition_by": {"field": "created_timestamp", "data_type": "timestamp"}, "incremental_strategy": "merge", "file_format": "delta"}, "created_at": 1665702405.307864, "compiled_sql": "\n\nwith orders as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_shopify`.`shopify__orders`\n\n -- just grab new + newly updated orders\n \n\n), events as (\n\n select \n *\n from `dbt-package-testing`.`linkedin_integration_tests_klaviyo`.`klaviyo__events`\n\n where \n coalesce(last_touch_campaign_id, last_touch_flow_id) is not null\n \n and lower(type) in ('opened email', 'clicked email', 'clicked sms')\n \n\n -- only grab the events for users who are in the new increment of orders\n \n\n), join_orders_w_events as (\n\n select \n orders.*,\n events.last_touch_campaign_id,\n events.last_touch_flow_id,\n events.variation_id as last_touch_variation_id,\n events.campaign_name as last_touch_campaign_name,\n events.campaign_subject_line as last_touch_campaign_subject_line,\n events.flow_name as last_touch_flow_name,\n events.campaign_type as last_touch_campaign_type,\n events.event_id as last_touch_event_id,\n events.occurred_at as last_touch_event_occurred_at,\n events.type as last_touch_event_type,\n events.integration_name as last_touch_integration_name,\n events.integration_category as last_touch_integration_category,\n events.source_relation as klaviyo_source_relation\n\n from orders \n left join events on \n lower(orders.email) = lower(events.person_email)\n and datetime_diff(\n cast(orders.created_timestamp as datetime),\n cast(events.occurred_at as datetime),\n hour\n ) <= (\n case when events.type like '%sms%' then 24\n else 120 end)\n and orders.created_timestamp > events.occurred_at\n\n), order_events as (\n\n select\n *,\n row_number() over (partition by order_id order by last_touch_event_occurred_at desc) as event_index,\n\n -- the order was made after X interactions with campaign/flow\n count(last_touch_event_id) over (partition by order_id, last_touch_campaign_id) as count_interactions_with_campaign,\n count(last_touch_event_id) over (partition by order_id, last_touch_flow_id) as count_interactions_with_flow\n\n\n from join_orders_w_events\n\n), last_touches as (\n\n select \n *,\n last_touch_campaign_id is not null or last_touch_flow_id is not null as is_attributed,\n last_touch_campaign_id,\n last_touch_flow_id,\n last_touch_variation_id,\n last_touch_campaign_name,\n last_touch_campaign_subject_line,\n last_touch_campaign_type,\n last_touch_flow_name,\n case when last_touch_campaign_id is not null then count_interactions_with_campaign else null end as count_interactions_with_campaign, -- will be null if it's associated with a flow\n count_interactions_with_flow, -- will be null if it's associated with a campaign\n last_touch_event_id,\n last_touch_event_occurred_at,\n last_touch_event_type,\n last_touch_integration_name,\n last_touch_integration_category,\n source_relation as shopify_source_relation,\n klaviyo_source_relation,\n to_hex(md5(cast(coalesce(cast(order_id as \n string\n), '') || '-' || coalesce(cast(source_relation as \n string\n), '') as \n string\n))) as unique_order_key\n\n from order_events\n where event_index = 1\n)\n\nselect *\nfrom last_touches", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_shopify_holistic`.`shopify_holistic_reporting__orders_attribution`"}, "model.shopify_holistic_reporting.shopify_holistic_reporting__daily_customer_metrics": {"raw_sql": "with shopify_daily as (\n\n select *\n from {{ ref('int__daily_shopify_customer_orders') }}\n\n), klaviyo_daily as (\n\n select *\n from {{ ref('int__daily_klaviyo_user_metrics') }}\n\n), combine_histories as (\n\n select \n coalesce(shopify_daily.date_day, klaviyo_daily.date_day) as date_day,\n coalesce(shopify_daily.email, klaviyo_daily.email) as email,\n\n -- when the below is null, these are unattributed actions\n coalesce(shopify_daily.last_touch_campaign_id, klaviyo_daily.last_touch_campaign_id) as campaign_id,\n coalesce(shopify_daily.last_touch_flow_id, klaviyo_daily.last_touch_flow_id) as flow_id,\n coalesce(shopify_daily.last_touch_campaign_name, klaviyo_daily.campaign_name) as campaign_name,\n coalesce(shopify_daily.last_touch_flow_name, klaviyo_daily.flow_name) as flow_name,\n coalesce(shopify_daily.last_touch_variation_id, klaviyo_daily.variation_id) as variation_id,\n coalesce(shopify_daily.last_touch_campaign_subject_line, klaviyo_daily.campaign_subject_line) as campaign_subject_line,\n coalesce(shopify_daily.last_touch_campaign_type, klaviyo_daily.campaign_type) as campaign_type,\n \n {{ dbt_utils.star(from=ref('int__daily_shopify_customer_orders'), relation_alias='shopify_daily', prefix='shopify_',\n except=['source_relation','date_day', 'email', 'last_touch_variation_id', 'last_touch_flow_name', 'last_touch_campaign_name', 'last_touch_flow_id', 'last_touch_campaign_id', 'last_touch_campaign_subject_line', 'last_touch_campaign_type']) }},\n shopify_daily.source_relation as shopify_source_relation,\n\n {{ dbt_utils.star(from=ref('int__daily_klaviyo_user_metrics'), relation_alias='klaviyo_daily', prefix='klaviyo_',\n except=['source_relation','date_day', 'email', 'variation_id', 'flow_name', 'campaign_name', 'last_touch_flow_id', 'last_touch_campaign_id', 'campaign_subject_line', 'campaign_type']) }},\n klaviyo_daily.source_relation as klaviyo_source_relation\n\n from shopify_daily\n full outer join klaviyo_daily\n on lower(shopify_daily.email) = lower(klaviyo_daily.email)\n and shopify_daily.date_day = klaviyo_daily.date_day\n)\n\nselect *\nfrom combine_histories", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": ["model.shopify_holistic_reporting.int__daily_shopify_customer_orders", "model.shopify_holistic_reporting.int__daily_klaviyo_user_metrics", "model.shopify_holistic_reporting.int__daily_shopify_customer_orders", "model.shopify_holistic_reporting.int__daily_klaviyo_user_metrics"]}, "config": {"enabled": true, "alias": null, "schema": "shopify_holistic", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_shopify_holistic", "fqn": ["shopify_holistic_reporting", "shopify_holistic_reporting__daily_customer_metrics"], "unique_id": "model.shopify_holistic_reporting.shopify_holistic_reporting__daily_customer_metrics", "package_name": "shopify_holistic_reporting", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_holistic_reporting", "path": "shopify_holistic_reporting__daily_customer_metrics.sql", "original_file_path": "models/shopify_holistic_reporting__daily_customer_metrics.sql", "name": "shopify_holistic_reporting__daily_customer_metrics", "alias": "shopify_holistic_reporting__daily_customer_metrics", "checksum": {"name": "sha256", "checksum": "971dcdccf88ae613b19a18bff1ebb515f480d4fd5fb1c4ae1c8cfb3c0d07072d"}, "tags": [], "refs": [["int__daily_shopify_customer_orders"], ["int__daily_klaviyo_user_metrics"], ["int__daily_shopify_customer_orders"], ["int__daily_klaviyo_user_metrics"]], "sources": [], "metrics": [], "description": "Table that aggregates Shopify and Klaviyo metrics to the day-customer-campaign or day-customer-flow grain (but note that if a user interacts with 2 different variations of a flow/campaign somehow, they will have 2 records). Also note that non-attributed (to Klaviyo at least) orders and interactions (someone with null campaign_id/flow_id) are included in this table. \nFor **Klaviyo**: **Counts** of the instances of the events, as well as **sums** of the numeric value associated with events (i.e. revenue) will be pivoted out into columns, as configured by the `klaviyo__count_metrics` and `klaviyo__sum_revenue_metrics` variables, respectively. See the dbt_project.yml file for the default metrics used. These columns will be prefixed with `count_` and `sum_revenue_`.\nNote that 0-activity days will not appear. \n", "columns": {"date_day": {"name": "date_day", "description": "Day on which the customer performed these activities.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email": {"name": "email", "description": "Email address of the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Foreign key referencing the CAMPAIGN attributed with these metrics (by the package's attribution model).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_id": {"name": "flow_id", "description": "Foreign key referencing the FLOW attributed with these metrics (by the package's attribution model).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_name": {"name": "campaign_name", "description": "Name of the attributed campaign. If not specified, this will default to the subject of the campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_name": {"name": "flow_name", "description": "Name of the attributed flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variation_id": {"name": "variation_id", "description": "Unique ID of the attributed flow or campaign variation group. This does not map onto another table. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_first_event_at": {"name": "klaviyo_first_event_at", "description": "Timestamp of the first interaction between this campaign/flow and a person on this day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_last_event_at": {"name": "klaviyo_last_event_at", "description": "Timestamp of the last interaction between this campaign/flow and a person on this day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_subject_line": {"name": "campaign_subject_line", "description": "Email subject line of the Klaviyo campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_type": {"name": "campaign_type", "description": "Type of campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_source_relation": {"name": "shopify_source_relation", "description": "The source where this Shopify data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioning together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_source_relation": {"name": "klaviyo_source_relation", "description": "The source where this Klaviyo data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioning together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_total_orders": {"name": "shopify_total_orders", "description": "Total number of orders the customer placed on this day, associated with this campaign or flow. Includes canceled orders.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_total_price": {"name": "shopify_total_price", "description": "Total adjusted price the customer paid on this day, associated with this campaign or flow, in shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_count_line_items": {"name": "shopify_count_line_items", "description": "The count of order line items the customer placed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_total_line_items_price": {"name": "shopify_total_line_items_price", "description": "The sum of all line item prices in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_total_discounts": {"name": "shopify_total_discounts", "description": "The sum of discounts applied to the customer's orders, in shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_total_tax": {"name": "shopify_total_tax", "description": "The sum of taxes paid by the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_total_shipping_cost": {"name": "shopify_total_shipping_cost", "description": "The sum of shipping costs paid.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_total_refund_subtotal": {"name": "shopify_total_refund_subtotal", "description": "Total amount refunded by the customer. Note that that `date_day` will be when the order was created, not refunded.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_total_refund_tax": {"name": "shopify_total_refund_tax", "description": "Total tax applied to the customer's refunds.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_count_cancelled_orders": {"name": "shopify_count_cancelled_orders", "description": "The count of orders that the customer made on this day and canceled.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_count_products": {"name": "shopify_count_products", "description": "The count of distinct products (based on distinct `product_ids`) that the customer purchased.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_count_product_variants": {"name": "shopify_count_product_variants", "description": "The count of distinct products variants that the customer purchased.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_sum_quantity": {"name": "shopify_sum_quantity", "description": "The total quantity of items that the customer purchased.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_total_order_adjustment_amount": {"name": "shopify_total_order_adjustment_amount", "description": "The total amount of adjustments made to the customer's orders.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_total_order_adjustment_tax_amount": {"name": "shopify_total_order_adjustment_tax_amount", "description": "The total amount of taxes applied to adjustments made to the customer's orders.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify_holistic_reporting://models/shopify_holistic_reporting.yml", "compiled_path": "target/compiled/shopify_holistic_reporting/models/shopify_holistic_reporting__daily_customer_metrics.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "shopify_holistic"}, "created_at": 1665702405.295847, "compiled_sql": "with shopify_daily as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_shopify_holistic`.`int__daily_shopify_customer_orders`\n\n), klaviyo_daily as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_shopify_holistic`.`int__daily_klaviyo_user_metrics`\n\n), combine_histories as (\n\n select \n coalesce(shopify_daily.date_day, klaviyo_daily.date_day) as date_day,\n coalesce(shopify_daily.email, klaviyo_daily.email) as email,\n\n -- when the below is null, these are unattributed actions\n coalesce(shopify_daily.last_touch_campaign_id, klaviyo_daily.last_touch_campaign_id) as campaign_id,\n coalesce(shopify_daily.last_touch_flow_id, klaviyo_daily.last_touch_flow_id) as flow_id,\n coalesce(shopify_daily.last_touch_campaign_name, klaviyo_daily.campaign_name) as campaign_name,\n coalesce(shopify_daily.last_touch_flow_name, klaviyo_daily.flow_name) as flow_name,\n coalesce(shopify_daily.last_touch_variation_id, klaviyo_daily.variation_id) as variation_id,\n coalesce(shopify_daily.last_touch_campaign_subject_line, klaviyo_daily.campaign_subject_line) as campaign_subject_line,\n coalesce(shopify_daily.last_touch_campaign_type, klaviyo_daily.campaign_type) as campaign_type,\n \n *,\n shopify_daily.source_relation as shopify_source_relation,\n\n *,\n klaviyo_daily.source_relation as klaviyo_source_relation\n\n from shopify_daily\n full outer join klaviyo_daily\n on lower(shopify_daily.email) = lower(klaviyo_daily.email)\n and shopify_daily.date_day = klaviyo_daily.date_day\n)\n\nselect *\nfrom combine_histories", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_shopify_holistic`.`shopify_holistic_reporting__daily_customer_metrics`"}, "model.shopify_holistic_reporting.int__daily_shopify_customer_orders": {"raw_sql": "with orders as (\n\n select *\n from {{ ref('shopify_holistic_reporting__orders_attribution') }}\n\n), order_lines as (\n\n select *\n from {{ ref('shopify__order_lines') }}\n\n), order_line_metrics as (\n\n select \n order_id,\n source_relation,\n count(distinct product_id) as count_products,\n count(distinct product_id || '-' || variant_id) as count_product_variants,\n sum(quantity) as sum_quantity\n \n from order_lines\n group by 1,2\n\n), join_orders as (\n\n select \n orders.*,\n order_line_metrics.count_products,\n order_line_metrics.count_product_variants,\n order_line_metrics.sum_quantity\n\n from orders \n left join order_line_metrics\n on orders.order_id = order_line_metrics.order_id\n and orders.shopify_source_relation = order_line_metrics.source_relation\n\n), daily_order_metrics as (\n\n select\n cast( {{ dbt_utils.date_trunc('day', 'created_timestamp') }} as date) as date_day,\n email,\n last_touch_campaign_id,\n last_touch_flow_id,\n last_touch_campaign_name,\n last_touch_flow_name,\n last_touch_variation_id,\n last_touch_campaign_subject_line,\n last_touch_campaign_type,\n shopify_source_relation as source_relation,\n\n count(distinct order_id) as total_orders,\n sum(order_adjusted_total) as total_price,\n\n sum(line_item_count) as count_line_items,\n sum(total_line_items_price) as total_line_items_price,\n \n\n sum(total_discounts) as total_discounts,\n sum(total_tax) as total_tax,\n sum(shipping_cost) as total_shipping_cost,\n\n {% if fivetran_utils.enabled_vars(vars=[\"shopify__using_order_line_refund\", \"shopify__using_refund\"]) %}\n sum(refund_subtotal) as total_refund_subtotal,\n sum(refund_total_tax) as total_refund_tax,\n {% endif %}\n\n sum(case when cancelled_timestamp is not null then 1 else 0 end) as count_cancelled_orders,\n sum(count_products) as count_products,\n sum(count_product_variants) as count_product_variants,\n sum(sum_quantity) as sum_quantity\n\n {% if var('shopify__using_order_adjustment', true) %}\n , sum(order_adjustment_amount) as total_order_adjustment_amount\n , sum(order_adjustment_tax_amount) as total_order_adjustment_tax_amount\n {% endif %}\n \n\n from join_orders\n {{ dbt_utils.group_by(n=10)}}\n)\n\nselect *\nfrom daily_order_metrics", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt_utils.date_trunc", "macro.fivetran_utils.enabled_vars", "macro.dbt_utils.group_by"], "nodes": ["model.shopify_holistic_reporting.shopify_holistic_reporting__orders_attribution", "model.shopify.shopify__order_lines"]}, "config": {"enabled": true, "alias": null, "schema": "shopify_holistic", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_shopify_holistic", "fqn": ["shopify_holistic_reporting", "intermediate", "int__daily_shopify_customer_orders"], "unique_id": "model.shopify_holistic_reporting.int__daily_shopify_customer_orders", "package_name": "shopify_holistic_reporting", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_holistic_reporting", "path": "intermediate/int__daily_shopify_customer_orders.sql", "original_file_path": "models/intermediate/int__daily_shopify_customer_orders.sql", "name": "int__daily_shopify_customer_orders", "alias": "int__daily_shopify_customer_orders", "checksum": {"name": "sha256", "checksum": "d72f384b963f98264127d5e031e2e30ac3cafbc48bbf79494b80bd8367e1b0a2"}, "tags": [], "refs": [["shopify_holistic_reporting__orders_attribution"], ["shopify__order_lines"]], "sources": [], "metrics": [], "description": "", "columns": {"date_day": {"name": "date_day", "description": "Day on which the customer performed these activities.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email": {"name": "email", "description": "Email address of the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_campaign_id": {"name": "last_touch_campaign_id", "description": "Foreign key referencing the CAMPAIGN attributed with these metrics (by the package's attribution model).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_flow_id": {"name": "last_touch_flow_id", "description": "Foreign key referencing the FLOW attributed with these metrics (by the package's attribution model).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_campaign_name": {"name": "last_touch_campaign_name", "description": "Name of the attributed campaign. If not specified, this will default to the subject of the campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_flow_name": {"name": "last_touch_flow_name", "description": "Name of the attributed flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_variation_id": {"name": "last_touch_variation_id", "description": "Unique ID of the attributed flow or campaign variation group. This does not map onto another table. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_campaign_subject_line": {"name": "last_touch_campaign_subject_line", "description": "Email subject line of the Klaviyo campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_campaign_type": {"name": "last_touch_campaign_type", "description": "Type of campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_relation": {"name": "source_relation", "description": "The source where this Shopify data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioning together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_orders": {"name": "total_orders", "description": "Total number of orders the customer placed on this day, associated with this campaign or flow. Includes canceled orders.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_price": {"name": "total_price", "description": "Total adjusted price the customer paid on this day, associated with this campaign or flow, in shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "count_line_items": {"name": "count_line_items", "description": "The count of order line items the customer placed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_line_items_price": {"name": "total_line_items_price", "description": "The sum of all line item prices in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_discounts": {"name": "total_discounts", "description": "The sum of discounts applied to the customer's orders, in shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_tax": {"name": "total_tax", "description": "The sum of taxes paid by the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_shipping_cost": {"name": "total_shipping_cost", "description": "The sum of shipping costs paid.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_refund_subtotal": {"name": "total_refund_subtotal", "description": "Total amount refunded by the customer. Note that that `date_day` will be when the order was created, not refunded.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_refund_tax": {"name": "total_refund_tax", "description": "Total tax applied to the customer's refunds.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "count_cancelled_orders": {"name": "count_cancelled_orders", "description": "The count of orders that the customer made on this day and canceled.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "count_products": {"name": "count_products", "description": "The count of distinct products (based on distinct `product_ids`) that the customer purchased.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "count_product_variants": {"name": "count_product_variants", "description": "The count of distinct products variants that the customer purchased.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "sum_quantity": {"name": "sum_quantity", "description": "The total quantity of items that the customer purchased.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_order_adjustment_amount": {"name": "total_order_adjustment_amount", "description": "The total amount of adjustments made to the customer's orders.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_order_adjustment_tax_amount": {"name": "total_order_adjustment_tax_amount", "description": "The total amount of taxes applied to adjustments made to the customer's orders.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify_holistic_reporting://models/intermediate/int_shopify_holistic_reporting.yml", "compiled_path": "target/compiled/shopify_holistic_reporting/models/intermediate/int__daily_shopify_customer_orders.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "shopify_holistic"}, "created_at": 1665702405.3217468, "compiled_sql": "with orders as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_shopify_holistic`.`shopify_holistic_reporting__orders_attribution`\n\n), order_lines as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_shopify`.`shopify__order_lines`\n\n), order_line_metrics as (\n\n select \n order_id,\n source_relation,\n count(distinct product_id) as count_products,\n count(distinct product_id || '-' || variant_id) as count_product_variants,\n sum(quantity) as sum_quantity\n \n from order_lines\n group by 1,2\n\n), join_orders as (\n\n select \n orders.*,\n order_line_metrics.count_products,\n order_line_metrics.count_product_variants,\n order_line_metrics.sum_quantity\n\n from orders \n left join order_line_metrics\n on orders.order_id = order_line_metrics.order_id\n and orders.shopify_source_relation = order_line_metrics.source_relation\n\n), daily_order_metrics as (\n\n select\n cast( timestamp_trunc(\n cast(created_timestamp as timestamp),\n day\n ) as date) as date_day,\n email,\n last_touch_campaign_id,\n last_touch_flow_id,\n last_touch_campaign_name,\n last_touch_flow_name,\n last_touch_variation_id,\n last_touch_campaign_subject_line,\n last_touch_campaign_type,\n shopify_source_relation as source_relation,\n\n count(distinct order_id) as total_orders,\n sum(order_adjusted_total) as total_price,\n\n sum(line_item_count) as count_line_items,\n sum(total_line_items_price) as total_line_items_price,\n \n\n sum(total_discounts) as total_discounts,\n sum(total_tax) as total_tax,\n sum(shipping_cost) as total_shipping_cost,\n\n \n sum(refund_subtotal) as total_refund_subtotal,\n sum(refund_total_tax) as total_refund_tax,\n \n\n sum(case when cancelled_timestamp is not null then 1 else 0 end) as count_cancelled_orders,\n sum(count_products) as count_products,\n sum(count_product_variants) as count_product_variants,\n sum(sum_quantity) as sum_quantity\n\n \n , sum(order_adjustment_amount) as total_order_adjustment_amount\n , sum(order_adjustment_tax_amount) as total_order_adjustment_tax_amount\n \n \n\n from join_orders\n group by 1,2,3,4,5,6,7,8,9,10\n)\n\nselect *\nfrom daily_order_metrics", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_shopify_holistic`.`int__daily_shopify_customer_orders`"}, "model.shopify_holistic_reporting.int__shopify_customer_rollup": {"raw_sql": "with customers as (\n\n select \n *,\n row_number() over(partition by email order by created_timestamp desc) as customer_index\n\n from {{ ref('shopify__customers') }}\n\n where email is not null -- nonsensical to include any null emails in this package\n\n), aggregate_customers as (\n\n select\n lower(email) as email,\n source_relation,\n {{ fivetran_utils.string_agg(\"cast(customer_id as \" ~ dbt_utils.type_string() ~ \")\", \"', '\") }} as customer_ids,\n {{ fivetran_utils.string_agg(\"distinct cast(phone as \" ~ dbt_utils.type_string() ~ \")\", \"', '\") }} as phone_numbers,\n\n max(case when customer_index = 1 then first_name || ' ' || last_name else null end) as full_name,\n\n min(created_timestamp) as first_shopify_account_made_at,\n max(created_timestamp) as last_shopify_account_made_at,\n min(first_order_timestamp) as first_order_at,\n max(most_recent_order_timestamp) as last_order_at,\n max(updated_timestamp) as last_updated_at,\n\n -- sum across accounts\n sum(lifetime_total_spent) as lifetime_total_spent,\n sum(lifetime_total_refunded) as lifetime_total_refunded,\n sum(lifetime_total_amount) as lifetime_total_amount,\n sum(lifetime_count_orders) as lifetime_count_orders,\n case \n when sum(lifetime_count_orders) = 0 then 0\n else sum(lifetime_total_spent) / sum(lifetime_count_orders) end as average_order_value,\n\n -- take true if ever given for boolean fields\n {{ fivetran_utils.max_bool(\"has_accepted_marketing\") }} as has_accepted_marketing,\n {{ fivetran_utils.max_bool(\"case when customer_index = 1 then is_tax_exempt else null end\") }} as is_tax_exempt, -- since this changes every year\n {{ fivetran_utils.max_bool(\"is_verified_email\") }} as is_verified_email,\n\n -- other stuff\n max(case when customer_index = 1 then default_address_id else null end) as default_address_id,\n max(case when customer_index = 1 then account_state else null end) as account_state\n\n -- ok let's get any custom passthrough columns! might want to put all max(Case when)'s in here....\n {% set cols = adapter.get_columns_in_relation(ref('shopify__customers')) %}\n {% set except_cols = ['_fivetran_synced', 'email', 'source_relation', 'customer_id', 'phone', 'first_name', 'last_name', 'created_timestamp', 'first_order_timestamp', 'most_recent_order_timestamp',\n 'updated_timestamp', 'lifetime_total_spent', 'lifetime_total_refunded', 'lifetime_total_amount', 'lifetime_count_orders', 'average_order_value', 'has_accepted_marketing',\n 'is_tax_exempt', 'is_verified_email', 'default_address_id', 'account_state'] %}\n {% for col in cols %}\n {% if col.column|lower not in except_cols %}\n , max(case when customer_index = 1 then {{ col.column }} else null end) as {{ col.column }}\n {% endif %}\n {% endfor %}\n\n from customers \n\n group by 1,2\n\n)\n\nselect *\nfrom aggregate_customers", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt_utils.type_string", "macro.fivetran_utils.string_agg", "macro.fivetran_utils.max_bool"], "nodes": ["model.shopify.shopify__customers", "model.shopify.shopify__customers"]}, "config": {"enabled": true, "alias": null, "schema": "shopify_holistic", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_shopify_holistic", "fqn": ["shopify_holistic_reporting", "intermediate", "int__shopify_customer_rollup"], "unique_id": "model.shopify_holistic_reporting.int__shopify_customer_rollup", "package_name": "shopify_holistic_reporting", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_holistic_reporting", "path": "intermediate/int__shopify_customer_rollup.sql", "original_file_path": "models/intermediate/int__shopify_customer_rollup.sql", "name": "int__shopify_customer_rollup", "alias": "int__shopify_customer_rollup", "checksum": {"name": "sha256", "checksum": "4ee4ea4a1e004aa732004a879fff8a885afe00f56e679b43ae87032740905bff"}, "tags": [], "refs": [["shopify__customers"], ["shopify__customers"]], "sources": [], "metrics": [], "description": "Table rolling up shopify customer accounts to the email level. In theory, these should be 1:1, but under certain circumstances (ie bots) one email can be associated with multiple customer_ids.\n", "columns": {"source_relation": {"name": "source_relation", "description": "The source where this data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioning together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "has_accepted_marketing": {"name": "has_accepted_marketing", "description": "Whether the customer has consented to receive marketing material via email.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_shopify_account_made_at": {"name": "first_shopify_account_made_at", "description": "The date and time when the customer account first associated with this email was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_shopify_account_made_at": {"name": "last_shopify_account_made_at", "description": "The date and time when the customer account first associated with this email was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "default_address_id": {"name": "default_address_id", "description": "The default address for the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email": {"name": "email", "description": "The unique email address of the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "full_name": {"name": "full_name", "description": "The customer's full name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "customer_ids": {"name": "customer_ids", "description": "A comma-separated aggregated list of Shopify IDs for the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "lifetime_count_orders": {"name": "lifetime_count_orders", "description": "The number of orders associated with this customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "phone_numbers": {"name": "phone_numbers", "description": "Comma separated aggregated list of unique phone numbers (E.164 format) for this customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "account_state": {"name": "account_state", "description": "The state of the customer's account with a shop.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_tax_exempt": {"name": "is_tax_exempt", "description": "Whether the customer is exempt from paying taxes on their order. If true, then taxes won't be applied to an order at checkout. If false, then taxes will be applied at checkout.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_updated_at": {"name": "last_updated_at", "description": "The date and time when the customer information was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_order_at": {"name": "first_order_at", "description": "The timestamp the customer completed their first order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_order_at": {"name": "last_order_at", "description": "The timestamp the customer completed their most recent order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "average_order_value": {"name": "average_order_value", "description": "The average order value for the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "lifetime_total_spent": {"name": "lifetime_total_spent", "description": "The total amount of money that the customer has spent on orders across their order history.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "lifetime_total_refunded": {"name": "lifetime_total_refunded", "description": "The total amount of money that the customer has been refunded on orders across their order history.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "lifetime_total_amount": {"name": "lifetime_total_amount", "description": "The total amount of money (minus refunds) that the customer has spent across their order history.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_verified_email": {"name": "is_verified_email", "description": "Whether the customer has verified their email address.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify_holistic_reporting://models/intermediate/int_shopify_holistic_reporting.yml", "compiled_path": "target/compiled/shopify_holistic_reporting/models/intermediate/int__shopify_customer_rollup.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "shopify_holistic"}, "created_at": 1665702405.324471, "compiled_sql": "with customers as (\n\n select \n *,\n row_number() over(partition by email order by created_timestamp desc) as customer_index\n\n from `dbt-package-testing`.`linkedin_integration_tests_shopify`.`shopify__customers`\n\n where email is not null -- nonsensical to include any null emails in this package\n\n), aggregate_customers as (\n\n select\n lower(email) as email,\n source_relation,\n \n string_agg(cast(customer_id as \n string\n), ', ')\n\n as customer_ids,\n \n string_agg(distinct cast(phone as \n string\n), ', ')\n\n as phone_numbers,\n\n max(case when customer_index = 1 then first_name || ' ' || last_name else null end) as full_name,\n\n min(created_timestamp) as first_shopify_account_made_at,\n max(created_timestamp) as last_shopify_account_made_at,\n min(first_order_timestamp) as first_order_at,\n max(most_recent_order_timestamp) as last_order_at,\n max(updated_timestamp) as last_updated_at,\n\n -- sum across accounts\n sum(lifetime_total_spent) as lifetime_total_spent,\n sum(lifetime_total_refunded) as lifetime_total_refunded,\n sum(lifetime_total_amount) as lifetime_total_amount,\n sum(lifetime_count_orders) as lifetime_count_orders,\n case \n when sum(lifetime_count_orders) = 0 then 0\n else sum(lifetime_total_spent) / sum(lifetime_count_orders) end as average_order_value,\n\n -- take true if ever given for boolean fields\n \n\n max( has_accepted_marketing )\n\n as has_accepted_marketing,\n \n\n max( case when customer_index = 1 then is_tax_exempt else null end )\n\n as is_tax_exempt, -- since this changes every year\n \n\n max( is_verified_email )\n\n as is_verified_email,\n\n -- other stuff\n max(case when customer_index = 1 then default_address_id else null end) as default_address_id,\n max(case when customer_index = 1 then account_state else null end) as account_state\n\n -- ok let's get any custom passthrough columns! might want to put all max(Case when)'s in here....\n \n \n \n\n from customers \n\n group by 1,2\n\n)\n\nselect *\nfrom aggregate_customers", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_shopify_holistic`.`int__shopify_customer_rollup`"}, "model.shopify_holistic_reporting.int__daily_klaviyo_user_metrics": {"raw_sql": "with events as (\n\n select *\n from {{ ref('klaviyo__events') }}\n\n), pivot_out_events as (\n \n select \n cast( {{ dbt_utils.date_trunc('day', 'occurred_at') }} as date) as date_day,\n person_email as email,\n last_touch_campaign_id,\n last_touch_flow_id,\n campaign_name,\n flow_name,\n variation_id,\n campaign_subject_line,\n campaign_type,\n source_relation,\n min(occurred_at) as first_event_at,\n max(occurred_at) as last_event_at\n\n -- sum up the numeric value associated with events (most likely will mean revenue)\n {% for rm in var('klaviyo__sum_revenue_metrics') %}\n , sum(case when lower(type) = '{{ rm | lower }}' then \n coalesce({{ fivetran_utils.try_cast(\"numeric_value\", \"numeric\") }}, 0)\n else 0 end) \n as {{ 'sum_revenue_' ~ rm | replace(' ', '_') | replace('(', '') | replace(')', '') | lower }} -- removing special characters that I have seen in different integration events\n {% endfor %}\n\n -- count up the number of instances of each metric\n {% for cm in var('klaviyo__count_metrics') %}\n , sum(case when lower(type) = '{{ cm | lower }}' then 1 else 0 end) \n as {{ 'count_' ~ cm | replace(' ', '_') | replace('(', '') | replace(')', '') | lower }} -- removing special characters that I have seen in different integration events\n {% endfor %}\n\n from events\n {{ dbt_utils.group_by(n=10) }}\n)\n\n-- the grain will be person-flow-campaign-variation-day\nselect *\nfrom pivot_out_events", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt_utils.date_trunc", "macro.fivetran_utils.try_cast", "macro.dbt_utils.group_by"], "nodes": ["model.klaviyo.klaviyo__events"]}, "config": {"enabled": true, "alias": null, "schema": "shopify_holistic", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_shopify_holistic", "fqn": ["shopify_holistic_reporting", "intermediate", "int__daily_klaviyo_user_metrics"], "unique_id": "model.shopify_holistic_reporting.int__daily_klaviyo_user_metrics", "package_name": "shopify_holistic_reporting", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_holistic_reporting", "path": "intermediate/int__daily_klaviyo_user_metrics.sql", "original_file_path": "models/intermediate/int__daily_klaviyo_user_metrics.sql", "name": "int__daily_klaviyo_user_metrics", "alias": "int__daily_klaviyo_user_metrics", "checksum": {"name": "sha256", "checksum": "9074aea6aba5dc661a9c2bf48cfddff3d94f7729b5ce0fd29316de663883d7b8"}, "tags": [], "refs": [["klaviyo__events"]], "sources": [], "metrics": [], "description": "", "columns": {"date_day": {"name": "date_day", "description": "Day on which the customer performed these activities.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email": {"name": "email", "description": "Email address of the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_campaign_id": {"name": "last_touch_campaign_id", "description": "Foreign key referencing the CAMPAIGN attributed with these metrics (by the package's attribution model).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_flow_id": {"name": "last_touch_flow_id", "description": "Foreign key referencing the FLOW attributed with these metrics (by the package's attribution model).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_name": {"name": "campaign_name", "description": "Name of the attributed campaign. If not specified, this will default to the subject of the campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_name": {"name": "flow_name", "description": "Name of the attributed flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variation_id": {"name": "variation_id", "description": "Unique ID of the attributed flow or campaign variation group. This does not map onto another table. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_event_at": {"name": "first_event_at", "description": "Timestamp of the first interaction between this campaign/flow and a person on this day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_event_at": {"name": "last_event_at", "description": "Timestamp of the last interaction between this campaign/flow and a person on this day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_subject_line": {"name": "campaign_subject_line", "description": "Email subject line of the Klaviyo campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_type": {"name": "campaign_type", "description": "Type of campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_relation": {"name": "source_relation", "description": "The source where this Klaviyo data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioning together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify_holistic_reporting://models/intermediate/int_shopify_holistic_reporting.yml", "compiled_path": "target/compiled/shopify_holistic_reporting/models/intermediate/int__daily_klaviyo_user_metrics.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "shopify_holistic"}, "created_at": 1665702405.3182101, "compiled_sql": "with events as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_klaviyo`.`klaviyo__events`\n\n), pivot_out_events as (\n \n select \n cast( timestamp_trunc(\n cast(occurred_at as timestamp),\n day\n ) as date) as date_day,\n person_email as email,\n last_touch_campaign_id,\n last_touch_flow_id,\n campaign_name,\n flow_name,\n variation_id,\n campaign_subject_line,\n campaign_type,\n source_relation,\n min(occurred_at) as first_event_at,\n max(occurred_at) as last_event_at\n\n -- sum up the numeric value associated with events (most likely will mean revenue)\n \n , sum(case when lower(type) = 'refunded order' then \n coalesce(\n \n safe_cast(numeric_value as numeric)\n\n, 0)\n else 0 end) \n as sum_revenue_refunded_order -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'placed order' then \n coalesce(\n \n safe_cast(numeric_value as numeric)\n\n, 0)\n else 0 end) \n as sum_revenue_placed_order -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'ordered product' then \n coalesce(\n \n safe_cast(numeric_value as numeric)\n\n, 0)\n else 0 end) \n as sum_revenue_ordered_product -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'checkout started' then \n coalesce(\n \n safe_cast(numeric_value as numeric)\n\n, 0)\n else 0 end) \n as sum_revenue_checkout_started -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'cancelled order' then \n coalesce(\n \n safe_cast(numeric_value as numeric)\n\n, 0)\n else 0 end) \n as sum_revenue_cancelled_order -- removing special characters that I have seen in different integration events\n \n\n -- count up the number of instances of each metric\n \n , sum(case when lower(type) = 'active on site' then 1 else 0 end) \n as count_active_on_site -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'viewed product' then 1 else 0 end) \n as count_viewed_product -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'ordered product' then 1 else 0 end) \n as count_ordered_product -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'placed order' then 1 else 0 end) \n as count_placed_order -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'refunded order' then 1 else 0 end) \n as count_refunded_order -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'received email' then 1 else 0 end) \n as count_received_email -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'clicked email' then 1 else 0 end) \n as count_clicked_email -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'opened email' then 1 else 0 end) \n as count_opened_email -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'marked email as spam' then 1 else 0 end) \n as count_marked_email_as_spam -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'unsubscribed' then 1 else 0 end) \n as count_unsubscribed -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'received sms' then 1 else 0 end) \n as count_received_sms -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'clicked sms' then 1 else 0 end) \n as count_clicked_sms -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'sent sms' then 1 else 0 end) \n as count_sent_sms -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'unsubscribed from sms' then 1 else 0 end) \n as count_unsubscribed_from_sms -- removing special characters that I have seen in different integration events\n \n\n from events\n group by 1,2,3,4,5,6,7,8,9,10\n)\n\n-- the grain will be person-flow-campaign-variation-day\nselect *\nfrom pivot_out_events", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_shopify_holistic`.`int__daily_klaviyo_user_metrics`"}, "model.shopify_holistic_reporting.int__klaviyo_person_rollup": {"raw_sql": "with persons as (\n\n select\n *,\n row_number() over (partition by email order by created_at desc) as person_index\n \n from {{ ref('klaviyo__persons') }}\n where email is not null -- should never be the case but just in case\n\n), aggregate_persons as (\n\n select \n lower(email) as email,\n source_relation,\n {{ fivetran_utils.string_agg(\"person_id\", \"', '\") }} as person_ids,\n {{ fivetran_utils.string_agg(\"distinct cast(phone_number as \" ~ dbt_utils.type_string() ~ \")\", \"', '\") }} as phone_numbers,\n max( case when person_index = 1 then full_name else null end) as full_name,\n \n min(created_at) as first_klaviyo_account_made_at,\n max(created_at) as last_klaviyo_account_made_at,\n max(updated_at) as last_updated_at,\n min(first_event_at) as first_event_at,\n max(last_event_at) as last_event_at,\n min(first_campaign_touch_at) as first_campaign_touch_at,\n max(last_campaign_touch_at) as last_campaign_touch_at,\n min(first_flow_touch_at) as first_flow_touch_at,\n max(last_flow_touch_at) as last_flow_touch_at,\n\n sum(count_total_campaigns) as count_total_campaigns,\n sum(count_total_flows) as count_total_flows\n\n\n {% set cols = adapter.get_columns_in_relation(ref('klaviyo__persons')) %}\n {% set except_cols = ['_fivetran_synced', 'email', 'source_relation', 'person_id', 'phone_number', 'full_name', 'created_at', 'updated_at', 'count_total_campaigns', 'count_total_flows',\n 'first_event_at', 'last_event_at', 'first_campaign_touch_at', 'last_campaign_touch_at', 'first_flow_touch_at', 'last_flow_touch_at'] %}\n {% for col in cols %}\n {% if col.column|lower not in except_cols %}\n , max(case when person_index = 1 then {{ col.column }} else null end) as {{ col.column }}\n {% endif %}\n {% endfor %}\n\n from persons\n group by 1,2\n)\n\nselect *\nfrom aggregate_persons", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.string_agg", "macro.dbt_utils.type_string"], "nodes": ["model.klaviyo.klaviyo__persons", "model.klaviyo.klaviyo__persons"]}, "config": {"enabled": true, "alias": null, "schema": "shopify_holistic", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_shopify_holistic", "fqn": ["shopify_holistic_reporting", "intermediate", "int__klaviyo_person_rollup"], "unique_id": "model.shopify_holistic_reporting.int__klaviyo_person_rollup", "package_name": "shopify_holistic_reporting", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_holistic_reporting", "path": "intermediate/int__klaviyo_person_rollup.sql", "original_file_path": "models/intermediate/int__klaviyo_person_rollup.sql", "name": "int__klaviyo_person_rollup", "alias": "int__klaviyo_person_rollup", "checksum": {"name": "sha256", "checksum": "45decc1969fef4f4fe0fb7ec2b4531a4a57a160d1610e2fa5f8029173b50414a"}, "tags": [], "refs": [["klaviyo__persons"], ["klaviyo__persons"]], "sources": [], "metrics": [], "description": "Table rolling up Klaviyo person accounts to the email level. In theory, these should certainly be 1:1, but under certain circumstances emails can be sent with multiple person_ids from the Klaviyo API.\n", "columns": {"source_relation": {"name": "source_relation", "description": "The source where this data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioning together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email": {"name": "email", "description": "The email address and the unique identifier for a profile.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "person_ids": {"name": "person_ids", "description": "A comma-separated aggregated list of Klaviyo IDs for the person.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "phone_numbers": {"name": "phone_numbers", "description": "Comma separated aggregated list of unique phone numbers for this person.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "full_name": {"name": "full_name", "description": "Person's full name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_klaviyo_account_made_at": {"name": "first_klaviyo_account_made_at", "description": "Timestamp of when the person's profile was first created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_klaviyo_account_made_at": {"name": "last_klaviyo_account_made_at", "description": "Timestamp of when the person's profile was last created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_updated_at": {"name": "last_updated_at", "description": "Timestamp of when the person profile was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_event_at": {"name": "first_event_at", "description": "Timestamp of when the user first triggered an event (not limited to campaign and flow interactions).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_event_at": {"name": "last_event_at", "description": "Timestamp of when the user last triggered an event (not limited to campaign and flow interactions).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_campaign_touch_at": {"name": "first_campaign_touch_at", "description": "Timestamp of when the user first interacted with a campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_campaign_touch_at": {"name": "last_campaign_touch_at", "description": "Timestamp of when the user last interacted with a campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_flow_touch_at": {"name": "first_flow_touch_at", "description": "Timestamp of when the user first interacted with a flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_flow_touch_at": {"name": "last_flow_touch_at", "description": "Timestamp of when the user last interacted with a flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "count_total_campaigns": {"name": "count_total_campaigns", "description": "Count of the number of campaigns this person has interacted with.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "count_total_flows": {"name": "count_total_flows", "description": "Count of the number of flows this person has interacted with.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "address_1": {"name": "address_1", "description": "First line of the person's address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "address_2": {"name": "address_2", "description": "Second line of the person's address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "city": {"name": "city", "description": "City they live in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "country": {"name": "country", "description": "Country they live in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "zip": {"name": "zip", "description": "Postal code where they live.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "latitude": {"name": "latitude", "description": "Latitude of the person's location.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "longitude": {"name": "longitude", "description": "Longitude of the person's location.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization": {"name": "organization", "description": "Business organization they belong to.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "region": {"name": "region", "description": "Region or state they live in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "timezone": {"name": "timezone", "description": "Timezone they are situated in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "title": {"name": "title", "description": "Title at their business or organization.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify_holistic_reporting://models/intermediate/int_shopify_holistic_reporting.yml", "compiled_path": "target/compiled/shopify_holistic_reporting/models/intermediate/int__klaviyo_person_rollup.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "shopify_holistic"}, "created_at": 1665702405.3281338, "compiled_sql": "with persons as (\n\n select\n *,\n row_number() over (partition by email order by created_at desc) as person_index\n \n from `dbt-package-testing`.`linkedin_integration_tests_klaviyo`.`klaviyo__persons`\n where email is not null -- should never be the case but just in case\n\n), aggregate_persons as (\n\n select \n lower(email) as email,\n source_relation,\n \n string_agg(person_id, ', ')\n\n as person_ids,\n \n string_agg(distinct cast(phone_number as \n string\n), ', ')\n\n as phone_numbers,\n max( case when person_index = 1 then full_name else null end) as full_name,\n \n min(created_at) as first_klaviyo_account_made_at,\n max(created_at) as last_klaviyo_account_made_at,\n max(updated_at) as last_updated_at,\n min(first_event_at) as first_event_at,\n max(last_event_at) as last_event_at,\n min(first_campaign_touch_at) as first_campaign_touch_at,\n max(last_campaign_touch_at) as last_campaign_touch_at,\n min(first_flow_touch_at) as first_flow_touch_at,\n max(last_flow_touch_at) as last_flow_touch_at,\n\n sum(count_total_campaigns) as count_total_campaigns,\n sum(count_total_flows) as count_total_flows\n\n\n \n \n \n\n from persons\n group by 1,2\n)\n\nselect *\nfrom aggregate_persons", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_shopify_holistic`.`int__klaviyo_person_rollup`"}, "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__customer_customer_id__source_relation.1b2185db25": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_d00da641d0cc06ebef083c43ddfae4be\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["customer_id", "source_relation"], "model": "{{ get_where_subquery(ref('stg_shopify__customer')) }}"}, "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.shopify_source.stg_shopify__customer"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_d00da641d0cc06ebef083c43ddfae4be", "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["shopify_source", "dbt_utils_unique_combination_of_columns_stg_shopify__customer_customer_id__source_relation"], "unique_id": "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__customer_customer_id__source_relation.1b2185db25", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "dbt_utils_unique_combination_o_d00da641d0cc06ebef083c43ddfae4be.sql", "original_file_path": "models/stg_shopify.yml", "name": "dbt_utils_unique_combination_of_columns_stg_shopify__customer_customer_id__source_relation", "alias": "dbt_utils_unique_combination_o_d00da641d0cc06ebef083c43ddfae4be", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_shopify__customer"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/stg_shopify.yml/dbt_utils_unique_combination_o_d00da641d0cc06ebef083c43ddfae4be.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_d00da641d0cc06ebef083c43ddfae4be"}, "created_at": 1665702405.040355, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n customer_id, source_relation\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__customer`\n group by customer_id, source_relation\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_shopify__customer"}, "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_line_refund_order_line_refund_id__source_relation.1877420c29": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_33b2f20dc9ea13a94a10a635383becf3\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["order_line_refund_id", "source_relation"], "model": "{{ get_where_subquery(ref('stg_shopify__order_line_refund')) }}"}, "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.shopify_source.stg_shopify__order_line_refund"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_33b2f20dc9ea13a94a10a635383becf3", "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["shopify_source", "dbt_utils_unique_combination_of_columns_stg_shopify__order_line_refund_order_line_refund_id__source_relation"], "unique_id": "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_line_refund_order_line_refund_id__source_relation.1877420c29", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "dbt_utils_unique_combination_o_33b2f20dc9ea13a94a10a635383becf3.sql", "original_file_path": "models/stg_shopify.yml", "name": "dbt_utils_unique_combination_of_columns_stg_shopify__order_line_refund_order_line_refund_id__source_relation", "alias": "dbt_utils_unique_combination_o_33b2f20dc9ea13a94a10a635383becf3", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_shopify__order_line_refund"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/stg_shopify.yml/dbt_utils_unique_combination_o_33b2f20dc9ea13a94a10a635383becf3.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_33b2f20dc9ea13a94a10a635383becf3"}, "created_at": 1665702405.047092, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n order_line_refund_id, source_relation\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__order_line_refund`\n group by order_line_refund_id, source_relation\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_shopify__order_line_refund"}, "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_line_order_line_id__source_relation.c2797e7a9c": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_d47b5ce640a9316320c17565339223ec\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["order_line_id", "source_relation"], "model": "{{ get_where_subquery(ref('stg_shopify__order_line')) }}"}, "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.shopify_source.stg_shopify__order_line"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_d47b5ce640a9316320c17565339223ec", "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["shopify_source", "dbt_utils_unique_combination_of_columns_stg_shopify__order_line_order_line_id__source_relation"], "unique_id": "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_line_order_line_id__source_relation.c2797e7a9c", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "dbt_utils_unique_combination_o_d47b5ce640a9316320c17565339223ec.sql", "original_file_path": "models/stg_shopify.yml", "name": "dbt_utils_unique_combination_of_columns_stg_shopify__order_line_order_line_id__source_relation", "alias": "dbt_utils_unique_combination_o_d47b5ce640a9316320c17565339223ec", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_shopify__order_line"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/stg_shopify.yml/dbt_utils_unique_combination_o_d47b5ce640a9316320c17565339223ec.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_d47b5ce640a9316320c17565339223ec"}, "created_at": 1665702405.049681, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n order_line_id, source_relation\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__order_line`\n group by order_line_id, source_relation\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_shopify__order_line"}, "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_order_id__source_relation.81d10381c1": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_3f5201314db17428b709b11583cd0f7e\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["order_id", "source_relation"], "model": "{{ get_where_subquery(ref('stg_shopify__order')) }}"}, "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.shopify_source.stg_shopify__order"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_3f5201314db17428b709b11583cd0f7e", "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["shopify_source", "dbt_utils_unique_combination_of_columns_stg_shopify__order_order_id__source_relation"], "unique_id": "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_order_id__source_relation.81d10381c1", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "dbt_utils_unique_combination_o_3f5201314db17428b709b11583cd0f7e.sql", "original_file_path": "models/stg_shopify.yml", "name": "dbt_utils_unique_combination_of_columns_stg_shopify__order_order_id__source_relation", "alias": "dbt_utils_unique_combination_o_3f5201314db17428b709b11583cd0f7e", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_shopify__order"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/stg_shopify.yml/dbt_utils_unique_combination_o_3f5201314db17428b709b11583cd0f7e.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_3f5201314db17428b709b11583cd0f7e"}, "created_at": 1665702405.0522509, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n order_id, source_relation\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__order`\n group by order_id, source_relation\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_shopify__order"}, "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__product_product_id__source_relation.48b32ab6a2": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_eb9efccfbdaff32f938da98287403a1d\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["product_id", "source_relation"], "model": "{{ get_where_subquery(ref('stg_shopify__product')) }}"}, "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.shopify_source.stg_shopify__product"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_eb9efccfbdaff32f938da98287403a1d", "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["shopify_source", "dbt_utils_unique_combination_of_columns_stg_shopify__product_product_id__source_relation"], "unique_id": "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__product_product_id__source_relation.48b32ab6a2", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "dbt_utils_unique_combination_o_eb9efccfbdaff32f938da98287403a1d.sql", "original_file_path": "models/stg_shopify.yml", "name": "dbt_utils_unique_combination_of_columns_stg_shopify__product_product_id__source_relation", "alias": "dbt_utils_unique_combination_o_eb9efccfbdaff32f938da98287403a1d", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_shopify__product"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/stg_shopify.yml/dbt_utils_unique_combination_o_eb9efccfbdaff32f938da98287403a1d.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_eb9efccfbdaff32f938da98287403a1d"}, "created_at": 1665702405.0550249, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n product_id, source_relation\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__product`\n group by product_id, source_relation\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_shopify__product"}, "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__product_variant_variant_id__source_relation.7506695ec0": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_84d19b85e52ebcaca03bcefe4191b60e\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["variant_id", "source_relation"], "model": "{{ get_where_subquery(ref('stg_shopify__product_variant')) }}"}, "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.shopify_source.stg_shopify__product_variant"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_84d19b85e52ebcaca03bcefe4191b60e", "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["shopify_source", "dbt_utils_unique_combination_of_columns_stg_shopify__product_variant_variant_id__source_relation"], "unique_id": "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__product_variant_variant_id__source_relation.7506695ec0", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "dbt_utils_unique_combination_o_84d19b85e52ebcaca03bcefe4191b60e.sql", "original_file_path": "models/stg_shopify.yml", "name": "dbt_utils_unique_combination_of_columns_stg_shopify__product_variant_variant_id__source_relation", "alias": "dbt_utils_unique_combination_o_84d19b85e52ebcaca03bcefe4191b60e", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_shopify__product_variant"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/stg_shopify.yml/dbt_utils_unique_combination_o_84d19b85e52ebcaca03bcefe4191b60e.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_84d19b85e52ebcaca03bcefe4191b60e"}, "created_at": 1665702405.057497, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n variant_id, source_relation\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__product_variant`\n group by variant_id, source_relation\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_shopify__product_variant"}, "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__transaction_transaction_id__source_relation.d55a33652a": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_47aceb0b987e9f3279b4301c10167f92\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["transaction_id", "source_relation"], "model": "{{ get_where_subquery(ref('stg_shopify__transaction')) }}"}, "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.shopify_source.stg_shopify__transaction"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_47aceb0b987e9f3279b4301c10167f92", "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["shopify_source", "dbt_utils_unique_combination_of_columns_stg_shopify__transaction_transaction_id__source_relation"], "unique_id": "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__transaction_transaction_id__source_relation.d55a33652a", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "dbt_utils_unique_combination_o_47aceb0b987e9f3279b4301c10167f92.sql", "original_file_path": "models/stg_shopify.yml", "name": "dbt_utils_unique_combination_of_columns_stg_shopify__transaction_transaction_id__source_relation", "alias": "dbt_utils_unique_combination_o_47aceb0b987e9f3279b4301c10167f92", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_shopify__transaction"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/stg_shopify.yml/dbt_utils_unique_combination_o_47aceb0b987e9f3279b4301c10167f92.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_47aceb0b987e9f3279b4301c10167f92"}, "created_at": 1665702405.060158, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n transaction_id, source_relation\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__transaction`\n group by transaction_id, source_relation\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_shopify__transaction"}, "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__refund_refund_id__source_relation.cd4dbc2b35": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_b6b83918833e84e9f886aa4151e4e659\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["refund_id", "source_relation"], "model": "{{ get_where_subquery(ref('stg_shopify__refund')) }}"}, "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.shopify_source.stg_shopify__refund"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_b6b83918833e84e9f886aa4151e4e659", "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["shopify_source", "dbt_utils_unique_combination_of_columns_stg_shopify__refund_refund_id__source_relation"], "unique_id": "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__refund_refund_id__source_relation.cd4dbc2b35", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "dbt_utils_unique_combination_o_b6b83918833e84e9f886aa4151e4e659.sql", "original_file_path": "models/stg_shopify.yml", "name": "dbt_utils_unique_combination_of_columns_stg_shopify__refund_refund_id__source_relation", "alias": "dbt_utils_unique_combination_o_b6b83918833e84e9f886aa4151e4e659", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_shopify__refund"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/stg_shopify.yml/dbt_utils_unique_combination_o_b6b83918833e84e9f886aa4151e4e659.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_b6b83918833e84e9f886aa4151e4e659"}, "created_at": 1665702405.0627332, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n refund_id, source_relation\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__refund`\n group by refund_id, source_relation\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_shopify__refund"}, "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_adjustment_order_adjustment_id__source_relation.00b7d10cb0": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_8c4679057a756bef5907cd3799634207\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["order_adjustment_id", "source_relation"], "model": "{{ get_where_subquery(ref('stg_shopify__order_adjustment')) }}"}, "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.shopify_source.stg_shopify__order_adjustment"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_8c4679057a756bef5907cd3799634207", "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["shopify_source", "dbt_utils_unique_combination_of_columns_stg_shopify__order_adjustment_order_adjustment_id__source_relation"], "unique_id": "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_adjustment_order_adjustment_id__source_relation.00b7d10cb0", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "dbt_utils_unique_combination_o_8c4679057a756bef5907cd3799634207.sql", "original_file_path": "models/stg_shopify.yml", "name": "dbt_utils_unique_combination_of_columns_stg_shopify__order_adjustment_order_adjustment_id__source_relation", "alias": "dbt_utils_unique_combination_o_8c4679057a756bef5907cd3799634207", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_shopify__order_adjustment"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/stg_shopify.yml/dbt_utils_unique_combination_o_8c4679057a756bef5907cd3799634207.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_8c4679057a756bef5907cd3799634207"}, "created_at": 1665702405.065301, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n order_adjustment_id, source_relation\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__order_adjustment`\n group by order_adjustment_id, source_relation\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_shopify__order_adjustment"}, "test.klaviyo_source.not_null_stg_klaviyo__campaign_campaign_id.5dfc47dc1d": {"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_klaviyo__campaign')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.klaviyo_source.stg_klaviyo__campaign"]}, "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["klaviyo_source", "not_null_stg_klaviyo__campaign_campaign_id"], "unique_id": "test.klaviyo_source.not_null_stg_klaviyo__campaign_campaign_id.5dfc47dc1d", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "not_null_stg_klaviyo__campaign_campaign_id.sql", "original_file_path": "models/stg_klaviyo.yml", "name": "not_null_stg_klaviyo__campaign_campaign_id", "alias": "not_null_stg_klaviyo__campaign_campaign_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_klaviyo__campaign"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo.yml/not_null_stg_klaviyo__campaign_campaign_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1665702405.1435468, "compiled_sql": "\n \n \n\n\n\nselect campaign_id\nfrom `dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__campaign`\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_klaviyo__campaign"}, "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__campaign_campaign_id__source_relation.59158488ff": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_972961dcf9c5c4d5b8e43db578561c26\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["campaign_id", "source_relation"], "model": "{{ get_where_subquery(ref('stg_klaviyo__campaign')) }}"}, "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.klaviyo_source.stg_klaviyo__campaign"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_972961dcf9c5c4d5b8e43db578561c26", "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["klaviyo_source", "dbt_utils_unique_combination_of_columns_stg_klaviyo__campaign_campaign_id__source_relation"], "unique_id": "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__campaign_campaign_id__source_relation.59158488ff", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "dbt_utils_unique_combination_o_972961dcf9c5c4d5b8e43db578561c26.sql", "original_file_path": "models/stg_klaviyo.yml", "name": "dbt_utils_unique_combination_of_columns_stg_klaviyo__campaign_campaign_id__source_relation", "alias": "dbt_utils_unique_combination_o_972961dcf9c5c4d5b8e43db578561c26", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_klaviyo__campaign"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo.yml/dbt_utils_unique_combination_o_972961dcf9c5c4d5b8e43db578561c26.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_972961dcf9c5c4d5b8e43db578561c26"}, "created_at": 1665702405.144762, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n campaign_id, source_relation\n from `dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__campaign`\n group by campaign_id, source_relation\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_klaviyo__campaign"}, "test.klaviyo_source.not_null_stg_klaviyo__event_event_id.7a09ac6ec1": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('stg_klaviyo__event')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.klaviyo_source.stg_klaviyo__event"]}, "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["klaviyo_source", "not_null_stg_klaviyo__event_event_id"], "unique_id": "test.klaviyo_source.not_null_stg_klaviyo__event_event_id.7a09ac6ec1", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "not_null_stg_klaviyo__event_event_id.sql", "original_file_path": "models/stg_klaviyo.yml", "name": "not_null_stg_klaviyo__event_event_id", "alias": "not_null_stg_klaviyo__event_event_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_klaviyo__event"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo.yml/not_null_stg_klaviyo__event_event_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1665702405.1474612, "compiled_sql": "\n \n \n\n\n\nselect event_id\nfrom `dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__event`\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_id", "file_key_name": "models.stg_klaviyo__event"}, "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__event_event_id__source_relation.3778c651d7": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_8881439048410324e034ca08f1ef95fa\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["event_id", "source_relation"], "model": "{{ get_where_subquery(ref('stg_klaviyo__event')) }}"}, "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.klaviyo_source.stg_klaviyo__event"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_8881439048410324e034ca08f1ef95fa", "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["klaviyo_source", "dbt_utils_unique_combination_of_columns_stg_klaviyo__event_event_id__source_relation"], "unique_id": "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__event_event_id__source_relation.3778c651d7", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "dbt_utils_unique_combination_o_8881439048410324e034ca08f1ef95fa.sql", "original_file_path": "models/stg_klaviyo.yml", "name": "dbt_utils_unique_combination_of_columns_stg_klaviyo__event_event_id__source_relation", "alias": "dbt_utils_unique_combination_o_8881439048410324e034ca08f1ef95fa", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_klaviyo__event"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo.yml/dbt_utils_unique_combination_o_8881439048410324e034ca08f1ef95fa.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_8881439048410324e034ca08f1ef95fa"}, "created_at": 1665702405.148426, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n event_id, source_relation\n from `dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__event`\n group by event_id, source_relation\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_klaviyo__event"}, "test.klaviyo_source.not_null_stg_klaviyo__flow_flow_id.a00a897e42": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "flow_id", "model": "{{ get_where_subquery(ref('stg_klaviyo__flow')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.klaviyo_source.stg_klaviyo__flow"]}, "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["klaviyo_source", "not_null_stg_klaviyo__flow_flow_id"], "unique_id": "test.klaviyo_source.not_null_stg_klaviyo__flow_flow_id.a00a897e42", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "not_null_stg_klaviyo__flow_flow_id.sql", "original_file_path": "models/stg_klaviyo.yml", "name": "not_null_stg_klaviyo__flow_flow_id", "alias": "not_null_stg_klaviyo__flow_flow_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_klaviyo__flow"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo.yml/not_null_stg_klaviyo__flow_flow_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1665702405.150979, "compiled_sql": "\n \n \n\n\n\nselect flow_id\nfrom `dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__flow`\nwhere flow_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "flow_id", "file_key_name": "models.stg_klaviyo__flow"}, "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__flow_flow_id__source_relation.015215d481": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_007bf18d3b6d4b25aebcc986dc772270\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["flow_id", "source_relation"], "model": "{{ get_where_subquery(ref('stg_klaviyo__flow')) }}"}, "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.klaviyo_source.stg_klaviyo__flow"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_007bf18d3b6d4b25aebcc986dc772270", "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["klaviyo_source", "dbt_utils_unique_combination_of_columns_stg_klaviyo__flow_flow_id__source_relation"], "unique_id": "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__flow_flow_id__source_relation.015215d481", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "dbt_utils_unique_combination_o_007bf18d3b6d4b25aebcc986dc772270.sql", "original_file_path": "models/stg_klaviyo.yml", "name": "dbt_utils_unique_combination_of_columns_stg_klaviyo__flow_flow_id__source_relation", "alias": "dbt_utils_unique_combination_o_007bf18d3b6d4b25aebcc986dc772270", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_klaviyo__flow"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo.yml/dbt_utils_unique_combination_o_007bf18d3b6d4b25aebcc986dc772270.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_007bf18d3b6d4b25aebcc986dc772270"}, "created_at": 1665702405.15194, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n flow_id, source_relation\n from `dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__flow`\n group by flow_id, source_relation\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_klaviyo__flow"}, "test.klaviyo_source.not_null_stg_klaviyo__integration_integration_id.fe572c5f1b": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "integration_id", "model": "{{ get_where_subquery(ref('stg_klaviyo__integration')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.klaviyo_source.stg_klaviyo__integration"]}, "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["klaviyo_source", "not_null_stg_klaviyo__integration_integration_id"], "unique_id": "test.klaviyo_source.not_null_stg_klaviyo__integration_integration_id.fe572c5f1b", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "not_null_stg_klaviyo__integration_integration_id.sql", "original_file_path": "models/stg_klaviyo.yml", "name": "not_null_stg_klaviyo__integration_integration_id", "alias": "not_null_stg_klaviyo__integration_integration_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_klaviyo__integration"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo.yml/not_null_stg_klaviyo__integration_integration_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1665702405.154494, "compiled_sql": "\n \n \n\n\n\nselect integration_id\nfrom `dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__integration`\nwhere integration_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "integration_id", "file_key_name": "models.stg_klaviyo__integration"}, "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__integration_integration_id__source_relation.be6158ad21": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_a7f288c54a3281da69034a0f95230596\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["integration_id", "source_relation"], "model": "{{ get_where_subquery(ref('stg_klaviyo__integration')) }}"}, "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.klaviyo_source.stg_klaviyo__integration"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_a7f288c54a3281da69034a0f95230596", "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["klaviyo_source", "dbt_utils_unique_combination_of_columns_stg_klaviyo__integration_integration_id__source_relation"], "unique_id": "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__integration_integration_id__source_relation.be6158ad21", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "dbt_utils_unique_combination_o_a7f288c54a3281da69034a0f95230596.sql", "original_file_path": "models/stg_klaviyo.yml", "name": "dbt_utils_unique_combination_of_columns_stg_klaviyo__integration_integration_id__source_relation", "alias": "dbt_utils_unique_combination_o_a7f288c54a3281da69034a0f95230596", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_klaviyo__integration"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo.yml/dbt_utils_unique_combination_o_a7f288c54a3281da69034a0f95230596.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_a7f288c54a3281da69034a0f95230596"}, "created_at": 1665702405.155454, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n integration_id, source_relation\n from `dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__integration`\n group by integration_id, source_relation\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_klaviyo__integration"}, "test.klaviyo_source.not_null_stg_klaviyo__person_person_id.bd77ffc8aa": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "person_id", "model": "{{ get_where_subquery(ref('stg_klaviyo__person')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.klaviyo_source.stg_klaviyo__person"]}, "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["klaviyo_source", "not_null_stg_klaviyo__person_person_id"], "unique_id": "test.klaviyo_source.not_null_stg_klaviyo__person_person_id.bd77ffc8aa", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "not_null_stg_klaviyo__person_person_id.sql", "original_file_path": "models/stg_klaviyo.yml", "name": "not_null_stg_klaviyo__person_person_id", "alias": "not_null_stg_klaviyo__person_person_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_klaviyo__person"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo.yml/not_null_stg_klaviyo__person_person_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1665702405.158001, "compiled_sql": "\n \n \n\n\n\nselect person_id\nfrom `dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__person`\nwhere person_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "person_id", "file_key_name": "models.stg_klaviyo__person"}, "test.klaviyo_source.unique_stg_klaviyo__person_email.dc3a98b014": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}{{ config(severity=\"warn\") }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "email", "model": "{{ get_where_subquery(ref('stg_klaviyo__person')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.klaviyo_source.stg_klaviyo__person"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "WARN", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_dbt_test__audit", "fqn": ["klaviyo_source", "unique_stg_klaviyo__person_email"], "unique_id": "test.klaviyo_source.unique_stg_klaviyo__person_email.dc3a98b014", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "unique_stg_klaviyo__person_email.sql", "original_file_path": "models/stg_klaviyo.yml", "name": "unique_stg_klaviyo__person_email", "alias": "unique_stg_klaviyo__person_email", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_klaviyo__person"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo.yml/unique_stg_klaviyo__person_email.sql", "build_path": null, "deferred": false, "unrendered_config": {"severity": "WARN"}, "created_at": 1665702405.159242, "compiled_sql": "\n \n \n\nwith dbt_test__target as (\n\n select email as unique_field\n from `dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__person`\n where email 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\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "email", "file_key_name": "models.stg_klaviyo__person"}, "test.klaviyo_source.not_null_stg_klaviyo__person_email.c7094cfe27": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "email", "model": "{{ get_where_subquery(ref('stg_klaviyo__person')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.klaviyo_source.stg_klaviyo__person"]}, "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["klaviyo_source", "not_null_stg_klaviyo__person_email"], "unique_id": "test.klaviyo_source.not_null_stg_klaviyo__person_email.c7094cfe27", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "not_null_stg_klaviyo__person_email.sql", "original_file_path": "models/stg_klaviyo.yml", "name": "not_null_stg_klaviyo__person_email", "alias": "not_null_stg_klaviyo__person_email", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_klaviyo__person"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo.yml/not_null_stg_klaviyo__person_email.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1665702405.160204, "compiled_sql": "\n \n \n\n\n\nselect email\nfrom `dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__person`\nwhere email is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "email", "file_key_name": "models.stg_klaviyo__person"}, "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__person_person_id__source_relation.33a4f9ca24": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_df656836e047bb69a86997735efb3161\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["person_id", "source_relation"], "model": "{{ get_where_subquery(ref('stg_klaviyo__person')) }}"}, "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.klaviyo_source.stg_klaviyo__person"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_df656836e047bb69a86997735efb3161", "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["klaviyo_source", "dbt_utils_unique_combination_of_columns_stg_klaviyo__person_person_id__source_relation"], "unique_id": "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__person_person_id__source_relation.33a4f9ca24", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "dbt_utils_unique_combination_o_df656836e047bb69a86997735efb3161.sql", "original_file_path": "models/stg_klaviyo.yml", "name": "dbt_utils_unique_combination_of_columns_stg_klaviyo__person_person_id__source_relation", "alias": "dbt_utils_unique_combination_o_df656836e047bb69a86997735efb3161", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_klaviyo__person"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo.yml/dbt_utils_unique_combination_o_df656836e047bb69a86997735efb3161.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_df656836e047bb69a86997735efb3161"}, "created_at": 1665702405.1611462, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n person_id, source_relation\n from `dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__person`\n group by person_id, source_relation\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_klaviyo__person"}, "test.klaviyo_source.not_null_stg_klaviyo__metric_metric_id.4759d62078": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "metric_id", "model": "{{ get_where_subquery(ref('stg_klaviyo__metric')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.klaviyo_source.stg_klaviyo__metric"]}, "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["klaviyo_source", "not_null_stg_klaviyo__metric_metric_id"], "unique_id": "test.klaviyo_source.not_null_stg_klaviyo__metric_metric_id.4759d62078", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "not_null_stg_klaviyo__metric_metric_id.sql", "original_file_path": "models/stg_klaviyo.yml", "name": "not_null_stg_klaviyo__metric_metric_id", "alias": "not_null_stg_klaviyo__metric_metric_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_klaviyo__metric"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo.yml/not_null_stg_klaviyo__metric_metric_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1665702405.163696, "compiled_sql": "\n \n \n\n\n\nselect metric_id\nfrom `dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__metric`\nwhere metric_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "metric_id", "file_key_name": "models.stg_klaviyo__metric"}, "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__metric_metric_id__source_relation.e9f33c04e5": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_45cba7e3442f1bc3264a04c52efb4d58\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["metric_id", "source_relation"], "model": "{{ get_where_subquery(ref('stg_klaviyo__metric')) }}"}, "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.klaviyo_source.stg_klaviyo__metric"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_45cba7e3442f1bc3264a04c52efb4d58", "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["klaviyo_source", "dbt_utils_unique_combination_of_columns_stg_klaviyo__metric_metric_id__source_relation"], "unique_id": "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__metric_metric_id__source_relation.e9f33c04e5", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "dbt_utils_unique_combination_o_45cba7e3442f1bc3264a04c52efb4d58.sql", "original_file_path": "models/stg_klaviyo.yml", "name": "dbt_utils_unique_combination_of_columns_stg_klaviyo__metric_metric_id__source_relation", "alias": "dbt_utils_unique_combination_o_45cba7e3442f1bc3264a04c52efb4d58", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_klaviyo__metric"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo.yml/dbt_utils_unique_combination_o_45cba7e3442f1bc3264a04c52efb4d58.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_45cba7e3442f1bc3264a04c52efb4d58"}, "created_at": 1665702405.164653, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n metric_id, source_relation\n from `dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__metric`\n group by metric_id, source_relation\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_klaviyo__metric"}, "test.klaviyo.not_null_klaviyo__events_event_id.eada7340ba": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('klaviyo__events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.klaviyo.klaviyo__events"]}, "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["klaviyo", "not_null_klaviyo__events_event_id"], "unique_id": "test.klaviyo.not_null_klaviyo__events_event_id.eada7340ba", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "not_null_klaviyo__events_event_id.sql", "original_file_path": "models/klaviyo.yml", "name": "not_null_klaviyo__events_event_id", "alias": "not_null_klaviyo__events_event_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["klaviyo__events"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo/models/klaviyo.yml/not_null_klaviyo__events_event_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1665702405.195754, "compiled_sql": "\n \n \n\n\n\nselect event_id\nfrom `dbt-package-testing`.`linkedin_integration_tests_klaviyo`.`klaviyo__events`\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_id", "file_key_name": "models.klaviyo__events"}, "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__events_event_id__source_relation.847dad4174": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_8b483e4115ab91fbb579be0d68288d98\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["event_id", "source_relation"], "model": "{{ get_where_subquery(ref('klaviyo__events')) }}"}, "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.klaviyo.klaviyo__events"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_8b483e4115ab91fbb579be0d68288d98", "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["klaviyo", "dbt_utils_unique_combination_of_columns_klaviyo__events_event_id__source_relation"], "unique_id": "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__events_event_id__source_relation.847dad4174", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "dbt_utils_unique_combination_o_8b483e4115ab91fbb579be0d68288d98.sql", "original_file_path": "models/klaviyo.yml", "name": "dbt_utils_unique_combination_of_columns_klaviyo__events_event_id__source_relation", "alias": "dbt_utils_unique_combination_o_8b483e4115ab91fbb579be0d68288d98", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["klaviyo__events"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo/models/klaviyo.yml/dbt_utils_unique_combination_o_8b483e4115ab91fbb579be0d68288d98.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_8b483e4115ab91fbb579be0d68288d98"}, "created_at": 1665702405.196776, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n event_id, source_relation\n from `dbt-package-testing`.`linkedin_integration_tests_klaviyo`.`klaviyo__events`\n group by event_id, source_relation\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.klaviyo__events"}, "test.klaviyo.not_null_klaviyo__person_campaign_flow_person_id.e27d13b0f2": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "person_id", "model": "{{ get_where_subquery(ref('klaviyo__person_campaign_flow')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.klaviyo.klaviyo__person_campaign_flow"]}, "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["klaviyo", "not_null_klaviyo__person_campaign_flow_person_id"], "unique_id": "test.klaviyo.not_null_klaviyo__person_campaign_flow_person_id.e27d13b0f2", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "not_null_klaviyo__person_campaign_flow_person_id.sql", "original_file_path": "models/klaviyo.yml", "name": "not_null_klaviyo__person_campaign_flow_person_id", "alias": "not_null_klaviyo__person_campaign_flow_person_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["klaviyo__person_campaign_flow"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo/models/klaviyo.yml/not_null_klaviyo__person_campaign_flow_person_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1665702405.199351, "compiled_sql": "\n \n \n\n\n\nselect person_id\nfrom `dbt-package-testing`.`linkedin_integration_tests_klaviyo`.`klaviyo__person_campaign_flow`\nwhere person_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "person_id", "file_key_name": "models.klaviyo__person_campaign_flow"}, "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__person_campaign_flow_person_id__last_touch_campaign_id__last_touch_flow_id__variation_id__source_relation.30e1824079": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_b833c7b8de2dbcac0bfcd913f29d49fd\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["person_id", "last_touch_campaign_id", "last_touch_flow_id", "variation_id", "source_relation"], "model": "{{ get_where_subquery(ref('klaviyo__person_campaign_flow')) }}"}, "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.klaviyo.klaviyo__person_campaign_flow"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_b833c7b8de2dbcac0bfcd913f29d49fd", "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["klaviyo", "dbt_utils_unique_combination_of_columns_klaviyo__person_campaign_flow_person_id__last_touch_campaign_id__last_touch_flow_id__variation_id__source_relation"], "unique_id": "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__person_campaign_flow_person_id__last_touch_campaign_id__last_touch_flow_id__variation_id__source_relation.30e1824079", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "dbt_utils_unique_combination_o_b833c7b8de2dbcac0bfcd913f29d49fd.sql", "original_file_path": "models/klaviyo.yml", "name": "dbt_utils_unique_combination_of_columns_klaviyo__person_campaign_flow_person_id__last_touch_campaign_id__last_touch_flow_id__variation_id__source_relation", "alias": "dbt_utils_unique_combination_o_b833c7b8de2dbcac0bfcd913f29d49fd", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["klaviyo__person_campaign_flow"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo/models/klaviyo.yml/dbt_utils_unique_combination_o_b833c7b8de2dbcac0bfcd913f29d49fd.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_b833c7b8de2dbcac0bfcd913f29d49fd"}, "created_at": 1665702405.200317, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n person_id, last_touch_campaign_id, last_touch_flow_id, variation_id, source_relation\n from `dbt-package-testing`.`linkedin_integration_tests_klaviyo`.`klaviyo__person_campaign_flow`\n group by person_id, last_touch_campaign_id, last_touch_flow_id, variation_id, source_relation\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.klaviyo__person_campaign_flow"}, "test.klaviyo.not_null_klaviyo__campaigns_campaign_variation_key.c4588cdadc": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_variation_key", "model": "{{ get_where_subquery(ref('klaviyo__campaigns')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.klaviyo.klaviyo__campaigns"]}, "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["klaviyo", "not_null_klaviyo__campaigns_campaign_variation_key"], "unique_id": "test.klaviyo.not_null_klaviyo__campaigns_campaign_variation_key.c4588cdadc", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "not_null_klaviyo__campaigns_campaign_variation_key.sql", "original_file_path": "models/klaviyo.yml", "name": "not_null_klaviyo__campaigns_campaign_variation_key", "alias": "not_null_klaviyo__campaigns_campaign_variation_key", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["klaviyo__campaigns"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo/models/klaviyo.yml/not_null_klaviyo__campaigns_campaign_variation_key.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1665702405.203211, "compiled_sql": "\n \n \n\n\n\nselect campaign_variation_key\nfrom `dbt-package-testing`.`linkedin_integration_tests_klaviyo`.`klaviyo__campaigns`\nwhere campaign_variation_key is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "campaign_variation_key", "file_key_name": "models.klaviyo__campaigns"}, "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__campaigns_campaign_variation_key__source_relation.e5d14aee28": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_8c02a0c80dd7e19571d353539126fd64\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["campaign_variation_key", "source_relation"], "model": "{{ get_where_subquery(ref('klaviyo__campaigns')) }}"}, "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.klaviyo.klaviyo__campaigns"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_8c02a0c80dd7e19571d353539126fd64", "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["klaviyo", "dbt_utils_unique_combination_of_columns_klaviyo__campaigns_campaign_variation_key__source_relation"], "unique_id": "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__campaigns_campaign_variation_key__source_relation.e5d14aee28", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "dbt_utils_unique_combination_o_8c02a0c80dd7e19571d353539126fd64.sql", "original_file_path": "models/klaviyo.yml", "name": "dbt_utils_unique_combination_of_columns_klaviyo__campaigns_campaign_variation_key__source_relation", "alias": "dbt_utils_unique_combination_o_8c02a0c80dd7e19571d353539126fd64", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["klaviyo__campaigns"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo/models/klaviyo.yml/dbt_utils_unique_combination_o_8c02a0c80dd7e19571d353539126fd64.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_8c02a0c80dd7e19571d353539126fd64"}, "created_at": 1665702405.204306, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n campaign_variation_key, source_relation\n from `dbt-package-testing`.`linkedin_integration_tests_klaviyo`.`klaviyo__campaigns`\n group by campaign_variation_key, source_relation\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.klaviyo__campaigns"}, "test.klaviyo.not_null_klaviyo__flows_flow_variation_key.152c0d960b": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "flow_variation_key", "model": "{{ get_where_subquery(ref('klaviyo__flows')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.klaviyo.klaviyo__flows"]}, "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["klaviyo", "not_null_klaviyo__flows_flow_variation_key"], "unique_id": "test.klaviyo.not_null_klaviyo__flows_flow_variation_key.152c0d960b", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "not_null_klaviyo__flows_flow_variation_key.sql", "original_file_path": "models/klaviyo.yml", "name": "not_null_klaviyo__flows_flow_variation_key", "alias": "not_null_klaviyo__flows_flow_variation_key", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["klaviyo__flows"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo/models/klaviyo.yml/not_null_klaviyo__flows_flow_variation_key.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1665702405.206733, "compiled_sql": "\n \n \n\n\n\nselect flow_variation_key\nfrom `dbt-package-testing`.`linkedin_integration_tests_klaviyo`.`klaviyo__flows`\nwhere flow_variation_key is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "flow_variation_key", "file_key_name": "models.klaviyo__flows"}, "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__flows_flow_variation_key__source_relation.925d4118dc": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_699ce797a4af34c0906f1e96e7e5186e\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["flow_variation_key", "source_relation"], "model": "{{ get_where_subquery(ref('klaviyo__flows')) }}"}, "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.klaviyo.klaviyo__flows"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_699ce797a4af34c0906f1e96e7e5186e", "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["klaviyo", "dbt_utils_unique_combination_of_columns_klaviyo__flows_flow_variation_key__source_relation"], "unique_id": "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__flows_flow_variation_key__source_relation.925d4118dc", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "dbt_utils_unique_combination_o_699ce797a4af34c0906f1e96e7e5186e.sql", "original_file_path": "models/klaviyo.yml", "name": "dbt_utils_unique_combination_of_columns_klaviyo__flows_flow_variation_key__source_relation", "alias": "dbt_utils_unique_combination_o_699ce797a4af34c0906f1e96e7e5186e", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["klaviyo__flows"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo/models/klaviyo.yml/dbt_utils_unique_combination_o_699ce797a4af34c0906f1e96e7e5186e.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_699ce797a4af34c0906f1e96e7e5186e"}, "created_at": 1665702405.207826, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n flow_variation_key, source_relation\n from `dbt-package-testing`.`linkedin_integration_tests_klaviyo`.`klaviyo__flows`\n group by flow_variation_key, source_relation\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.klaviyo__flows"}, "test.klaviyo.not_null_klaviyo__persons_person_id.624a41e75a": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "person_id", "model": "{{ get_where_subquery(ref('klaviyo__persons')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.klaviyo.klaviyo__persons"]}, "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["klaviyo", "not_null_klaviyo__persons_person_id"], "unique_id": "test.klaviyo.not_null_klaviyo__persons_person_id.624a41e75a", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "not_null_klaviyo__persons_person_id.sql", "original_file_path": "models/klaviyo.yml", "name": "not_null_klaviyo__persons_person_id", "alias": "not_null_klaviyo__persons_person_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["klaviyo__persons"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo/models/klaviyo.yml/not_null_klaviyo__persons_person_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1665702405.210376, "compiled_sql": "\n \n \n\n\n\nselect person_id\nfrom `dbt-package-testing`.`linkedin_integration_tests_klaviyo`.`klaviyo__persons`\nwhere person_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "person_id", "file_key_name": "models.klaviyo__persons"}, "test.klaviyo.unique_klaviyo__persons_email.a330194dd6": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}{{ config(severity=\"warn\") }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "email", "model": "{{ get_where_subquery(ref('klaviyo__persons')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.klaviyo.klaviyo__persons"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "WARN", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_dbt_test__audit", "fqn": ["klaviyo", "unique_klaviyo__persons_email"], "unique_id": "test.klaviyo.unique_klaviyo__persons_email.a330194dd6", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "unique_klaviyo__persons_email.sql", "original_file_path": "models/klaviyo.yml", "name": "unique_klaviyo__persons_email", "alias": "unique_klaviyo__persons_email", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["klaviyo__persons"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo/models/klaviyo.yml/unique_klaviyo__persons_email.sql", "build_path": null, "deferred": false, "unrendered_config": {"severity": "WARN"}, "created_at": 1665702405.211492, "compiled_sql": "\n \n \n\nwith dbt_test__target as (\n\n select email as unique_field\n from `dbt-package-testing`.`linkedin_integration_tests_klaviyo`.`klaviyo__persons`\n where email 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\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "email", "file_key_name": "models.klaviyo__persons"}, "test.klaviyo.not_null_klaviyo__persons_email.072e38d07d": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "email", "model": "{{ get_where_subquery(ref('klaviyo__persons')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.klaviyo.klaviyo__persons"]}, "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["klaviyo", "not_null_klaviyo__persons_email"], "unique_id": "test.klaviyo.not_null_klaviyo__persons_email.072e38d07d", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "not_null_klaviyo__persons_email.sql", "original_file_path": "models/klaviyo.yml", "name": "not_null_klaviyo__persons_email", "alias": "not_null_klaviyo__persons_email", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["klaviyo__persons"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo/models/klaviyo.yml/not_null_klaviyo__persons_email.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1665702405.2124438, "compiled_sql": "\n \n \n\n\n\nselect email\nfrom `dbt-package-testing`.`linkedin_integration_tests_klaviyo`.`klaviyo__persons`\nwhere email is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "email", "file_key_name": "models.klaviyo__persons"}, "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__persons_person_id__source_relation.b223d703b3": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_f8f3a9d3aa76b62bb804805c73d99329\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["person_id", "source_relation"], "model": "{{ get_where_subquery(ref('klaviyo__persons')) }}"}, "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.klaviyo.klaviyo__persons"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_f8f3a9d3aa76b62bb804805c73d99329", "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["klaviyo", "dbt_utils_unique_combination_of_columns_klaviyo__persons_person_id__source_relation"], "unique_id": "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__persons_person_id__source_relation.b223d703b3", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "dbt_utils_unique_combination_o_f8f3a9d3aa76b62bb804805c73d99329.sql", "original_file_path": "models/klaviyo.yml", "name": "dbt_utils_unique_combination_of_columns_klaviyo__persons_person_id__source_relation", "alias": "dbt_utils_unique_combination_o_f8f3a9d3aa76b62bb804805c73d99329", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["klaviyo__persons"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo/models/klaviyo.yml/dbt_utils_unique_combination_o_f8f3a9d3aa76b62bb804805c73d99329.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_f8f3a9d3aa76b62bb804805c73d99329"}, "created_at": 1665702405.2135391, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n person_id, source_relation\n from `dbt-package-testing`.`linkedin_integration_tests_klaviyo`.`klaviyo__persons`\n group by person_id, source_relation\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.klaviyo__persons"}, "test.klaviyo.not_null_int_klaviyo__event_attribution_event_id.8d186152c4": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('int_klaviyo__event_attribution')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.klaviyo.int_klaviyo__event_attribution"]}, "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["klaviyo", "intermediate", "not_null_int_klaviyo__event_attribution_event_id"], "unique_id": "test.klaviyo.not_null_int_klaviyo__event_attribution_event_id.8d186152c4", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "not_null_int_klaviyo__event_attribution_event_id.sql", "original_file_path": "models/intermediate/int_klaviyo.yml", "name": "not_null_int_klaviyo__event_attribution_event_id", "alias": "not_null_int_klaviyo__event_attribution_event_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["int_klaviyo__event_attribution"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo/models/intermediate/int_klaviyo.yml/not_null_int_klaviyo__event_attribution_event_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1665702405.222084, "compiled_sql": "\n \n \n\n\n\nselect event_id\nfrom `dbt-package-testing`.`linkedin_integration_tests_int_klaviyo`.`int_klaviyo__event_attribution`\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_id", "file_key_name": "models.int_klaviyo__event_attribution"}, "test.klaviyo.dbt_utils_unique_combination_of_columns_int_klaviyo__event_attribution_event_id__source_relation.654b98ad2c": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_a0147e1bc143333a515d11c7f665da10\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["event_id", "source_relation"], "model": "{{ get_where_subquery(ref('int_klaviyo__event_attribution')) }}"}, "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.klaviyo.int_klaviyo__event_attribution"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_a0147e1bc143333a515d11c7f665da10", "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["klaviyo", "intermediate", "dbt_utils_unique_combination_of_columns_int_klaviyo__event_attribution_event_id__source_relation"], "unique_id": "test.klaviyo.dbt_utils_unique_combination_of_columns_int_klaviyo__event_attribution_event_id__source_relation.654b98ad2c", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "dbt_utils_unique_combination_o_a0147e1bc143333a515d11c7f665da10.sql", "original_file_path": "models/intermediate/int_klaviyo.yml", "name": "dbt_utils_unique_combination_of_columns_int_klaviyo__event_attribution_event_id__source_relation", "alias": "dbt_utils_unique_combination_o_a0147e1bc143333a515d11c7f665da10", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["int_klaviyo__event_attribution"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo/models/intermediate/int_klaviyo.yml/dbt_utils_unique_combination_o_a0147e1bc143333a515d11c7f665da10.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_a0147e1bc143333a515d11c7f665da10"}, "created_at": 1665702405.223076, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n event_id, source_relation\n from `dbt-package-testing`.`linkedin_integration_tests_int_klaviyo`.`int_klaviyo__event_attribution`\n group by event_id, source_relation\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.int_klaviyo__event_attribution"}, "test.klaviyo.dbt_utils_unique_combination_of_columns_int_klaviyo__campaign_flow_metrics_variation_id__source_relation__last_touch_campaign_id__last_touch_flow_id.3ea05faa81": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_e4603c9c1d4c74e9c4571eb9a11c5a61\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["variation_id", "source_relation", "last_touch_campaign_id", "last_touch_flow_id"], "model": "{{ get_where_subquery(ref('int_klaviyo__campaign_flow_metrics')) }}"}, "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.klaviyo.int_klaviyo__campaign_flow_metrics"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_e4603c9c1d4c74e9c4571eb9a11c5a61", "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["klaviyo", "intermediate", "dbt_utils_unique_combination_of_columns_int_klaviyo__campaign_flow_metrics_variation_id__source_relation__last_touch_campaign_id__last_touch_flow_id"], "unique_id": "test.klaviyo.dbt_utils_unique_combination_of_columns_int_klaviyo__campaign_flow_metrics_variation_id__source_relation__last_touch_campaign_id__last_touch_flow_id.3ea05faa81", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "dbt_utils_unique_combination_o_e4603c9c1d4c74e9c4571eb9a11c5a61.sql", "original_file_path": "models/intermediate/int_klaviyo.yml", "name": "dbt_utils_unique_combination_of_columns_int_klaviyo__campaign_flow_metrics_variation_id__source_relation__last_touch_campaign_id__last_touch_flow_id", "alias": "dbt_utils_unique_combination_o_e4603c9c1d4c74e9c4571eb9a11c5a61", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["int_klaviyo__campaign_flow_metrics"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo/models/intermediate/int_klaviyo.yml/dbt_utils_unique_combination_o_e4603c9c1d4c74e9c4571eb9a11c5a61.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_e4603c9c1d4c74e9c4571eb9a11c5a61"}, "created_at": 1665702405.225645, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n variation_id, source_relation, last_touch_campaign_id, last_touch_flow_id\n from `dbt-package-testing`.`linkedin_integration_tests_int_klaviyo`.`int_klaviyo__campaign_flow_metrics`\n group by variation_id, source_relation, last_touch_campaign_id, last_touch_flow_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.int_klaviyo__campaign_flow_metrics"}, "test.klaviyo.not_null_int_klaviyo__person_metrics_person_id.2c0f4e5a67": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "person_id", "model": "{{ get_where_subquery(ref('int_klaviyo__person_metrics')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.klaviyo.int_klaviyo__person_metrics"]}, "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["klaviyo", "intermediate", "not_null_int_klaviyo__person_metrics_person_id"], "unique_id": "test.klaviyo.not_null_int_klaviyo__person_metrics_person_id.2c0f4e5a67", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "not_null_int_klaviyo__person_metrics_person_id.sql", "original_file_path": "models/intermediate/int_klaviyo.yml", "name": "not_null_int_klaviyo__person_metrics_person_id", "alias": "not_null_int_klaviyo__person_metrics_person_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["int_klaviyo__person_metrics"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo/models/intermediate/int_klaviyo.yml/not_null_int_klaviyo__person_metrics_person_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1665702405.22843, "compiled_sql": "\n \n \n\n\n\nselect person_id\nfrom `dbt-package-testing`.`linkedin_integration_tests_int_klaviyo`.`int_klaviyo__person_metrics`\nwhere person_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "person_id", "file_key_name": "models.int_klaviyo__person_metrics"}, "test.klaviyo.dbt_utils_unique_combination_of_columns_int_klaviyo__person_metrics_person_id__source_relation.4897d57f8b": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_44a55e0600e791676842b0edee32af5c\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["person_id", "source_relation"], "model": "{{ get_where_subquery(ref('int_klaviyo__person_metrics')) }}"}, "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.klaviyo.int_klaviyo__person_metrics"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_44a55e0600e791676842b0edee32af5c", "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["klaviyo", "intermediate", "dbt_utils_unique_combination_of_columns_int_klaviyo__person_metrics_person_id__source_relation"], "unique_id": "test.klaviyo.dbt_utils_unique_combination_of_columns_int_klaviyo__person_metrics_person_id__source_relation.4897d57f8b", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "dbt_utils_unique_combination_o_44a55e0600e791676842b0edee32af5c.sql", "original_file_path": "models/intermediate/int_klaviyo.yml", "name": "dbt_utils_unique_combination_of_columns_int_klaviyo__person_metrics_person_id__source_relation", "alias": "dbt_utils_unique_combination_o_44a55e0600e791676842b0edee32af5c", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["int_klaviyo__person_metrics"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo/models/intermediate/int_klaviyo.yml/dbt_utils_unique_combination_o_44a55e0600e791676842b0edee32af5c.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_44a55e0600e791676842b0edee32af5c"}, "created_at": 1665702405.229526, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n person_id, source_relation\n from `dbt-package-testing`.`linkedin_integration_tests_int_klaviyo`.`int_klaviyo__person_metrics`\n group by person_id, source_relation\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.int_klaviyo__person_metrics"}, "test.shopify.unique_shopify__customer_cohorts_customer_cohort_id.c5e4855c7a": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "customer_cohort_id", "model": "{{ get_where_subquery(ref('shopify__customer_cohorts')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.shopify.shopify__customer_cohorts"]}, "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["shopify", "unique_shopify__customer_cohorts_customer_cohort_id"], "unique_id": "test.shopify.unique_shopify__customer_cohorts_customer_cohort_id.c5e4855c7a", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify", "path": "unique_shopify__customer_cohorts_customer_cohort_id.sql", "original_file_path": "models/shopify.yml", "name": "unique_shopify__customer_cohorts_customer_cohort_id", "alias": "unique_shopify__customer_cohorts_customer_cohort_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["shopify__customer_cohorts"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify/models/shopify.yml/unique_shopify__customer_cohorts_customer_cohort_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1665702405.262696, "compiled_sql": "\n \n \n\nwith dbt_test__target as (\n\n select customer_cohort_id as unique_field\n from `dbt-package-testing`.`linkedin_integration_tests_shopify`.`shopify__customer_cohorts`\n where customer_cohort_id 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\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "customer_cohort_id", "file_key_name": "models.shopify__customer_cohorts"}, "test.shopify.not_null_shopify__customer_cohorts_customer_cohort_id.88e9c30925": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "customer_cohort_id", "model": "{{ get_where_subquery(ref('shopify__customer_cohorts')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.shopify.shopify__customer_cohorts"]}, "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["shopify", "not_null_shopify__customer_cohorts_customer_cohort_id"], "unique_id": "test.shopify.not_null_shopify__customer_cohorts_customer_cohort_id.88e9c30925", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify", "path": "not_null_shopify__customer_cohorts_customer_cohort_id.sql", "original_file_path": "models/shopify.yml", "name": "not_null_shopify__customer_cohorts_customer_cohort_id", "alias": "not_null_shopify__customer_cohorts_customer_cohort_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["shopify__customer_cohorts"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify/models/shopify.yml/not_null_shopify__customer_cohorts_customer_cohort_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1665702405.263701, "compiled_sql": "\n \n \n\n\n\nselect customer_cohort_id\nfrom `dbt-package-testing`.`linkedin_integration_tests_shopify`.`shopify__customer_cohorts`\nwhere customer_cohort_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "customer_cohort_id", "file_key_name": "models.shopify__customer_cohorts"}, "test.shopify.dbt_utils_unique_combination_of_columns_shopify__orders_order_id__source_relation.b2d1eaf63d": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_0e30d4742af59bda60aa3c3f634a72ce\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["order_id", "source_relation"], "model": "{{ get_where_subquery(ref('shopify__orders')) }}"}, "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.shopify.shopify__orders"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_0e30d4742af59bda60aa3c3f634a72ce", "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["shopify", "dbt_utils_unique_combination_of_columns_shopify__orders_order_id__source_relation"], "unique_id": "test.shopify.dbt_utils_unique_combination_of_columns_shopify__orders_order_id__source_relation.b2d1eaf63d", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify", "path": "dbt_utils_unique_combination_o_0e30d4742af59bda60aa3c3f634a72ce.sql", "original_file_path": "models/shopify.yml", "name": "dbt_utils_unique_combination_of_columns_shopify__orders_order_id__source_relation", "alias": "dbt_utils_unique_combination_o_0e30d4742af59bda60aa3c3f634a72ce", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["shopify__orders"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify/models/shopify.yml/dbt_utils_unique_combination_o_0e30d4742af59bda60aa3c3f634a72ce.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_0e30d4742af59bda60aa3c3f634a72ce"}, "created_at": 1665702405.264671, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n order_id, source_relation\n from `dbt-package-testing`.`linkedin_integration_tests_shopify`.`shopify__orders`\n group by order_id, source_relation\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.shopify__orders"}, "test.shopify.dbt_utils_unique_combination_of_columns_shopify__customers_customer_id__source_relation.88d3656469": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_93b849a7493f07ea332b58b74fbb6696\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["customer_id", "source_relation"], "model": "{{ get_where_subquery(ref('shopify__customers')) }}"}, "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.shopify.shopify__customers"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_93b849a7493f07ea332b58b74fbb6696", "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["shopify", "dbt_utils_unique_combination_of_columns_shopify__customers_customer_id__source_relation"], "unique_id": "test.shopify.dbt_utils_unique_combination_of_columns_shopify__customers_customer_id__source_relation.88d3656469", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify", "path": "dbt_utils_unique_combination_o_93b849a7493f07ea332b58b74fbb6696.sql", "original_file_path": "models/shopify.yml", "name": "dbt_utils_unique_combination_of_columns_shopify__customers_customer_id__source_relation", "alias": "dbt_utils_unique_combination_o_93b849a7493f07ea332b58b74fbb6696", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["shopify__customers"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify/models/shopify.yml/dbt_utils_unique_combination_o_93b849a7493f07ea332b58b74fbb6696.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_93b849a7493f07ea332b58b74fbb6696"}, "created_at": 1665702405.26724, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n customer_id, source_relation\n from `dbt-package-testing`.`linkedin_integration_tests_shopify`.`shopify__customers`\n group by customer_id, source_relation\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.shopify__customers"}, "test.shopify.dbt_utils_unique_combination_of_columns_shopify__products_product_id__source_relation.f00b2fb95a": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_64adf669e5f645d81dbdf6d5d3a930fa\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["product_id", "source_relation"], "model": "{{ get_where_subquery(ref('shopify__products')) }}"}, "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.shopify.shopify__products"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_64adf669e5f645d81dbdf6d5d3a930fa", "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["shopify", "dbt_utils_unique_combination_of_columns_shopify__products_product_id__source_relation"], "unique_id": "test.shopify.dbt_utils_unique_combination_of_columns_shopify__products_product_id__source_relation.f00b2fb95a", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify", "path": "dbt_utils_unique_combination_o_64adf669e5f645d81dbdf6d5d3a930fa.sql", "original_file_path": "models/shopify.yml", "name": "dbt_utils_unique_combination_of_columns_shopify__products_product_id__source_relation", "alias": "dbt_utils_unique_combination_o_64adf669e5f645d81dbdf6d5d3a930fa", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["shopify__products"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify/models/shopify.yml/dbt_utils_unique_combination_o_64adf669e5f645d81dbdf6d5d3a930fa.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_64adf669e5f645d81dbdf6d5d3a930fa"}, "created_at": 1665702405.26989, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n product_id, source_relation\n from `dbt-package-testing`.`linkedin_integration_tests_shopify`.`shopify__products`\n group by product_id, source_relation\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.shopify__products"}, "test.shopify.dbt_utils_unique_combination_of_columns_shopify__order_lines_order_line_id__source_relation.2483d5ef95": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_0bd7a3e6d2ce7dc1c5c09d9f9d5f6b40\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["order_line_id", "source_relation"], "model": "{{ get_where_subquery(ref('shopify__order_lines')) }}"}, "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.shopify.shopify__order_lines"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_0bd7a3e6d2ce7dc1c5c09d9f9d5f6b40", "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["shopify", "dbt_utils_unique_combination_of_columns_shopify__order_lines_order_line_id__source_relation"], "unique_id": "test.shopify.dbt_utils_unique_combination_of_columns_shopify__order_lines_order_line_id__source_relation.2483d5ef95", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify", "path": "dbt_utils_unique_combination_o_0bd7a3e6d2ce7dc1c5c09d9f9d5f6b40.sql", "original_file_path": "models/shopify.yml", "name": "dbt_utils_unique_combination_of_columns_shopify__order_lines_order_line_id__source_relation", "alias": "dbt_utils_unique_combination_o_0bd7a3e6d2ce7dc1c5c09d9f9d5f6b40", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["shopify__order_lines"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify/models/shopify.yml/dbt_utils_unique_combination_o_0bd7a3e6d2ce7dc1c5c09d9f9d5f6b40.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_0bd7a3e6d2ce7dc1c5c09d9f9d5f6b40"}, "created_at": 1665702405.272428, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n order_line_id, source_relation\n from `dbt-package-testing`.`linkedin_integration_tests_shopify`.`shopify__order_lines`\n group by order_line_id, source_relation\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.shopify__order_lines"}, "test.shopify.dbt_utils_unique_combination_of_columns_shopify__transactions_transaction_id__source_relation.7341b755c0": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_8e8f17b2e5241cc1e3a33f9fa479a3fb\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["transaction_id", "source_relation"], "model": "{{ get_where_subquery(ref('shopify__transactions')) }}"}, "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.shopify.shopify__transactions"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_8e8f17b2e5241cc1e3a33f9fa479a3fb", "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["shopify", "dbt_utils_unique_combination_of_columns_shopify__transactions_transaction_id__source_relation"], "unique_id": "test.shopify.dbt_utils_unique_combination_of_columns_shopify__transactions_transaction_id__source_relation.7341b755c0", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify", "path": "dbt_utils_unique_combination_o_8e8f17b2e5241cc1e3a33f9fa479a3fb.sql", "original_file_path": "models/shopify.yml", "name": "dbt_utils_unique_combination_of_columns_shopify__transactions_transaction_id__source_relation", "alias": "dbt_utils_unique_combination_o_8e8f17b2e5241cc1e3a33f9fa479a3fb", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["shopify__transactions"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify/models/shopify.yml/dbt_utils_unique_combination_o_8e8f17b2e5241cc1e3a33f9fa479a3fb.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_8e8f17b2e5241cc1e3a33f9fa479a3fb"}, "created_at": 1665702405.274965, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n transaction_id, source_relation\n from `dbt-package-testing`.`linkedin_integration_tests_shopify`.`shopify__transactions`\n group by transaction_id, source_relation\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.shopify__transactions"}, "test.shopify.dbt_utils_unique_combination_of_columns_shopify__customers__order_aggregates_customer_id__source_relation.5a5e85c8a9": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_4d1af0d9338b2b5b246e23c580e294e3\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["customer_id", "source_relation"], "model": "{{ get_where_subquery(ref('shopify__customers__order_aggregates')) }}"}, "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.shopify.shopify__customers__order_aggregates"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_4d1af0d9338b2b5b246e23c580e294e3", "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["shopify", "intermediate", "dbt_utils_unique_combination_of_columns_shopify__customers__order_aggregates_customer_id__source_relation"], "unique_id": "test.shopify.dbt_utils_unique_combination_of_columns_shopify__customers__order_aggregates_customer_id__source_relation.5a5e85c8a9", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify", "path": "dbt_utils_unique_combination_o_4d1af0d9338b2b5b246e23c580e294e3.sql", "original_file_path": "models/intermediate/intermediate.yml", "name": "dbt_utils_unique_combination_of_columns_shopify__customers__order_aggregates_customer_id__source_relation", "alias": "dbt_utils_unique_combination_o_4d1af0d9338b2b5b246e23c580e294e3", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["shopify__customers__order_aggregates"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify/models/intermediate/intermediate.yml/dbt_utils_unique_combination_o_4d1af0d9338b2b5b246e23c580e294e3.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_4d1af0d9338b2b5b246e23c580e294e3"}, "created_at": 1665702405.278211, "compiled_sql": "\n\n\n\n\n\nwith __dbt__cte__shopify__customers__order_aggregates as (\nwith orders as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__order`\n\n), transactions as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_shopify`.`shopify__transactions`\n where lower(status) = 'success'\n\n), aggregated as (\n\n select\n orders.customer_id,\n orders.source_relation,\n min(orders.created_timestamp) as first_order_timestamp,\n max(orders.created_timestamp) as most_recent_order_timestamp,\n avg(case when lower(transactions.kind) in ('sale','capture') then transactions.currency_exchange_calculated_amount end) as average_order_value,\n sum(case when lower(transactions.kind) in ('sale','capture') then transactions.currency_exchange_calculated_amount end) as lifetime_total_spent,\n sum(case when lower(transactions.kind) in ('refund') then transactions.currency_exchange_calculated_amount end) as lifetime_total_refunded,\n count(distinct orders.order_id) as lifetime_count_orders\n from orders\n left join transactions\n using (order_id, source_relation)\n where customer_id is not null\n group by 1,2\n\n)\n\nselect *\nfrom aggregated\n),validation_errors as (\n\n select\n customer_id, source_relation\n from __dbt__cte__shopify__customers__order_aggregates\n group by customer_id, source_relation\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.shopify.shopify__customers__order_aggregates", "sql": " __dbt__cte__shopify__customers__order_aggregates as (\nwith orders as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__order`\n\n), transactions as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_shopify`.`shopify__transactions`\n where lower(status) = 'success'\n\n), aggregated as (\n\n select\n orders.customer_id,\n orders.source_relation,\n min(orders.created_timestamp) as first_order_timestamp,\n max(orders.created_timestamp) as most_recent_order_timestamp,\n avg(case when lower(transactions.kind) in ('sale','capture') then transactions.currency_exchange_calculated_amount end) as average_order_value,\n sum(case when lower(transactions.kind) in ('sale','capture') then transactions.currency_exchange_calculated_amount end) as lifetime_total_spent,\n sum(case when lower(transactions.kind) in ('refund') then transactions.currency_exchange_calculated_amount end) as lifetime_total_refunded,\n count(distinct orders.order_id) as lifetime_count_orders\n from orders\n left join transactions\n using (order_id, source_relation)\n where customer_id is not null\n group by 1,2\n\n)\n\nselect *\nfrom aggregated\n)"}], "relation_name": null, "column_name": null, "file_key_name": "models.shopify__customers__order_aggregates"}, "test.shopify.dbt_utils_unique_combination_of_columns_shopify__orders__order_line_aggregates_order_id__source_relation.09d921d473": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_3ae1e43ee344b59ccef000bf524f1f04\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["order_id", "source_relation"], "model": "{{ get_where_subquery(ref('shopify__orders__order_line_aggregates')) }}"}, "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.shopify.shopify__orders__order_line_aggregates"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_3ae1e43ee344b59ccef000bf524f1f04", "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["shopify", "intermediate", "dbt_utils_unique_combination_of_columns_shopify__orders__order_line_aggregates_order_id__source_relation"], "unique_id": "test.shopify.dbt_utils_unique_combination_of_columns_shopify__orders__order_line_aggregates_order_id__source_relation.09d921d473", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify", "path": "dbt_utils_unique_combination_o_3ae1e43ee344b59ccef000bf524f1f04.sql", "original_file_path": "models/intermediate/intermediate.yml", "name": "dbt_utils_unique_combination_of_columns_shopify__orders__order_line_aggregates_order_id__source_relation", "alias": "dbt_utils_unique_combination_o_3ae1e43ee344b59ccef000bf524f1f04", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["shopify__orders__order_line_aggregates"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify/models/intermediate/intermediate.yml/dbt_utils_unique_combination_o_3ae1e43ee344b59ccef000bf524f1f04.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_3ae1e43ee344b59ccef000bf524f1f04"}, "created_at": 1665702405.2807748, "compiled_sql": "\n\n\n\n\n\nwith __dbt__cte__shopify__orders__order_line_aggregates as (\nwith order_line as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__order_line`\n\n), aggregated as (\n\n select \n order_id,\n source_relation,\n count(*) as line_item_count\n from order_line\n group by 1,2\n\n)\n\nselect *\nfrom aggregated\n),validation_errors as (\n\n select\n order_id, source_relation\n from __dbt__cte__shopify__orders__order_line_aggregates\n group by order_id, source_relation\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.shopify.shopify__orders__order_line_aggregates", "sql": " __dbt__cte__shopify__orders__order_line_aggregates as (\nwith order_line as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__order_line`\n\n), aggregated as (\n\n select \n order_id,\n source_relation,\n count(*) as line_item_count\n from order_line\n group by 1,2\n\n)\n\nselect *\nfrom aggregated\n)"}], "relation_name": null, "column_name": null, "file_key_name": "models.shopify__orders__order_line_aggregates"}, "test.shopify_holistic_reporting.dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__customer_enhanced_email__klaviyo_source_relation__shopify_source_relation.2ea9394109": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_6d96dafa6cfb9bf7095ffd278a75adbc\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["email", "klaviyo_source_relation", "shopify_source_relation"], "model": "{{ get_where_subquery(ref('shopify_holistic_reporting__customer_enhanced')) }}"}, "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.shopify_holistic_reporting.shopify_holistic_reporting__customer_enhanced"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_6d96dafa6cfb9bf7095ffd278a75adbc", "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["shopify_holistic_reporting", "dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__customer_enhanced_email__klaviyo_source_relation__shopify_source_relation"], "unique_id": "test.shopify_holistic_reporting.dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__customer_enhanced_email__klaviyo_source_relation__shopify_source_relation.2ea9394109", "package_name": "shopify_holistic_reporting", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_holistic_reporting", "path": "dbt_utils_unique_combination_o_6d96dafa6cfb9bf7095ffd278a75adbc.sql", "original_file_path": "models/shopify_holistic_reporting.yml", "name": "dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__customer_enhanced_email__klaviyo_source_relation__shopify_source_relation", "alias": "dbt_utils_unique_combination_o_6d96dafa6cfb9bf7095ffd278a75adbc", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["shopify_holistic_reporting__customer_enhanced"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_holistic_reporting/models/shopify_holistic_reporting.yml/dbt_utils_unique_combination_o_6d96dafa6cfb9bf7095ffd278a75adbc.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_6d96dafa6cfb9bf7095ffd278a75adbc"}, "created_at": 1665702405.308287, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n email, klaviyo_source_relation, shopify_source_relation\n from `dbt-package-testing`.`linkedin_integration_tests_shopify_holistic`.`shopify_holistic_reporting__customer_enhanced`\n group by email, klaviyo_source_relation, shopify_source_relation\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.shopify_holistic_reporting__customer_enhanced"}, "test.shopify_holistic_reporting.dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__daily_customer_metrics_date_day__email__klaviyo_source_relation__shopify_source_relation__campaign_id__flow_id__variation_id.0489c190fd": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_4b14da03db00d67d51bb9e9f7e8b766f\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["date_day", "email", "klaviyo_source_relation", "shopify_source_relation", "campaign_id", "flow_id", "variation_id"], "model": "{{ get_where_subquery(ref('shopify_holistic_reporting__daily_customer_metrics')) }}"}, "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.shopify_holistic_reporting.shopify_holistic_reporting__daily_customer_metrics"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_4b14da03db00d67d51bb9e9f7e8b766f", "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["shopify_holistic_reporting", "dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__daily_customer_metrics_date_day__email__klaviyo_source_relation__shopify_source_relation__campaign_id__flow_id__variation_id"], "unique_id": "test.shopify_holistic_reporting.dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__daily_customer_metrics_date_day__email__klaviyo_source_relation__shopify_source_relation__campaign_id__flow_id__variation_id.0489c190fd", "package_name": "shopify_holistic_reporting", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_holistic_reporting", "path": "dbt_utils_unique_combination_o_4b14da03db00d67d51bb9e9f7e8b766f.sql", "original_file_path": "models/shopify_holistic_reporting.yml", "name": "dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__daily_customer_metrics_date_day__email__klaviyo_source_relation__shopify_source_relation__campaign_id__flow_id__variation_id", "alias": "dbt_utils_unique_combination_o_4b14da03db00d67d51bb9e9f7e8b766f", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["shopify_holistic_reporting__daily_customer_metrics"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_holistic_reporting/models/shopify_holistic_reporting.yml/dbt_utils_unique_combination_o_4b14da03db00d67d51bb9e9f7e8b766f.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_4b14da03db00d67d51bb9e9f7e8b766f"}, "created_at": 1665702405.310959, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n date_day, email, klaviyo_source_relation, shopify_source_relation, campaign_id, flow_id, variation_id\n from `dbt-package-testing`.`linkedin_integration_tests_shopify_holistic`.`shopify_holistic_reporting__daily_customer_metrics`\n group by date_day, email, klaviyo_source_relation, shopify_source_relation, campaign_id, flow_id, variation_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.shopify_holistic_reporting__daily_customer_metrics"}, "test.shopify_holistic_reporting.dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__orders_attribution_order_id__shopify_source_relation.0eb46743bb": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_ed10bd87338124f135be382dd44f7c6a\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["order_id", "shopify_source_relation"], "model": "{{ get_where_subquery(ref('shopify_holistic_reporting__orders_attribution')) }}"}, "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.shopify_holistic_reporting.shopify_holistic_reporting__orders_attribution"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_ed10bd87338124f135be382dd44f7c6a", "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["shopify_holistic_reporting", "dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__orders_attribution_order_id__shopify_source_relation"], "unique_id": "test.shopify_holistic_reporting.dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__orders_attribution_order_id__shopify_source_relation.0eb46743bb", "package_name": "shopify_holistic_reporting", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_holistic_reporting", "path": "dbt_utils_unique_combination_o_ed10bd87338124f135be382dd44f7c6a.sql", "original_file_path": "models/shopify_holistic_reporting.yml", "name": "dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__orders_attribution_order_id__shopify_source_relation", "alias": "dbt_utils_unique_combination_o_ed10bd87338124f135be382dd44f7c6a", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["shopify_holistic_reporting__orders_attribution"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_holistic_reporting/models/shopify_holistic_reporting.yml/dbt_utils_unique_combination_o_ed10bd87338124f135be382dd44f7c6a.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_ed10bd87338124f135be382dd44f7c6a"}, "created_at": 1665702405.3141189, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n order_id, shopify_source_relation\n from `dbt-package-testing`.`linkedin_integration_tests_shopify_holistic`.`shopify_holistic_reporting__orders_attribution`\n group by order_id, shopify_source_relation\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.shopify_holistic_reporting__orders_attribution"}}, "sources": {"source.shopify_source.shopify.order": {"fqn": ["shopify_source", "shopify", "order"], "database": "dbt-package-testing", "schema": "shopify", "unique_id": "source.shopify_source.shopify.order", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "models/src_shopify.yml", "original_file_path": "models/src_shopify.yml", "name": "order", "source_name": "shopify", "source_description": "", "loader": "", "identifier": "order", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": true, "column": null}, "loaded_at_field": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents an order in Shopify.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "app_id": {"name": "app_id", "description": "The ID of the app that created the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_address_1": {"name": "billing_address_address_1", "description": "The street address of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_address_2": {"name": "billing_address_address_2", "description": "An optional additional field for the street address of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_city": {"name": "billing_address_city", "description": "The city, town, or village of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_company": {"name": "billing_address_company", "description": "The company of the person associated with the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_country": {"name": "billing_address_country", "description": "The name of the country of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_country_code": {"name": "billing_address_country_code", "description": "The two-letter code (ISO 3166-1 format) for the country of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_first_name": {"name": "billing_address_first_name", "description": "The first name of the person associated with the payment method.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_last_name": {"name": "billing_address_last_name", "description": "The last name of the person associated with the payment method.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_latitude": {"name": "billing_address_latitude", "description": "The latitude of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_longitude": {"name": "billing_address_longitude", "description": "The longitude of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_name": {"name": "billing_address_name", "description": "The full name of the person associated with the payment method.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_phone": {"name": "billing_address_phone", "description": "The phone number at the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_province": {"name": "billing_address_province", "description": "The name of the region (province, state, prefecture, \u2026) of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_province_code": {"name": "billing_address_province_code", "description": "The two-letter abbreviation of the region of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_zip": {"name": "billing_address_zip", "description": "The postal code (zip, postcode, Eircode, \u2026) of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "browser_ip": {"name": "browser_ip", "description": "The IP address of the browser used by the customer when they placed the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "buyer_accepts_marketing": {"name": "buyer_accepts_marketing", "description": "Whether the customer consented to receive email updates from the shop.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "cancel_reason": {"name": "cancel_reason", "description": "The reason why the order was canceled.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "cancelled_at": {"name": "cancelled_at", "description": "The date and time when the order was canceled.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "cart_token": {"name": "cart_token", "description": "The ID of the cart that's associated with the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "closed_at": {"name": "closed_at", "description": "The date and time when the order was closed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "The autogenerated date and time when the order was created in Shopify.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "The three-letter code for the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "customer_id": {"name": "customer_id", "description": "The ID of the order's customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email": {"name": "email", "description": "The customer's email address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "financial_status": {"name": "financial_status", "description": "The status of payments associated with the order. Can only be set when the order is created", "meta": {}, "data_type": null, "quote": null, "tags": []}, "fulfillment_status": {"name": "fulfillment_status", "description": "The order's status in terms of fulfilled line items.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "id": {"name": "id", "description": "The ID of the order, used for API purposes. This is different from the order_number property, which is the ID used by the shop owner and customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "landing_site_base_url": {"name": "landing_site_base_url", "description": "The URL for the page where the buyer landed when they entered the shop.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "location_id": {"name": "location_id", "description": "The ID of the physical location where the order was processed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "name": {"name": "name", "description": "The order name, generated by combining the order_number property with the order prefix and suffix that are set in the merchant's general settings.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "note": {"name": "note", "description": "An optional note that a shop owner can attach to the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "number": {"name": "number", "description": "The order's position in the shop's count of orders. Numbers are sequential and start at 1.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_number": {"name": "order_number", "description": "The order 's position in the shop's count of orders starting at 1001. Order numbers are sequential and start at 1001.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "processed_at": {"name": "processed_at", "description": "The date and time when an order was processed. This value is the date that appears on your orders and that's used in the analytic reports.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "processing_method": {"name": "processing_method", "description": "How the payment was processed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "referring_site": {"name": "referring_site", "description": "The website where the customer clicked a link to the shop.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_address_1": {"name": "shipping_address_address_1", "description": "The street address of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_address_2": {"name": "shipping_address_address_2", "description": "An optional additional field for the street address of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_city": {"name": "shipping_address_city", "description": "The city, town, or village of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_company": {"name": "shipping_address_company", "description": "The company of the person associated with the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_country": {"name": "shipping_address_country", "description": "The name of the country of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_country_code": {"name": "shipping_address_country_code", "description": "The two-letter code (ISO 3166-1 format) for the country of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_first_name": {"name": "shipping_address_first_name", "description": "The first name of the person associated with the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_last_name": {"name": "shipping_address_last_name", "description": "The last name of the person associated with the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_latitude": {"name": "shipping_address_latitude", "description": "The latitude of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_longitude": {"name": "shipping_address_longitude", "description": "The longitude of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_name": {"name": "shipping_address_name", "description": "The full name of the person associated with the payment method.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_phone": {"name": "shipping_address_phone", "description": "The phone number at the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_province": {"name": "shipping_address_province", "description": "The name of the region (province, state, prefecture, \u2026) of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_province_code": {"name": "shipping_address_province_code", "description": "The two-letter abbreviation of the region of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_zip": {"name": "shipping_address_zip", "description": "The postal code (zip, postcode, Eircode, \u2026) of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_name": {"name": "source_name", "description": "Where the order originated. Can be set only during order creation, and is not writeable afterwards.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "subtotal_price": {"name": "subtotal_price", "description": "The price of the order in the shop currency after discounts but before shipping, taxes, and tips.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taxes_included": {"name": "taxes_included", "description": "Whether taxes are included in the order subtotal.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "test": {"name": "test", "description": "Whether this is a test order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "token": {"name": "token", "description": "A unique token for the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_discounts": {"name": "total_discounts", "description": "The total discounts applied to the price of the order in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_line_items_price": {"name": "total_line_items_price", "description": "The sum of all line item prices in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_price": {"name": "total_price", "description": "The sum of all line item prices, discounts, shipping, taxes, and tips in the shop currency. Must be positive.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_tax": {"name": "total_tax", "description": "The sum of all the taxes applied to the order in th shop currency. Must be positive).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_weight": {"name": "total_weight", "description": "The sum of all line item weights in grams.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_at": {"name": "updated_at", "description": "The date and time (ISO 8601 format) when the order was last modified.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "user_id": {"name": "user_id", "description": "The ID of the user logged into Shopify POS who processed the order, if applicable.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`dbt-package-testing`.`shopify`.`order`", "created_at": 1665702405.328304}, "source.shopify_source.shopify.customer": {"fqn": ["shopify_source", "shopify", "customer"], "database": "dbt-package-testing", "schema": "shopify", "unique_id": "source.shopify_source.shopify.customer", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "models/src_shopify.yml", "original_file_path": "models/src_shopify.yml", "name": "customer", "source_name": "shopify", "source_description": "", "loader": "", "identifier": "customer", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a customer in Shopify.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "accepts_marketing": {"name": "accepts_marketing", "description": "Whether the customer has consented to receive marketing material via email.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "The date and time when the customer was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "default_address_id": {"name": "default_address_id", "description": "The default address for the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email": {"name": "email", "description": "The unique email address of the customer. Attempting to assign the same email address to multiple customers returns an error.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_name": {"name": "first_name", "description": "The customer's first name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "id": {"name": "id", "description": "A unique identifier for the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_name": {"name": "last_name", "description": "The customer's last name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "orders_count": {"name": "orders_count", "description": "The number of orders associated with this customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "phone": {"name": "phone", "description": "The unique phone number (E.164 format) for this customer. Attempting to assign the same phone number to multiple customers returns an error.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "state": {"name": "state", "description": "The state of the customer's account with a shop.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tax_exempt": {"name": "tax_exempt", "description": "Whether the customer is exempt from paying taxes on their order. If true, then taxes won't be applied to an order at checkout. If false, then taxes will be applied at checkout.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_spent": {"name": "total_spent", "description": "The total amount of money that the customer has spent across their order history.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_at": {"name": "updated_at", "description": "The date and time when the customer information was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "verified_email": {"name": "verified_email", "description": "Whether the customer has verified their email address.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`dbt-package-testing`.`shopify`.`customer`", "created_at": 1665702405.328404}, "source.shopify_source.shopify.order_line": {"fqn": ["shopify_source", "shopify", "order_line"], "database": "dbt-package-testing", "schema": "shopify", "unique_id": "source.shopify_source.shopify.order_line", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "models/src_shopify.yml", "original_file_path": "models/src_shopify.yml", "name": "order_line", "source_name": "shopify", "source_description": "", "loader": "", "identifier": "order_line", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a line item for an order in Shopify.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "fulfillable_quantity": {"name": "fulfillable_quantity", "description": "The amount available to fulfill, calculated as follows: quantity - max(refunded_quantity, fulfilled_quantity) - pending_fulfilled_quantity - open_fulfilled_quantity", "meta": {}, "data_type": null, "quote": null, "tags": []}, "fulfillment_service": {"name": "fulfillment_service", "description": "The service provider that's fulfilling the item.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "fulfillment_status": {"name": "fulfillment_status", "description": "How far along an order is in terms line items fulfilled.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "gift_card": {"name": "gift_card", "description": "Whether the item is a gift card. If true, then the item is not taxed or considered for shipping charges.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "grams": {"name": "grams", "description": "The weight of the item in grams.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "id": {"name": "id", "description": "The ID of the line item.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "name": {"name": "name", "description": "The name of the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_id": {"name": "order_id", "description": "The ID of the related order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "price": {"name": "price", "description": "The price of the item before discounts have been applied in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "product_id": {"name": "product_id", "description": "The ID of the product that the line item belongs to. Can be null if the original product associated with the order is deleted at a later date.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "quantity": {"name": "quantity", "description": "The number of items that were purchased.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "requires_shipping": {"name": "requires_shipping", "description": "Whether the item requires shipping.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "sku": {"name": "sku", "description": "The item's SKU (stock keeping unit).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taxable": {"name": "taxable", "description": "Whether the item was taxable.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "title": {"name": "title", "description": "The title of the product.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_discount": {"name": "total_discount", "description": "The total amount of the discount allocated to the line item in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_id": {"name": "variant_id", "description": "The ID of the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "vendor": {"name": "vendor", "description": "The name of the item's supplier.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`dbt-package-testing`.`shopify`.`order_line`", "created_at": 1665702405.3284879}, "source.shopify_source.shopify.order_line_refund": {"fqn": ["shopify_source", "shopify", "order_line_refund"], "database": "dbt-package-testing", "schema": "shopify", "unique_id": "source.shopify_source.shopify.order_line_refund", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "models/src_shopify.yml", "original_file_path": "models/src_shopify.yml", "name": "order_line_refund", "source_name": "shopify", "source_description": "", "loader": "", "identifier": "order_line_refund", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a line item refund in Shopify.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "id": {"name": "id", "description": "The unique identifier of the line item in the refund.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "location_id": {"name": "location_id", "description": "TThe unique identifier of the location where the items will be restockedBD", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_line_id": {"name": "order_line_id", "description": "The ID of the related line item in the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "quantity": {"name": "quantity", "description": "The quantity of the associated line item that was returned.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refund_id": {"name": "refund_id", "description": "The ID of the related refund.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "restock_type": {"name": "restock_type", "description": "How this refund line item affects inventory levels.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "subtotal": {"name": "subtotal", "description": "Subtotal amount of the order line refund", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_tax": {"name": "total_tax", "description": "The total tax applied to the refund.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`dbt-package-testing`.`shopify`.`order_line_refund`", "created_at": 1665702405.328558}, "source.shopify_source.shopify.product": {"fqn": ["shopify_source", "shopify", "product"], "database": "dbt-package-testing", "schema": "shopify", "unique_id": "source.shopify_source.shopify.product", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "models/src_shopify.yml", "original_file_path": "models/src_shopify.yml", "name": "product", "source_name": "shopify", "source_description": "", "loader": "", "identifier": "product", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a product in Shopify.", "columns": {"_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Whether the record has been deleted in the source system.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "The date and time when the product was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "handle": {"name": "handle", "description": "A unique human-friendly string for the product. Automatically generated from the product's title.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "id": {"name": "id", "description": "An unsigned 64-bit integer that's used as a unique identifier for the product. Each id is unique across the Shopify system. No two products will have the same id, even if they're from different shops.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "product_type": {"name": "product_type", "description": "A categorization for the product used for filtering and searching products.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "published_at": {"name": "published_at", "description": "The date and time (ISO 8601 format) when the product was published. Can be set to null to unpublish the product from the Online Store channel.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "published_scope": {"name": "published_scope", "description": "Whether the product is published to the Point of Sale channel.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "title": {"name": "title", "description": "The name of the product.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_at": {"name": "updated_at", "description": "The date and time when the product was last modified.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "vendor": {"name": "vendor", "description": "The name of the product's vendor.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`dbt-package-testing`.`shopify`.`product`", "created_at": 1665702405.32863}, "source.shopify_source.shopify.product_variant": {"fqn": ["shopify_source", "shopify", "product_variant"], "database": "dbt-package-testing", "schema": "shopify", "unique_id": "source.shopify_source.shopify.product_variant", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "models/src_shopify.yml", "original_file_path": "models/src_shopify.yml", "name": "product_variant", "source_name": "shopify", "source_description": "", "loader": "", "identifier": "product_variant", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a product variant in Shopify", "columns": {"barcode": {"name": "barcode", "description": "The barcode, UPC, or ISBN number for the product.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "compare_at_price": {"name": "compare_at_price", "description": "The original price of the item before an adjustment or a sale.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "The date and time (ISO 8601 format) when the product variant was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "fulfillment_service": {"name": "fulfillment_service", "description": "The fulfillment service associated with the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "grams": {"name": "grams", "description": "The weight of the product variant in grams.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "id": {"name": "id", "description": "The unique numeric identifier for the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "image_id": {"name": "image_id", "description": "The unique numeric identifier for a product's image. The image must be associated to the same product as the variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "inventory_item_id": {"name": "inventory_item_id", "description": "The unique identifier for the inventory item, which is used in the Inventory API to query for inventory information.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "inventory_management": {"name": "inventory_management", "description": "The fulfillment service that tracks the number of items in stock for the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "inventory_policy": {"name": "inventory_policy", "description": "Whether customers are allowed to place an order for the product variant when it's out of stock.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "inventory_quantity": {"name": "inventory_quantity", "description": "An aggregate of inventory across all locations. To adjust inventory at a specific location, use the InventoryLevel resource.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "old_inventory_quantity": {"name": "old_inventory_quantity", "description": "This property is deprecated. Use the InventoryLevel resource instead.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "option_1": {"name": "option_1", "description": "The custom properties that a shop owner uses to define product variants. You can define three options for a product variant: option1, option2, option3.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "option_2": {"name": "option_2", "description": "The custom properties that a shop owner uses to define product variants. You can define three options for a product variant: option1, option2, option3.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "option_3": {"name": "option_3", "description": "The custom properties that a shop owner uses to define product variants. You can define three options for a product variant: option1, option2, option3.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "position": {"name": "position", "description": "The order of the product variant in the list of product variants. The first position in the list is 1. The position of variants is indicated by the order in which they are listed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "price": {"name": "price", "description": "The price of the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "product_id": {"name": "product_id", "description": "The unique numeric identifier for the product.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "requires_shipping": {"name": "requires_shipping", "description": "This property is deprecated. Use the `requires_shipping` property on the InventoryItem resource instead.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "sku": {"name": "sku", "description": "A unique identifier for the product variant in the shop. Required in order to connect to a FulfillmentService.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taxable": {"name": "taxable", "description": "Whether a tax is charged when the product variant is sold.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tax_code": {"name": "tax_code", "description": "This parameter applies only to the stores that have the Avalara AvaTax app installed. Specifies the Avalara tax code for the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "title": {"name": "title", "description": "The title of the product variant. The title field is a concatenation of the option1, option2, and option3 fields. You can only update title indirectly using the option fields.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_at": {"name": "updated_at", "description": "The date and time when the product variant was last modified. Gets returned in ISO 8601 format.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "weight": {"name": "weight", "description": "The weight of the product variant in the unit system specified with weight_unit.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "weight_unit": {"name": "weight_unit", "description": "The unit of measurement that applies to the product variant's weight. If you don't specify a value for weight_unit, then the shop's default unit of measurement is applied. Valid values: g, kg, oz, and lb.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_shipping_price_set": {"name": "total_shipping_price_set", "description": "The total shipping price set for the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "index": {"name": "index", "description": "The index associated with the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "pre_tax_price": {"name": "pre_tax_price", "description": "The total pre tax price of the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`dbt-package-testing`.`shopify`.`product_variant`", "created_at": 1665702405.328717}, "source.shopify_source.shopify.transaction": {"fqn": ["shopify_source", "shopify", "transaction"], "database": "dbt-package-testing", "schema": "shopify", "unique_id": "source.shopify_source.shopify.transaction", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "models/src_shopify.yml", "original_file_path": "models/src_shopify.yml", "name": "transaction", "source_name": "shopify", "source_description": "", "loader": "", "identifier": "transaction", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a transaction in Shopify.", "columns": {"transaction_id": {"name": "transaction_id", "description": "The ID for the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_id": {"name": "order_id", "description": "The ID for the order that the transaction is associated with.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refund_id": {"name": "refund_id", "description": "The ID associated with a refund in the refund table.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "amount": {"name": "amount", "description": "The amount of money included in the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "authorization": {"name": "authorization", "description": "The authorization code associated with the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_timestamp": {"name": "created_timestamp", "description": "The date and time when the transaction was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "processed_timestamp": {"name": "processed_timestamp", "description": "The date and time when a transaction was processed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "device_id": {"name": "device_id", "description": "The ID for the device.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "gateway": {"name": "gateway", "description": "The name of the gateway the transaction was issued through.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_name": {"name": "source_name", "description": "The origin of the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "message": {"name": "message", "description": "A string generated by the payment provider with additional information about why the transaction succeeded or failed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "The three-letter code (ISO 4217 format) for the currency used for the payment.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "location_id": {"name": "location_id", "description": "The ID of the physical location where the transaction was processed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "parent_id": {"name": "parent_id", "description": "The ID of an associated transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payment_avs_result_code": {"name": "payment_avs_result_code", "description": "The response code from the address verification system.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payment_credit_card_bin": {"name": "payment_credit_card_bin", "description": "The issuer identification number (IIN), formerly known as bank identification number (BIN) of the customer's credit card.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payment_cvv_result_code": {"name": "payment_cvv_result_code", "description": "The response code from the credit card company indicating whether the customer entered the card security code, or card verification value, correctly.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payment_credit_card_number": {"name": "payment_credit_card_number", "description": "The customer's credit card number, with most of the leading digits redacted.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payment_credit_card_company": {"name": "payment_credit_card_company", "description": "The name of the company that issued the customer's credit card.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "kind": {"name": "kind", "description": "The transaction's type.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "receipt": {"name": "receipt", "description": "A transaction receipt attached to the transaction by the gateway.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency_exchange_id": {"name": "currency_exchange_id", "description": "The ID of the adjustment.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency_exchange_adjustment": {"name": "currency_exchange_adjustment", "description": "The difference between the amounts on the associated transaction and the parent transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency_exchange_original_amount": {"name": "currency_exchange_original_amount", "description": "The amount of the parent transaction in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency_exchange_final_amount": {"name": "currency_exchange_final_amount", "description": "The amount of the associated transaction in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency_exchange_currency": {"name": "currency_exchange_currency", "description": "The shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "error_code": {"name": "error_code", "description": "A standardized error code, independent of the payment provider.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status": {"name": "status", "description": "The status of the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "test": {"name": "test", "description": "Whether the transaction is a test transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "user_id": {"name": "user_id", "description": "The ID for the user who was logged into the Shopify POS device when the order was processed, if applicable.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`dbt-package-testing`.`shopify`.`transaction`", "created_at": 1665702405.328804}, "source.shopify_source.shopify.refund": {"fqn": ["shopify_source", "shopify", "refund"], "database": "dbt-package-testing", "schema": "shopify", "unique_id": "source.shopify_source.shopify.refund", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "models/src_shopify.yml", "original_file_path": "models/src_shopify.yml", "name": "refund", "source_name": "shopify", "source_description": "", "loader": "", "identifier": "refund", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a refund within Shopify.", "columns": {"id": {"name": "id", "description": "The unique numeric identifier for the refund.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "Timestamp of the date when the refund was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "processed_at": {"name": "processed_at", "description": "Timestamp of the date when the refund was processed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "note": {"name": "note", "description": "User generated note attached to the refund.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "restock": {"name": "restock", "description": "Boolean indicating if the refund is a result of a restock.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "user_id": {"name": "user_id", "description": "Reference to the user id which generated the refund.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_duties_set": {"name": "total_duties_set", "description": "Record representing total duties set for the refund.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_id": {"name": "order_id", "description": "Reference to the order which the refund is associated.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`dbt-package-testing`.`shopify`.`refund`", "created_at": 1665702405.328871}, "source.shopify_source.shopify.order_adjustment": {"fqn": ["shopify_source", "shopify", "order_adjustment"], "database": "dbt-package-testing", "schema": "shopify", "unique_id": "source.shopify_source.shopify.order_adjustment", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "models/src_shopify.yml", "original_file_path": "models/src_shopify.yml", "name": "order_adjustment", "source_name": "shopify", "source_description": "", "loader": "", "identifier": "order_adjustment", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents and adjustment to and order within Shopify.", "columns": {"id": {"name": "id", "description": "The unique numeric identifier for the order adjustment.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_id": {"name": "order_id", "description": "Reference to the order which the adjustment is associated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refund_id": {"name": "refund_id", "description": "Reference to the refund which the adjustment is associated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "amount": {"name": "amount", "description": "Amount of the adjustment.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tax_amount": {"name": "tax_amount", "description": "Tax amount applied to the order adjustment.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "kind": {"name": "kind", "description": "The kind of order adjustment (eg. refund, restock, etc.).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "reason": {"name": "reason", "description": "The reason for the order adjustment.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "amount_set": {"name": "amount_set", "description": "Amount set towards the order adjustment", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tax_amount_set": {"name": "tax_amount_set", "description": "Tax amount set towards the order adjustment.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`dbt-package-testing`.`shopify`.`order_adjustment`", "created_at": 1665702405.328938}, "source.klaviyo_source.klaviyo.campaign": {"fqn": ["klaviyo_source", "klaviyo", "campaign"], "database": "dbt-package-testing", "schema": "klaviyo", "unique_id": "source.klaviyo_source.klaviyo.campaign", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "models/src_klaviyo.yml", "original_file_path": "models/src_klaviyo.yml", "name": "campaign", "source_name": "klaviyo", "source_description": "", "loader": "fivetran", "identifier": "campaign", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 72, "period": "hour"}, "error_after": {"count": 96, "period": "hour"}, "filter": null}, "external": null, "description": "Table capturing email campaigns in Klaviyo. \n", "columns": {"_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean that is true if the campaign has been soft-deleted.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_type": {"name": "campaign_type", "description": "Type of campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created": {"name": "created", "description": "Timestamp of when the campaign was created, in UTC.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email_template_id": {"name": "email_template_id", "description": "Foreign key referencing the ID of the `email_template` object that will be the content of this campaign. Note the Email Template is copied when creating this campaign, so future changes to that Email Template will not alter the content of this campaign.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "from_email": {"name": "from_email", "description": "The email address your email will be sent from and will be used in the reply-to header.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "from_name": {"name": "from_name", "description": "The name or label associated with the email address you're sending from.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "id": {"name": "id", "description": "Unique ID of the campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_segmented": {"name": "is_segmented", "description": "Boolean that is true if the campaign is directed at a Klaviyo segment (not a list).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "name": {"name": "name", "description": "A name for this campaign. If not specified, this will default to the subject of the campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "send_time": {"name": "send_time", "description": "Timestamp of when the campaign is scheduled to be sent in the future, if [\"smart send time\"](https://help.klaviyo.com/hc/en-us/articles/360029794371-Smart-Send-Time-in-Klaviyo#how-to-utilize-smart-send-time3) is used. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "sent_at": {"name": "sent_at", "description": "Timestamp of when the campaign was first sent out to users.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status": {"name": "status", "description": "Current status of the campaign. Either \"draft\", \"scheduled\", \"sent\", or \"cancelled\".", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status_id": {"name": "status_id", "description": "Corresponding ID to the current status.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status_label": {"name": "status_label", "description": "The label of the status as it appears in the UI (should be the same as `status`).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "subject": {"name": "subject", "description": "The subject line of the campaign's email.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated": {"name": "updated", "description": "Timestamp of when the campaign was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`dbt-package-testing`.`klaviyo`.`campaign`", "created_at": 1665702405.329047}, "source.klaviyo_source.klaviyo.event": {"fqn": ["klaviyo_source", "klaviyo", "event"], "database": "dbt-package-testing", "schema": "klaviyo", "unique_id": "source.klaviyo_source.klaviyo.event", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "models/src_klaviyo.yml", "original_file_path": "models/src_klaviyo.yml", "name": "event", "source_name": "klaviyo", "source_description": "", "loader": "fivetran", "identifier": "event", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 72, "period": "hour"}, "error_after": {"count": 96, "period": "hour"}, "filter": null}, "external": null, "description": "Table of events (and metrics) triggered in Klaviyo or via its integrations. Custom columns can be passed through to downstream models via the `klaviyo__event_pass_through_columns` variable (see README for details).\n", "columns": {"_variation": {"name": "_variation", "description": "Unique ID of the attributed flow or campaign variation group. This does not map onto another table. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Foreign key referencing the CAMPAIGN that the event is attributed to.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "datetime": {"name": "datetime", "description": "Timestamp of when the event was recorded in Klaviyo. Should be the same/nominally off from `timestamp`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "timestamp": {"name": "timestamp", "description": "Timestamp of when the event was triggered. Should be the same/nominally off from `datetime`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_id": {"name": "flow_id", "description": "Foreign key referencing the FLOW that the event is attributed to.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_message_id": {"name": "flow_message_id", "description": "Unique ID of the FLOW_MESSAGE that the event is attributed to. This does not map onto another table.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "id": {"name": "id", "description": "Unique ID of the event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "metric_id": {"name": "metric_id", "description": "Foreign key referencing the metric being captured.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "person_id": {"name": "person_id", "description": "Foreign key referencing the PERSON who triggered the event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "type": {"name": "type", "description": "Type of event that was triggered. This is the same as the METRIC name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "uuid": {"name": "uuid", "description": "Universally Unique Identifier of the event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "property_value": {"name": "property_value", "description": "Numeric value associated with the event (ie the dollars associated with a purchase).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean that is true if the campaign has been soft-deleted.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`dbt-package-testing`.`klaviyo`.`event`", "created_at": 1665702405.329118}, "source.klaviyo_source.klaviyo.flow": {"fqn": ["klaviyo_source", "klaviyo", "flow"], "database": "dbt-package-testing", "schema": "klaviyo", "unique_id": "source.klaviyo_source.klaviyo.flow", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "models/src_klaviyo.yml", "original_file_path": "models/src_klaviyo.yml", "name": "flow", "source_name": "klaviyo", "source_description": "", "loader": "fivetran", "identifier": "flow", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 72, "period": "hour"}, "error_after": {"count": 96, "period": "hour"}, "filter": null}, "external": null, "description": "Table of automated, triggered flow sequences in Klaviyo.", "columns": {"created": {"name": "created", "description": "Timestamp of when the flow was first created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "id": {"name": "id", "description": "Unique ID of the flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "name": {"name": "name", "description": "Name of the flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status": {"name": "status", "description": "Current status of the flow. Either 'manual', 'live', or 'draft'. Read more [here](https://help.klaviyo.com/hc/en-us/articles/115002774932-Getting-Started-with-Flows#the-flow-action-status9).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "trigger": {"name": "trigger", "description": "JSON of metric, segment, list, and/or date-property filters that will trigger this flow. These are applied to the **event level**.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated": {"name": "updated", "description": "Timestamp of when the flow was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "customer_filter": {"name": "customer_filter", "description": "JSON of flow filters placed on the **person level** that will trigger this flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean that is true if the campaign has been soft-deleted.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`dbt-package-testing`.`klaviyo`.`flow`", "created_at": 1665702405.3291829}, "source.klaviyo_source.klaviyo.integration": {"fqn": ["klaviyo_source", "klaviyo", "integration"], "database": "dbt-package-testing", "schema": "klaviyo", "unique_id": "source.klaviyo_source.klaviyo.integration", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "models/src_klaviyo.yml", "original_file_path": "models/src_klaviyo.yml", "name": "integration", "source_name": "klaviyo", "source_description": "", "loader": "fivetran", "identifier": "integration", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 72, "period": "hour"}, "error_after": {"count": 96, "period": "hour"}, "filter": null}, "external": null, "description": "Table storing third-party platforms integrated into Klaviyo.", "columns": {"category": {"name": "category", "description": "Use-case category of the integrated platform.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "id": {"name": "id", "description": "Unique ID of the integration.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "name": {"name": "name", "description": "Name of the integrated platform.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean that is true if the campaign has been soft-deleted.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`dbt-package-testing`.`klaviyo`.`integration`", "created_at": 1665702405.3292449}, "source.klaviyo_source.klaviyo.person": {"fqn": ["klaviyo_source", "klaviyo", "person"], "database": "dbt-package-testing", "schema": "klaviyo", "unique_id": "source.klaviyo_source.klaviyo.person", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "models/src_klaviyo.yml", "original_file_path": "models/src_klaviyo.yml", "name": "person", "source_name": "klaviyo", "source_description": "", "loader": "fivetran", "identifier": "person", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 72, "period": "hour"}, "error_after": {"count": 96, "period": "hour"}, "filter": null}, "external": null, "description": "Table storing the profiles of all people/users interacted with. Custom columns can be passed through to downstream models via the `klaviyo__person_pass_through_columns` variable (see README for details).\n", "columns": {"id": {"name": "id", "description": "Unique ID of the user if you use your own unique identifier. Otherwise, Klaviyo recommends using the email as the primary key. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "address_1": {"name": "address_1", "description": "First line of the person's address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "address_2": {"name": "address_2", "description": "Second line of the person's address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "city": {"name": "city", "description": "City they live in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "country": {"name": "country", "description": "Country they live in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "zip": {"name": "zip", "description": "Postal code where they live.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created": {"name": "created", "description": "Timestamp of when the person's profile was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email": {"name": "email", "description": "The email address and the unique identifier for a profile.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_name": {"name": "first_name", "description": "Person's first name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_name": {"name": "last_name", "description": "Person's surname.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "latitude": {"name": "latitude", "description": "Latitude of the person's location.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "longitude": {"name": "longitude", "description": "Longitude of the person's location.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization": {"name": "organization", "description": "Business organization they belong to.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "phone_number": {"name": "phone_number", "description": "Associated phone number.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "region": {"name": "region", "description": "Region or state they live in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "timezone": {"name": "timezone", "description": "Timezone they are situated in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "title": {"name": "title", "description": "Title at their business or organization.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated": {"name": "updated", "description": "Timestamp of when the person profile was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean that is true if the campaign has been soft-deleted.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`dbt-package-testing`.`klaviyo`.`person`", "created_at": 1665702405.329321}, "source.klaviyo_source.klaviyo.metric": {"fqn": ["klaviyo_source", "klaviyo", "metric"], "database": "dbt-package-testing", "schema": "klaviyo", "unique_id": "source.klaviyo_source.klaviyo.metric", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "models/src_klaviyo.yml", "original_file_path": "models/src_klaviyo.yml", "name": "metric", "source_name": "klaviyo", "source_description": "", "loader": "fivetran", "identifier": "metric", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 72, "period": "hour"}, "error_after": {"count": 96, "period": "hour"}, "filter": null}, "external": null, "description": "Table of tracked metrics across integrations in Klaviyo.", "columns": {"created": {"name": "created", "description": "Timestamp of when the metric was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "id": {"name": "id", "description": "Unique ID of the metric being tracked.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "integration_id": {"name": "integration_id", "description": "Foreign key referencing the INTEGRATION that the metric is being pulled from.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "name": {"name": "name", "description": "Name of the metric (same as `EVENT.type`)", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated": {"name": "updated", "description": "Timestamp of when the metric was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean that is true if the campaign has been soft-deleted.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`dbt-package-testing`.`klaviyo`.`metric`", "created_at": 1665702405.329383}}, "macros": {"macro.dbt_bigquery.date_sharded_table": {"unique_id": "macro.dbt_bigquery.date_sharded_table", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.909361}, "macro.dbt_bigquery.grant_access_to": {"unique_id": "macro.dbt_bigquery.grant_access_to", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.90958}, "macro.dbt_bigquery.get_partitions_metadata": {"unique_id": "macro.dbt_bigquery.get_partitions_metadata", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.909854}, "macro.dbt_bigquery.bigquery__get_catalog": {"unique_id": "macro.dbt_bigquery.bigquery__get_catalog", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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_utils.replace", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702403.913013}, "macro.dbt_bigquery.partition_by": {"unique_id": "macro.dbt_bigquery.partition_by", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.918139}, "macro.dbt_bigquery.cluster_by": {"unique_id": "macro.dbt_bigquery.cluster_by", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9185011}, "macro.dbt_bigquery.bigquery_options": {"unique_id": "macro.dbt_bigquery.bigquery_options", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9188428}, "macro.dbt_bigquery.bigquery_table_options": {"unique_id": "macro.dbt_bigquery.bigquery_table_options", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9190972}, "macro.dbt_bigquery.bigquery__create_table_as": {"unique_id": "macro.dbt_bigquery.bigquery__create_table_as", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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, 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 {{ sql }}\n );\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"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702403.9197161}, "macro.dbt_bigquery.bigquery_view_options": {"unique_id": "macro.dbt_bigquery.bigquery_view_options", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.919947}, "macro.dbt_bigquery.bigquery__create_view_as": {"unique_id": "macro.dbt_bigquery.bigquery__create_view_as", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.920256}, "macro.dbt_bigquery.bigquery__create_schema": {"unique_id": "macro.dbt_bigquery.bigquery__create_schema", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery__create_schema", "macro_sql": "{% macro bigquery__create_schema(relation) -%}\n {{ adapter.create_schema(relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702403.920379}, "macro.dbt_bigquery.bigquery__drop_schema": {"unique_id": "macro.dbt_bigquery.bigquery__drop_schema", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.920497}, "macro.dbt_bigquery.bigquery__drop_relation": {"unique_id": "macro.dbt_bigquery.bigquery__drop_relation", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.920676}, "macro.dbt_bigquery.bigquery__get_columns_in_relation": {"unique_id": "macro.dbt_bigquery.bigquery__get_columns_in_relation", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9208179}, "macro.dbt_bigquery.bigquery__list_relations_without_caching": {"unique_id": "macro.dbt_bigquery.bigquery__list_relations_without_caching", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9209611}, "macro.dbt_bigquery.bigquery__current_timestamp": {"unique_id": "macro.dbt_bigquery.bigquery__current_timestamp", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.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": 1665702403.921034}, "macro.dbt_bigquery.bigquery__snapshot_string_as_time": {"unique_id": "macro.dbt_bigquery.bigquery__snapshot_string_as_time", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.921201}, "macro.dbt_bigquery.bigquery__list_schemas": {"unique_id": "macro.dbt_bigquery.bigquery__list_schemas", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.921404}, "macro.dbt_bigquery.bigquery__check_schema_exists": {"unique_id": "macro.dbt_bigquery.bigquery__check_schema_exists", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9215791}, "macro.dbt_bigquery.bigquery__persist_docs": {"unique_id": "macro.dbt_bigquery.bigquery__persist_docs", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.921851}, "macro.dbt_bigquery.bigquery__alter_column_comment": {"unique_id": "macro.dbt_bigquery.bigquery__alter_column_comment", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.922005}, "macro.dbt_bigquery.bigquery__rename_relation": {"unique_id": "macro.dbt_bigquery.bigquery__rename_relation", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.922156}, "macro.dbt_bigquery.bigquery__alter_relation_add_columns": {"unique_id": "macro.dbt_bigquery.bigquery__alter_relation_add_columns", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.922542}, "macro.dbt_bigquery.bigquery__alter_relation_drop_columns": {"unique_id": "macro.dbt_bigquery.bigquery__alter_relation_drop_columns", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9229062}, "macro.dbt_bigquery.bigquery__alter_column_type": {"unique_id": "macro.dbt_bigquery.bigquery__alter_column_type", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9235468}, "macro.dbt_bigquery.bigquery__test_unique": {"unique_id": "macro.dbt_bigquery.bigquery__test_unique", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9237142}, "macro.dbt_bigquery.bigquery__upload_file": {"unique_id": "macro.dbt_bigquery.bigquery__upload_file", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.923991}, "macro.dbt_bigquery.bigquery__create_csv_table": {"unique_id": "macro.dbt_bigquery.bigquery__create_csv_table", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.924352}, "macro.dbt_bigquery.bigquery__reset_csv_table": {"unique_id": "macro.dbt_bigquery.bigquery__reset_csv_table", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9245062}, "macro.dbt_bigquery.bigquery__load_csv_rows": {"unique_id": "macro.dbt_bigquery.bigquery__load_csv_rows", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9251}, "macro.dbt_bigquery.bigquery__handle_existing_table": {"unique_id": "macro.dbt_bigquery.bigquery__handle_existing_table", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.925687}, "macro.dbt_bigquery.materialization_view_bigquery": {"unique_id": "macro.dbt_bigquery.materialization_view_bigquery", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.926333}, "macro.dbt_bigquery.materialization_table_bigquery": {"unique_id": "macro.dbt_bigquery.materialization_table_bigquery", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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' -%}\n\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 {% call statement('main') -%}\n {{ create_table_as(False, target_relation, sql) }}\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}, "patch_path": null, "arguments": [], "created_at": 1665702403.928426}, "macro.dbt_bigquery.materialization_copy_bigquery": {"unique_id": "macro.dbt_bigquery.materialization_copy_bigquery", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9296389}, "macro.dbt_bigquery.declare_dbt_max_partition": {"unique_id": "macro.dbt_bigquery.declare_dbt_max_partition", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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, sql) %}\n\n {% if '_dbt_max_partition' in 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}, "patch_path": null, "arguments": [], "created_at": 1665702403.931506}, "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": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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\", default=\"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}, "patch_path": null, "arguments": [], "created_at": 1665702403.931944}, "macro.dbt_bigquery.bq_insert_overwrite": {"unique_id": "macro.dbt_bigquery.bq_insert_overwrite", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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 {{ 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, sql) }}\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 {#\n TODO: include_sql_header is a hack; consider a better approach that includes\n the sql_header at the materialization-level instead\n #}\n -- 3. run the merge statement\n {{ get_insert_overwrite_merge_sql(target_relation, source_sql, dest_columns, [predicate], include_sql_header=false) }};\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}, "patch_path": null, "arguments": [], "created_at": 1665702403.933156}, "macro.dbt_bigquery.bq_generate_incremental_build_sql": {"unique_id": "macro.dbt_bigquery.bq_generate_incremental_build_sql", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9340029}, "macro.dbt_bigquery.materialization_incremental_bigquery": {"unique_id": "macro.dbt_bigquery.materialization_incremental_bigquery", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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' -%}\n\n {%- set unique_key = config.get('unique_key') -%}\n {%- set full_refresh_mode = (should_full_refresh()) -%}\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 {% set build_sql = create_table_as(False, target_relation, sql) %}\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 {% set build_sql = create_table_as(False, target_relation, sql) %}\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 {% set build_sql = create_table_as(False, target_relation, sql) %}\n\n {% else %}\n {% set tmp_relation_exists = false %}\n {% if on_schema_change != 'ignore' %} {# Check first, since otherwise we may not build a temp table #}\n {% do run_query(\n declare_dbt_max_partition(this, partition_by, sql) + create_table_as(True, tmp_relation, sql)\n ) %}\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 {% 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, sql, unique_key, partition_by, partitions, dest_columns, tmp_relation_exists\n ) %}\n\n {% endif %}\n\n {%- call statement('main') -%}\n {{ build_sql }}\n {% endcall %}\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.create_table_as", "macro.dbt.run_query", "macro.dbt_bigquery.declare_dbt_max_partition", "macro.dbt.process_schema_changes", "macro.dbt_bigquery.bq_generate_incremental_build_sql", "macro.dbt.statement", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702403.936778}, "macro.dbt_bigquery.bigquery__snapshot_hash_arguments": {"unique_id": "macro.dbt_bigquery.bigquery__snapshot_hash_arguments", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9372191}, "macro.dbt_bigquery.bigquery__create_columns": {"unique_id": "macro.dbt_bigquery.bigquery__create_columns", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.937369}, "macro.dbt_bigquery.bigquery__post_snapshot": {"unique_id": "macro.dbt_bigquery.bigquery__post_snapshot", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.937495}, "macro.dbt_bigquery.bigquery__except": {"unique_id": "macro.dbt_bigquery.bigquery__except", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.937655}, "macro.dbt_bigquery.bigquery__dateadd": {"unique_id": "macro.dbt_bigquery.bigquery__dateadd", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.937929}, "macro.dbt_bigquery.bigquery__intersect": {"unique_id": "macro.dbt_bigquery.bigquery__intersect", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.938082}, "macro.dbt_bigquery.bigquery__escape_single_quotes": {"unique_id": "macro.dbt_bigquery.bigquery__escape_single_quotes", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.93832}, "macro.dbt_bigquery.bigquery__right": {"unique_id": "macro.dbt_bigquery.bigquery__right", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.938595}, "macro.dbt_bigquery.bigquery__listagg": {"unique_id": "macro.dbt_bigquery.bigquery__listagg", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9390268}, "macro.dbt_bigquery.bigquery__datediff": {"unique_id": "macro.dbt_bigquery.bigquery__datediff", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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_utils.datediff"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702403.939562}, "macro.dbt_bigquery.bigquery__safe_cast": {"unique_id": "macro.dbt_bigquery.bigquery__safe_cast", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.939779}, "macro.dbt_bigquery.bigquery__hash": {"unique_id": "macro.dbt_bigquery.bigquery__hash", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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_utils.default__hash"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702403.9399931}, "macro.dbt_bigquery.bigquery__position": {"unique_id": "macro.dbt_bigquery.bigquery__position", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9402199}, "macro.dbt_bigquery.bigquery__bool_or": {"unique_id": "macro.dbt_bigquery.bigquery__bool_or", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9404008}, "macro.dbt_bigquery.bigquery__split_part": {"unique_id": "macro.dbt_bigquery.bigquery__split_part", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9409869}, "macro.dbt_bigquery.bigquery__date_trunc": {"unique_id": "macro.dbt_bigquery.bigquery__date_trunc", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9412138}, "macro.dbt_bigquery.bigquery__get_show_grant_sql": {"unique_id": "macro.dbt_bigquery.bigquery__get_show_grant_sql", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.941869}, "macro.dbt_bigquery.bigquery__get_grant_sql": {"unique_id": "macro.dbt_bigquery.bigquery__get_grant_sql", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9421709}, "macro.dbt_bigquery.bigquery__get_revoke_sql": {"unique_id": "macro.dbt_bigquery.bigquery__get_revoke_sql", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.942407}, "macro.dbt.run_hooks": {"unique_id": "macro.dbt.run_hooks", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9434829}, "macro.dbt.make_hook_config": {"unique_id": "macro.dbt.make_hook_config", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.943676}, "macro.dbt.before_begin": {"unique_id": "macro.dbt.before_begin", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.943815}, "macro.dbt.in_transaction": {"unique_id": "macro.dbt.in_transaction", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9439511}, "macro.dbt.after_commit": {"unique_id": "macro.dbt.after_commit", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.944085}, "macro.dbt.set_sql_header": {"unique_id": "macro.dbt.set_sql_header", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9444869}, "macro.dbt.should_full_refresh": {"unique_id": "macro.dbt.should_full_refresh", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.944778}, "macro.dbt.should_store_failures": {"unique_id": "macro.dbt.should_store_failures", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9450722}, "macro.dbt.snapshot_merge_sql": {"unique_id": "macro.dbt.snapshot_merge_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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.default__snapshot_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702403.945535}, "macro.dbt.default__snapshot_merge_sql": {"unique_id": "macro.dbt.default__snapshot_merge_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.945803}, "macro.dbt.strategy_dispatch": {"unique_id": "macro.dbt.strategy_dispatch", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9490361}, "macro.dbt.snapshot_hash_arguments": {"unique_id": "macro.dbt.snapshot_hash_arguments", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__snapshot_hash_arguments"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702403.949198}, "macro.dbt.default__snapshot_hash_arguments": {"unique_id": "macro.dbt.default__snapshot_hash_arguments", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.949406}, "macro.dbt.snapshot_get_time": {"unique_id": "macro.dbt.snapshot_get_time", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_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.default__snapshot_get_time"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702403.949543}, "macro.dbt.default__snapshot_get_time": {"unique_id": "macro.dbt.default__snapshot_get_time", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_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": 1665702403.9496388}, "macro.dbt.snapshot_timestamp_strategy": {"unique_id": "macro.dbt.snapshot_timestamp_strategy", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.950392}, "macro.dbt.snapshot_string_as_time": {"unique_id": "macro.dbt.snapshot_string_as_time", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__snapshot_string_as_time"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702403.950551}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.950716}, "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-bigquery/1.2.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_sql']) -%}\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_sql'] }}) 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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9520729}, "macro.dbt.snapshot_check_strategy": {"unique_id": "macro.dbt.snapshot_check_strategy", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.953326}, "macro.dbt.create_columns": {"unique_id": "macro.dbt.create_columns", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__create_columns"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702403.956888}, "macro.dbt.default__create_columns": {"unique_id": "macro.dbt.default__create_columns", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.957165}, "macro.dbt.post_snapshot": {"unique_id": "macro.dbt.post_snapshot", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__post_snapshot"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702403.9573278}, "macro.dbt.default__post_snapshot": {"unique_id": "macro.dbt.default__post_snapshot", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.957411}, "macro.dbt.get_true_sql": {"unique_id": "macro.dbt.get_true_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.957549}, "macro.dbt.default__get_true_sql": {"unique_id": "macro.dbt.default__get_true_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.95766}, "macro.dbt.snapshot_staging_table": {"unique_id": "macro.dbt.snapshot_staging_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.957856}, "macro.dbt.default__snapshot_staging_table": {"unique_id": "macro.dbt.default__snapshot_staging_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.958703}, "macro.dbt.build_snapshot_table": {"unique_id": "macro.dbt.build_snapshot_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9588869}, "macro.dbt.default__build_snapshot_table": {"unique_id": "macro.dbt.default__build_snapshot_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9591382}, "macro.dbt.build_snapshot_staging_table": {"unique_id": "macro.dbt.build_snapshot_staging_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.959562}, "macro.dbt.materialization_snapshot_default": {"unique_id": "macro.dbt.materialization_snapshot_default", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_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 {% 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}, "patch_path": null, "arguments": [], "created_at": 1665702403.965253}, "macro.dbt.materialization_test_default": {"unique_id": "macro.dbt.materialization_test_default", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9672582}, "macro.dbt.get_test_sql": {"unique_id": "macro.dbt.get_test_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.967747}, "macro.dbt.default__get_test_sql": {"unique_id": "macro.dbt.default__get_test_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9680462}, "macro.dbt.get_where_subquery": {"unique_id": "macro.dbt.get_where_subquery", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.968451}, "macro.dbt.default__get_where_subquery": {"unique_id": "macro.dbt.default__get_where_subquery", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.968821}, "macro.dbt.get_quoted_csv": {"unique_id": "macro.dbt.get_quoted_csv", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.969634}, "macro.dbt.diff_columns": {"unique_id": "macro.dbt.diff_columns", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.970164}, "macro.dbt.diff_column_data_types": {"unique_id": "macro.dbt.diff_column_data_types", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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 %}\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": 1665702403.970756}, "macro.dbt.get_merge_sql": {"unique_id": "macro.dbt.get_merge_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.97548}, "macro.dbt.default__get_merge_sql": {"unique_id": "macro.dbt.default__get_merge_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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 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 {% 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"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702403.976922}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.977211}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.977945}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.978205}, "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-bigquery/1.2.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 {%- 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": 1665702403.978822}, "macro.dbt.is_incremental": {"unique_id": "macro.dbt.is_incremental", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9794931}, "macro.dbt.materialization_incremental_default": {"unique_id": "macro.dbt.materialization_incremental_default", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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 {% set build_sql = get_delete_insert_merge_sql(target_relation, temp_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 {% 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.get_delete_insert_merge_sql", "macro.dbt.statement", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs", "macro.dbt.create_indexes"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702403.983765}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9880378}, "macro.dbt.check_for_schema_changes": {"unique_id": "macro.dbt.check_for_schema_changes", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.989227}, "macro.dbt.sync_column_schemas": {"unique_id": "macro.dbt.sync_column_schemas", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9903932}, "macro.dbt.process_schema_changes": {"unique_id": "macro.dbt.process_schema_changes", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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 {% 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": 1665702403.9910872}, "macro.dbt.materialization_table_default": {"unique_id": "macro.dbt.materialization_table_default", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9935648}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.994028}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9942122}, "macro.dbt.create_table_as": {"unique_id": "macro.dbt.create_table_as", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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, sql) -%}\n {{ adapter.dispatch('create_table_as', 'dbt')(temporary, relation, sql) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__create_table_as"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702403.994411}, "macro.dbt.default__create_table_as": {"unique_id": "macro.dbt.default__create_table_as", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9948108}, "macro.dbt.materialization_view_default": {"unique_id": "macro.dbt.materialization_view_default", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.997277}, "macro.dbt.handle_existing_table": {"unique_id": "macro.dbt.handle_existing_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__handle_existing_table"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702403.9976199}, "macro.dbt.default__handle_existing_table": {"unique_id": "macro.dbt.default__handle_existing_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.997838}, "macro.dbt.create_or_replace_view": {"unique_id": "macro.dbt.create_or_replace_view", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.99933}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9997282}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9998841}, "macro.dbt.create_view_as": {"unique_id": "macro.dbt.create_view_as", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__create_view_as"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.0000598}, "macro.dbt.default__create_view_as": {"unique_id": "macro.dbt.default__create_view_as", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.000316}, "macro.dbt.materialization_seed_default": {"unique_id": "macro.dbt.materialization_seed_default", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.003476}, "macro.dbt.create_csv_table": {"unique_id": "macro.dbt.create_csv_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__create_csv_table"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.007811}, "macro.dbt.default__create_csv_table": {"unique_id": "macro.dbt.default__create_csv_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.008683}, "macro.dbt.reset_csv_table": {"unique_id": "macro.dbt.reset_csv_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__reset_csv_table"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.008914}, "macro.dbt.default__reset_csv_table": {"unique_id": "macro.dbt.default__reset_csv_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.009386}, "macro.dbt.get_csv_sql": {"unique_id": "macro.dbt.get_csv_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.009571}, "macro.dbt.default__get_csv_sql": {"unique_id": "macro.dbt.default__get_csv_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.009696}, "macro.dbt.get_binding_char": {"unique_id": "macro.dbt.get_binding_char", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.009828}, "macro.dbt.default__get_binding_char": {"unique_id": "macro.dbt.default__get_binding_char", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.009941}, "macro.dbt.get_batch_size": {"unique_id": "macro.dbt.get_batch_size", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.010098}, "macro.dbt.default__get_batch_size": {"unique_id": "macro.dbt.default__get_batch_size", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.010207}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.010667}, "macro.dbt.load_csv_rows": {"unique_id": "macro.dbt.load_csv_rows", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__load_csv_rows"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.010848}, "macro.dbt.default__load_csv_rows": {"unique_id": "macro.dbt.default__load_csv_rows", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.012079}, "macro.dbt.generate_alias_name": {"unique_id": "macro.dbt.generate_alias_name", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.0125031}, "macro.dbt.default__generate_alias_name": {"unique_id": "macro.dbt.default__generate_alias_name", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.0127192}, "macro.dbt.generate_schema_name": {"unique_id": "macro.dbt.generate_schema_name", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.013262}, "macro.dbt.default__generate_schema_name": {"unique_id": "macro.dbt.default__generate_schema_name", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.0135128}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.013789}, "macro.dbt.generate_database_name": {"unique_id": "macro.dbt.generate_database_name", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.014216}, "macro.dbt.default__generate_database_name": {"unique_id": "macro.dbt.default__generate_database_name", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.014461}, "macro.dbt.default__test_relationships": {"unique_id": "macro.dbt.default__test_relationships", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.014854}, "macro.dbt.default__test_not_null": {"unique_id": "macro.dbt.default__test_not_null", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.015198}, "macro.dbt.default__test_unique": {"unique_id": "macro.dbt.default__test_unique", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.0154922}, "macro.dbt.default__test_accepted_values": {"unique_id": "macro.dbt.default__test_accepted_values", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.01608}, "macro.dbt.statement": {"unique_id": "macro.dbt.statement", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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": "{% 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": 1665702404.0171788}, "macro.dbt.noop_statement": {"unique_id": "macro.dbt.noop_statement", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.0177422}, "macro.dbt.run_query": {"unique_id": "macro.dbt.run_query", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.018028}, "macro.dbt.convert_datetime": {"unique_id": "macro.dbt.convert_datetime", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.0197399}, "macro.dbt.dates_in_range": {"unique_id": "macro.dbt.dates_in_range", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.0210319}, "macro.dbt.partition_range": {"unique_id": "macro.dbt.partition_range", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.021779}, "macro.dbt.py_current_timestring": {"unique_id": "macro.dbt.py_current_timestring", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.022006}, "macro.dbt.except": {"unique_id": "macro.dbt.except", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.bigquery__except"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.022309}, "macro.dbt.default__except": {"unique_id": "macro.dbt.default__except", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.0223832}, "macro.dbt.replace": {"unique_id": "macro.dbt.replace", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.default__replace"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.0227609}, "macro.dbt.default__replace": {"unique_id": "macro.dbt.default__replace", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.022919}, "macro.dbt.concat": {"unique_id": "macro.dbt.concat", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.default__concat"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.023221}, "macro.dbt.default__concat": {"unique_id": "macro.dbt.default__concat", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.023349}, "macro.dbt.length": {"unique_id": "macro.dbt.length", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.default__length"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.0236568}, "macro.dbt.default__length": {"unique_id": "macro.dbt.default__length", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.023763}, "macro.dbt.dateadd": {"unique_id": "macro.dbt.dateadd", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.bigquery__dateadd"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.024153}, "macro.dbt.default__dateadd": {"unique_id": "macro.dbt.default__dateadd", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.024323}, "macro.dbt.intersect": {"unique_id": "macro.dbt.intersect", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.bigquery__intersect"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.0246148}, "macro.dbt.default__intersect": {"unique_id": "macro.dbt.default__intersect", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.024699}, "macro.dbt.escape_single_quotes": {"unique_id": "macro.dbt.escape_single_quotes", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.bigquery__escape_single_quotes"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.025098}, "macro.dbt.default__escape_single_quotes": {"unique_id": "macro.dbt.default__escape_single_quotes", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.025249}, "macro.dbt.right": {"unique_id": "macro.dbt.right", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.bigquery__right"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.0256362}, "macro.dbt.default__right": {"unique_id": "macro.dbt.default__right", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.025771}, "macro.dbt.listagg": {"unique_id": "macro.dbt.listagg", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.bigquery__listagg"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.0264351}, "macro.dbt.default__listagg": {"unique_id": "macro.dbt.default__listagg", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.026918}, "macro.dbt.datediff": {"unique_id": "macro.dbt.datediff", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.bigquery__datediff"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.0273302}, "macro.dbt.default__datediff": {"unique_id": "macro.dbt.default__datediff", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.027488}, "macro.dbt.safe_cast": {"unique_id": "macro.dbt.safe_cast", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.bigquery__safe_cast"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.027841}, "macro.dbt.default__safe_cast": {"unique_id": "macro.dbt.default__safe_cast", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.027982}, "macro.dbt.hash": {"unique_id": "macro.dbt.hash", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.bigquery__hash"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.028291}, "macro.dbt.default__hash": {"unique_id": "macro.dbt.default__hash", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.028447}, "macro.dbt.cast_bool_to_text": {"unique_id": "macro.dbt.cast_bool_to_text", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.default__cast_bool_to_text"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.028747}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.028905}, "macro.dbt.any_value": {"unique_id": "macro.dbt.any_value", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.default__any_value"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.029204}, "macro.dbt.default__any_value": {"unique_id": "macro.dbt.default__any_value", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.0293062}, "macro.dbt.position": {"unique_id": "macro.dbt.position", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.bigquery__position"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.029641}, "macro.dbt.default__position": {"unique_id": "macro.dbt.default__position", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.0297742}, "macro.dbt.string_literal": {"unique_id": "macro.dbt.string_literal", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.default__string_literal"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.030067}, "macro.dbt.default__string_literal": {"unique_id": "macro.dbt.default__string_literal", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.030164}, "macro.dbt.type_string": {"unique_id": "macro.dbt.type_string", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.default__type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.031015}, "macro.dbt.default__type_string": {"unique_id": "macro.dbt.default__type_string", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.031165}, "macro.dbt.type_timestamp": {"unique_id": "macro.dbt.type_timestamp", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.default__type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.031323}, "macro.dbt.default__type_timestamp": {"unique_id": "macro.dbt.default__type_timestamp", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.031468}, "macro.dbt.type_float": {"unique_id": "macro.dbt.type_float", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.default__type_float"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.031683}, "macro.dbt.default__type_float": {"unique_id": "macro.dbt.default__type_float", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.031831}, "macro.dbt.type_numeric": {"unique_id": "macro.dbt.type_numeric", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.default__type_numeric"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.031988}, "macro.dbt.default__type_numeric": {"unique_id": "macro.dbt.default__type_numeric", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.032161}, "macro.dbt.type_bigint": {"unique_id": "macro.dbt.type_bigint", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.default__type_bigint"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.0323179}, "macro.dbt.default__type_bigint": {"unique_id": "macro.dbt.default__type_bigint", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.032467}, "macro.dbt.type_int": {"unique_id": "macro.dbt.type_int", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.default__type_int"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.032625}, "macro.dbt.default__type_int": {"unique_id": "macro.dbt.default__type_int", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.032762}, "macro.dbt.bool_or": {"unique_id": "macro.dbt.bool_or", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.bigquery__bool_or"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.033067}, "macro.dbt.default__bool_or": {"unique_id": "macro.dbt.default__bool_or", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.0331662}, "macro.dbt.last_day": {"unique_id": "macro.dbt.last_day", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.default__last_day"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.033548}, "macro.dbt.default_last_day": {"unique_id": "macro.dbt.default_last_day", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.dateadd", "macro.dbt_utils.date_trunc"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.03381}, "macro.dbt.default__last_day": {"unique_id": "macro.dbt.default__last_day", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.default_last_day"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.033953}, "macro.dbt.split_part": {"unique_id": "macro.dbt.split_part", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.bigquery__split_part"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.034496}, "macro.dbt.default__split_part": {"unique_id": "macro.dbt.default__split_part", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.034655}, "macro.dbt._split_part_negative": {"unique_id": "macro.dbt._split_part_negative", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.034873}, "macro.dbt.date_trunc": {"unique_id": "macro.dbt.date_trunc", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.bigquery__date_trunc"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.0351958}, "macro.dbt.default__date_trunc": {"unique_id": "macro.dbt.default__date_trunc", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.0353239}, "macro.dbt.create_schema": {"unique_id": "macro.dbt.create_schema", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__create_schema"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.03573}, "macro.dbt.default__create_schema": {"unique_id": "macro.dbt.default__create_schema", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.035907}, "macro.dbt.drop_schema": {"unique_id": "macro.dbt.drop_schema", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__drop_schema"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.036076}, "macro.dbt.default__drop_schema": {"unique_id": "macro.dbt.default__drop_schema", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.036318}, "macro.dbt.get_create_index_sql": {"unique_id": "macro.dbt.get_create_index_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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.default__get_create_index_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.0368059}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.0369349}, "macro.dbt.create_indexes": {"unique_id": "macro.dbt.create_indexes", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.03709}, "macro.dbt.default__create_indexes": {"unique_id": "macro.dbt.default__create_indexes", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.037484}, "macro.dbt.make_intermediate_relation": {"unique_id": "macro.dbt.make_intermediate_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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.default__make_intermediate_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.040443}, "macro.dbt.default__make_intermediate_relation": {"unique_id": "macro.dbt.default__make_intermediate_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.040608}, "macro.dbt.make_temp_relation": {"unique_id": "macro.dbt.make_temp_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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.default__make_temp_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.040822}, "macro.dbt.default__make_temp_relation": {"unique_id": "macro.dbt.default__make_temp_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.041109}, "macro.dbt.make_backup_relation": {"unique_id": "macro.dbt.make_backup_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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.default__make_backup_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.04135}, "macro.dbt.default__make_backup_relation": {"unique_id": "macro.dbt.default__make_backup_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.0416598}, "macro.dbt.drop_relation": {"unique_id": "macro.dbt.drop_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__drop_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.041837}, "macro.dbt.default__drop_relation": {"unique_id": "macro.dbt.default__drop_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.042043}, "macro.dbt.truncate_relation": {"unique_id": "macro.dbt.truncate_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.042221}, "macro.dbt.default__truncate_relation": {"unique_id": "macro.dbt.default__truncate_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.042378}, "macro.dbt.rename_relation": {"unique_id": "macro.dbt.rename_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__rename_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.0425768}, "macro.dbt.default__rename_relation": {"unique_id": "macro.dbt.default__rename_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.042846}, "macro.dbt.get_or_create_relation": {"unique_id": "macro.dbt.get_or_create_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.043089}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.043823}, "macro.dbt.load_cached_relation": {"unique_id": "macro.dbt.load_cached_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.0440478}, "macro.dbt.load_relation": {"unique_id": "macro.dbt.load_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.044186}, "macro.dbt.drop_relation_if_exists": {"unique_id": "macro.dbt.drop_relation_if_exists", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.044379}, "macro.dbt.current_timestamp": {"unique_id": "macro.dbt.current_timestamp", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/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_utils.bigquery__current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.044875}, "macro.dbt.default__current_timestamp": {"unique_id": "macro.dbt.default__current_timestamp", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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__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": 1665702404.045015}, "macro.dbt.collect_freshness": {"unique_id": "macro.dbt.collect_freshness", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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.fivetran_utils.default__collect_freshness"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.0452359}, "macro.dbt.default__collect_freshness": {"unique_id": "macro.dbt.default__collect_freshness", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.045644}, "macro.dbt.copy_grants": {"unique_id": "macro.dbt.copy_grants", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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.default__copy_grants"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.047235}, "macro.dbt.default__copy_grants": {"unique_id": "macro.dbt.default__copy_grants", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.047343}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.047507}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.047611}, "macro.dbt.should_revoke": {"unique_id": "macro.dbt.should_revoke", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.047947}, "macro.dbt.get_show_grant_sql": {"unique_id": "macro.dbt.get_show_grant_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__get_show_grant_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.048131}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.048231}, "macro.dbt.get_grant_sql": {"unique_id": "macro.dbt.get_grant_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__get_grant_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.048455}, "macro.dbt.default__get_grant_sql": {"unique_id": "macro.dbt.default__get_grant_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.048639}, "macro.dbt.get_revoke_sql": {"unique_id": "macro.dbt.get_revoke_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__get_revoke_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.048861}, "macro.dbt.default__get_revoke_sql": {"unique_id": "macro.dbt.default__get_revoke_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.049048}, "macro.dbt.get_dcl_statement_list": {"unique_id": "macro.dbt.get_dcl_statement_list", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.049272}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.049998}, "macro.dbt.call_dcl_statements": {"unique_id": "macro.dbt.call_dcl_statements", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.050184}, "macro.dbt.default__call_dcl_statements": {"unique_id": "macro.dbt.default__call_dcl_statements", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.050425}, "macro.dbt.apply_grants": {"unique_id": "macro.dbt.apply_grants", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.0506508}, "macro.dbt.default__apply_grants": {"unique_id": "macro.dbt.default__apply_grants", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.051757}, "macro.dbt.alter_column_comment": {"unique_id": "macro.dbt.alter_column_comment", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__alter_column_comment"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.052445}, "macro.dbt.default__alter_column_comment": {"unique_id": "macro.dbt.default__alter_column_comment", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.052609}, "macro.dbt.alter_relation_comment": {"unique_id": "macro.dbt.alter_relation_comment", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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.default__alter_relation_comment"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.05281}, "macro.dbt.default__alter_relation_comment": {"unique_id": "macro.dbt.default__alter_relation_comment", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.05297}, "macro.dbt.persist_docs": {"unique_id": "macro.dbt.persist_docs", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.0532322}, "macro.dbt.default__persist_docs": {"unique_id": "macro.dbt.default__persist_docs", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.053712}, "macro.dbt.get_catalog": {"unique_id": "macro.dbt.get_catalog", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__get_catalog"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.0551}, "macro.dbt.default__get_catalog": {"unique_id": "macro.dbt.default__get_catalog", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.055352}, "macro.dbt.information_schema_name": {"unique_id": "macro.dbt.information_schema_name", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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.default__information_schema_name"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.055535}, "macro.dbt.default__information_schema_name": {"unique_id": "macro.dbt.default__information_schema_name", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.055682}, "macro.dbt.list_schemas": {"unique_id": "macro.dbt.list_schemas", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__list_schemas"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.05586}, "macro.dbt.default__list_schemas": {"unique_id": "macro.dbt.default__list_schemas", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.0560992}, "macro.dbt.check_schema_exists": {"unique_id": "macro.dbt.check_schema_exists", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__check_schema_exists"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.056306}, "macro.dbt.default__check_schema_exists": {"unique_id": "macro.dbt.default__check_schema_exists", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.replace", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.056608}, "macro.dbt.list_relations_without_caching": {"unique_id": "macro.dbt.list_relations_without_caching", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__list_relations_without_caching"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.056788}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.056941}, "macro.dbt.get_columns_in_relation": {"unique_id": "macro.dbt.get_columns_in_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__get_columns_in_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.058536}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.058757}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.059065}, "macro.dbt.get_columns_in_query": {"unique_id": "macro.dbt.get_columns_in_query", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.059244}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.059575}, "macro.dbt.alter_column_type": {"unique_id": "macro.dbt.alter_column_type", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__alter_column_type"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.0598001}, "macro.dbt.default__alter_column_type": {"unique_id": "macro.dbt.default__alter_column_type", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.060398}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.060653}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.061413}, "macro.dbt.test_unique": {"unique_id": "macro.dbt.test_unique", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__test_unique"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.061954}, "macro.dbt.test_not_null": {"unique_id": "macro.dbt.test_not_null", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.062189}, "macro.dbt.test_accepted_values": {"unique_id": "macro.dbt.test_accepted_values", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.062468}, "macro.dbt.test_relationships": {"unique_id": "macro.dbt.test_relationships", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.0627358}, "macro.shopify_source.get_order_columns": {"unique_id": "macro.shopify_source.get_order_columns", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "macros/staging_columns.sql", "original_file_path": "macros/staging_columns.sql", "name": "get_order_columns", "macro_sql": "{% macro get_order_columns() %}\n\n{% set columns = [\n {\"name\": \"id\", \"datatype\": dbt_utils.type_numeric(), \"alias\": \"order_id\"},\n {\"name\": \"processed_at\", \"datatype\": dbt_utils.type_timestamp(), \"alias\": \"processed_timestamp\"},\n {\"name\": \"updated_at\", \"datatype\": dbt_utils.type_timestamp(), \"alias\": \"updated_timestamp\"},\n {\"name\": \"user_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"total_discounts\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"total_line_items_price\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"total_price\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"total_tax\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"source_name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"subtotal_price\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"taxes_included\", \"datatype\": \"boolean\", \"alias\": \"has_taxes_included\"},\n {\"name\": \"total_weight\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"landing_site_base_url\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"location_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"note\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"number\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"order_number\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"cancel_reason\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"cancelled_at\", \"datatype\": dbt_utils.type_timestamp(), \"alias\": \"cancelled_timestamp\"},\n {\"name\": \"cart_token\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"checkout_token\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"closed_at\", \"datatype\": dbt_utils.type_timestamp(), \"alias\": \"closed_timestamp\"},\n {\"name\": \"created_at\", \"datatype\": dbt_utils.type_timestamp(), \"alias\": \"created_timestamp\"},\n {\"name\": \"currency\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"customer_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"email\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"financial_status\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"fulfillment_status\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"processing_method\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"referring_site\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"billing_address_address_1\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"billing_address_address_2\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"billing_address_city\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"billing_address_company\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"billing_address_country\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"billing_address_country_code\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"billing_address_first_name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"billing_address_last_name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"billing_address_latitude\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"billing_address_longitude\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"billing_address_name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"billing_address_phone\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"billing_address_province\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"billing_address_province_code\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"billing_address_zip\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"browser_ip\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"buyer_accepts_marketing\", \"datatype\": \"boolean\", \"alias\": \"has_buyer_accepted_marketing\"},\n {\"name\": \"total_shipping_price_set\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"shipping_address_address_1\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"shipping_address_address_2\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"shipping_address_city\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"shipping_address_company\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"shipping_address_country\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"shipping_address_country_code\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"shipping_address_first_name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"shipping_address_last_name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"shipping_address_latitude\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"shipping_address_longitude\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"shipping_address_name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"shipping_address_phone\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"shipping_address_province\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"shipping_address_province_code\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"shipping_address_zip\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"test\", \"datatype\": \"boolean\", \"alias\": \"is_test_order\"},\n {\"name\": \"token\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_numeric", "macro.dbt_utils.type_timestamp", "macro.dbt_utils.type_float", "macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.0776498}, "macro.shopify_source.get_customer_columns": {"unique_id": "macro.shopify_source.get_customer_columns", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "macros/staging_columns.sql", "original_file_path": "macros/staging_columns.sql", "name": "get_customer_columns", "macro_sql": "{% macro get_customer_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"accepts_marketing\", \"datatype\": \"boolean\", \"alias\": \"has_accepted_marketing\"},\n {\"name\": \"created_at\", \"datatype\": dbt_utils.type_timestamp(), \"alias\": \"created_timestamp\"},\n {\"name\": \"default_address_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"email\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"first_name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"id\", \"datatype\": dbt_utils.type_numeric(), \"alias\": \"customer_id\"},\n {\"name\": \"last_name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"orders_count\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"phone\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"state\", \"datatype\": dbt_utils.type_string(), \"alias\": \"account_state\"},\n {\"name\": \"tax_exempt\", \"datatype\": \"boolean\", \"alias\": \"is_tax_exempt\"},\n {\"name\": \"total_spent\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"updated_at\", \"datatype\": dbt_utils.type_timestamp(), \"alias\": \"updated_timestamp\"},\n {\"name\": \"verified_email\", \"datatype\": \"boolean\", \"alias\": \"is_verified_email\"}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_timestamp", "macro.dbt_utils.type_numeric", "macro.dbt_utils.type_string", "macro.dbt_utils.type_float"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.0793228}, "macro.shopify_source.get_order_line_refund_columns": {"unique_id": "macro.shopify_source.get_order_line_refund_columns", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "macros/staging_columns.sql", "original_file_path": "macros/staging_columns.sql", "name": "get_order_line_refund_columns", "macro_sql": "{% macro get_order_line_refund_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt_utils.type_numeric(), \"alias\": \"order_line_refund_id\"},\n {\"name\": \"location_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"order_line_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"subtotal\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"total_tax\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"quantity\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"refund_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"restock_type\", \"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_numeric", "macro.dbt_utils.type_float", "macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.080263}, "macro.shopify_source.get_order_line_columns": {"unique_id": "macro.shopify_source.get_order_line_columns", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "macros/staging_columns.sql", "original_file_path": "macros/staging_columns.sql", "name": "get_order_line_columns", "macro_sql": "{% macro get_order_line_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"fulfillable_quantity\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"fulfillment_service\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"fulfillment_status\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"gift_card\", \"datatype\": \"boolean\", \"alias\": \"is_gift_card\"},\n {\"name\": \"grams\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"id\", \"datatype\": dbt_utils.type_numeric(), \"alias\": \"order_line_id\"},\n {\"name\": \"index\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"order_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"pre_tax_price\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"price\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"product_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"property_charge_interval_frequency\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"property_for_shipping_jan_3_rd_2020\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"property_shipping_interval_frequency\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"property_shipping_interval_unit_type\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"property_subscription_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"quantity\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"requires_shipping\", \"datatype\": \"boolean\", \"alias\": \"is_requiring_shipping\"},\n {\"name\": \"sku\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"taxable\", \"datatype\": \"boolean\", \"alias\": \"is_taxable\"},\n {\"name\": \"title\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"total_discount\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"variant_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"vendor\", \"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_numeric", "macro.dbt_utils.type_string", "macro.dbt_utils.type_float"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.082616}, "macro.shopify_source.get_product_columns": {"unique_id": "macro.shopify_source.get_product_columns", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "macros/staging_columns.sql", "original_file_path": "macros/staging_columns.sql", "name": "get_product_columns", "macro_sql": "{% macro get_product_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"created_at\", \"datatype\": dbt_utils.type_timestamp(), \"alias\": \"created_timestamp\"},\n {\"name\": \"handle\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"id\", \"datatype\": dbt_utils.type_numeric(), \"alias\": \"product_id\"},\n {\"name\": \"product_type\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"published_at\", \"datatype\": dbt_utils.type_timestamp(), \"alias\": \"published_timestamp\"},\n {\"name\": \"published_scope\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"title\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"updated_at\", \"datatype\": dbt_utils.type_timestamp(), \"alias\": \"updated_timestamp\"},\n {\"name\": \"vendor\", \"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_numeric"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.0837839}, "macro.shopify_source.get_product_variant_columns": {"unique_id": "macro.shopify_source.get_product_variant_columns", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "macros/staging_columns.sql", "original_file_path": "macros/staging_columns.sql", "name": "get_product_variant_columns", "macro_sql": "{% macro get_product_variant_columns() %}\n\n{% set columns = [\n {\"name\": \"id\", \"datatype\": dbt_utils.type_numeric(), \"alias\": \"variant_id\"},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"created_at\", \"datatype\": dbt_utils.type_timestamp(), \"alias\": \"created_timestamp\"},\n {\"name\": \"updated_at\", \"datatype\": dbt_utils.type_timestamp(), \"alias\": \"updated_timestamp\"},\n {\"name\": \"product_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"inventory_item_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"image_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"title\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"price\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"sku\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"position\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"inventory_policy\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"compare_at_price\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"fulfillment_service\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"inventory_management\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"taxable\", \"datatype\": \"boolean\", \"alias\": \"is_taxable\"},\n {\"name\": \"barcode\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"grams\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"inventory_quantity\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"weight\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"weight_unit\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"option_1\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"option_2\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"option_3\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"tax_code\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"old_inventory_quantity\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"requires_shipping\", \"datatype\": \"boolean\", \"alias\": \"is_requiring_shipping\"}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_numeric", "macro.dbt_utils.type_timestamp", "macro.dbt_utils.type_string", "macro.dbt_utils.type_float"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.08626}, "macro.shopify_source.get_transaction_columns": {"unique_id": "macro.shopify_source.get_transaction_columns", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "macros/staging_columns.sql", "original_file_path": "macros/staging_columns.sql", "name": "get_transaction_columns", "macro_sql": "{% macro get_transaction_columns() %}\n\n{% set columns = [\n {\"name\": \"id\", \"datatype\": dbt_utils.type_numeric(), \"alias\": \"transaction_id\"},\n {\"name\": \"order_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"refund_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"amount\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"created_at\", \"datatype\": dbt_utils.type_timestamp(), \"alias\": \"created_timestamp\"},\n {\"name\": \"processed_at\", \"datatype\": dbt_utils.type_timestamp(), \"alias\": \"processed_timestamp\"},\n {\"name\": \"device_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"gateway\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"source_name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"message\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"currency\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"location_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"parent_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"payment_avs_result_code\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"payment_credit_card_bin\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"payment_cvv_result_code\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"payment_credit_card_number\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"payment_credit_card_company\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"kind\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"receipt\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"currency_exchange_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"currency_exchange_adjustment\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"currency_exchange_original_amount\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"currency_exchange_final_amount\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"currency_exchange_currency\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"error_code\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"status\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"test\", \"datatype\": \"boolean\"},\n {\"name\": \"user_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()}\n] %}\n\n{% if target.type in ('redshift','postgres') %}\n {{ columns.append({\"name\": \"authorization\", \"datatype\": dbt_utils.type_string(), \"quote\": True, \"alias\": \"authorization\"}) }}\n{% else %}\n {\"name\": \"authorization\", \"datatype\": dbt_utils.type_string()}\n{% endif %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_numeric", "macro.dbt_utils.type_timestamp", "macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.089289}, "macro.shopify_source.get_refund_columns": {"unique_id": "macro.shopify_source.get_refund_columns", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "macros/staging_columns.sql", "original_file_path": "macros/staging_columns.sql", "name": "get_refund_columns", "macro_sql": "{% macro get_refund_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"created_at\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt_utils.type_numeric(), \"alias\": \"refund_id\"},\n {\"name\": \"note\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"order_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"processed_at\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"restock\", \"datatype\": \"boolean\"},\n {\"name\": \"user_id\", \"datatype\": dbt_utils.type_numeric()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_timestamp", "macro.dbt_utils.type_numeric", "macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.0901299}, "macro.shopify_source.get_order_adjustment_columns": {"unique_id": "macro.shopify_source.get_order_adjustment_columns", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "macros/staging_columns.sql", "original_file_path": "macros/staging_columns.sql", "name": "get_order_adjustment_columns", "macro_sql": "{% macro get_order_adjustment_columns() %}\n\n{% set columns = [\n {\"name\": \"id\", \"datatype\": dbt_utils.type_numeric(), \"alias\": \"order_adjustment_id\"},\n {\"name\": \"order_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"refund_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"amount\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"tax_amount\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"kind\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"reason\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_numeric", "macro.dbt_utils.type_float", "macro.dbt_utils.type_string", "macro.dbt_utils.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.09098}, "macro.dbt_utils.except": {"unique_id": "macro.dbt_utils.except", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__except"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.091292}, "macro.dbt_utils.default__except": {"unique_id": "macro.dbt_utils.default__except", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.091362}, "macro.dbt_utils.bigquery__except": {"unique_id": "macro.dbt_utils.bigquery__except", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.09143}, "macro.dbt_utils.replace": {"unique_id": "macro.dbt_utils.replace", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.0918121}, "macro.dbt_utils.default__replace": {"unique_id": "macro.dbt_utils.default__replace", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.091969}, "macro.dbt_utils.concat": {"unique_id": "macro.dbt_utils.concat", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.092271}, "macro.dbt_utils.default__concat": {"unique_id": "macro.dbt_utils.default__concat", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.092393}, "macro.dbt_utils.type_string": {"unique_id": "macro.dbt_utils.type_string", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.default__type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.093077}, "macro.dbt_utils.default__type_string": {"unique_id": "macro.dbt_utils.default__type_string", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.093149}, "macro.dbt_utils.redshift__type_string": {"unique_id": "macro.dbt_utils.redshift__type_string", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.093216}, "macro.dbt_utils.postgres__type_string": {"unique_id": "macro.dbt_utils.postgres__type_string", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.093281}, "macro.dbt_utils.snowflake__type_string": {"unique_id": "macro.dbt_utils.snowflake__type_string", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.093348}, "macro.dbt_utils.type_timestamp": {"unique_id": "macro.dbt_utils.type_timestamp", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.default__type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.093502}, "macro.dbt_utils.default__type_timestamp": {"unique_id": "macro.dbt_utils.default__type_timestamp", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.093575}, "macro.dbt_utils.postgres__type_timestamp": {"unique_id": "macro.dbt_utils.postgres__type_timestamp", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.093643}, "macro.dbt_utils.snowflake__type_timestamp": {"unique_id": "macro.dbt_utils.snowflake__type_timestamp", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.093709}, "macro.dbt_utils.type_float": {"unique_id": "macro.dbt_utils.type_float", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__type_float"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.093864}, "macro.dbt_utils.default__type_float": {"unique_id": "macro.dbt_utils.default__type_float", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.093935}, "macro.dbt_utils.bigquery__type_float": {"unique_id": "macro.dbt_utils.bigquery__type_float", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.094}, "macro.dbt_utils.type_numeric": {"unique_id": "macro.dbt_utils.type_numeric", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__type_numeric"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.094214}, "macro.dbt_utils.default__type_numeric": {"unique_id": "macro.dbt_utils.default__type_numeric", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.094285}, "macro.dbt_utils.bigquery__type_numeric": {"unique_id": "macro.dbt_utils.bigquery__type_numeric", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.09435}, "macro.dbt_utils.type_bigint": {"unique_id": "macro.dbt_utils.type_bigint", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__type_bigint"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.0945039}, "macro.dbt_utils.default__type_bigint": {"unique_id": "macro.dbt_utils.default__type_bigint", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.094572}, "macro.dbt_utils.bigquery__type_bigint": {"unique_id": "macro.dbt_utils.bigquery__type_bigint", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.094638}, "macro.dbt_utils.type_int": {"unique_id": "macro.dbt_utils.type_int", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__type_int"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.0947928}, "macro.dbt_utils.default__type_int": {"unique_id": "macro.dbt_utils.default__type_int", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.094861}, "macro.dbt_utils.bigquery__type_int": {"unique_id": "macro.dbt_utils.bigquery__type_int", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.094927}, "macro.dbt_utils._is_relation": {"unique_id": "macro.dbt_utils._is_relation", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.0954182}, "macro.dbt_utils.cast_array_to_string": {"unique_id": "macro.dbt_utils.cast_array_to_string", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__cast_array_to_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.0958579}, "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/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.095995}, "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/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.096292}, "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/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.096431}, "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/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.09653}, "macro.dbt_utils.length": {"unique_id": "macro.dbt_utils.length", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.09687}, "macro.dbt_utils.default__length": {"unique_id": "macro.dbt_utils.default__length", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.096973}, "macro.dbt_utils.redshift__length": {"unique_id": "macro.dbt_utils.redshift__length", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.0970712}, "macro.dbt_utils.dateadd": {"unique_id": "macro.dbt_utils.dateadd", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__dateadd"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.0976489}, "macro.dbt_utils.default__dateadd": {"unique_id": "macro.dbt_utils.default__dateadd", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.097814}, "macro.dbt_utils.bigquery__dateadd": {"unique_id": "macro.dbt_utils.bigquery__dateadd", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.097968}, "macro.dbt_utils.postgres__dateadd": {"unique_id": "macro.dbt_utils.postgres__dateadd", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.098119}, "macro.dbt_utils.redshift__dateadd": {"unique_id": "macro.dbt_utils.redshift__dateadd", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.098378}, "macro.dbt_utils.intersect": {"unique_id": "macro.dbt_utils.intersect", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__intersect"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.098676}, "macro.dbt_utils.default__intersect": {"unique_id": "macro.dbt_utils.default__intersect", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.098749}, "macro.dbt_utils.bigquery__intersect": {"unique_id": "macro.dbt_utils.bigquery__intersect", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.098818}, "macro.dbt_utils.escape_single_quotes": {"unique_id": "macro.dbt_utils.escape_single_quotes", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__escape_single_quotes"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.099189}, "macro.dbt_utils.default__escape_single_quotes": {"unique_id": "macro.dbt_utils.default__escape_single_quotes", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.099326}, "macro.dbt_utils.snowflake__escape_single_quotes": {"unique_id": "macro.dbt_utils.snowflake__escape_single_quotes", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.0994601}, "macro.dbt_utils.bigquery__escape_single_quotes": {"unique_id": "macro.dbt_utils.bigquery__escape_single_quotes", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.0996008}, "macro.dbt_utils.right": {"unique_id": "macro.dbt_utils.right", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__right"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.100168}, "macro.dbt_utils.default__right": {"unique_id": "macro.dbt_utils.default__right", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.100298}, "macro.dbt_utils.bigquery__right": {"unique_id": "macro.dbt_utils.bigquery__right", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.100451}, "macro.dbt_utils.snowflake__right": {"unique_id": "macro.dbt_utils.snowflake__right", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.100598}, "macro.dbt_utils.listagg": {"unique_id": "macro.dbt_utils.listagg", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__listagg"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.10275}, "macro.dbt_utils.default__listagg": {"unique_id": "macro.dbt_utils.default__listagg", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.1031392}, "macro.dbt_utils.bigquery__listagg": {"unique_id": "macro.dbt_utils.bigquery__listagg", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.103408}, "macro.dbt_utils.postgres__listagg": {"unique_id": "macro.dbt_utils.postgres__listagg", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.103785}, "macro.dbt_utils.redshift__listagg": {"unique_id": "macro.dbt_utils.redshift__listagg", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.1047602}, "macro.dbt_utils.datediff": {"unique_id": "macro.dbt_utils.datediff", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__datediff"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.1072068}, "macro.dbt_utils.default__datediff": {"unique_id": "macro.dbt_utils.default__datediff", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.107363}, "macro.dbt_utils.bigquery__datediff": {"unique_id": "macro.dbt_utils.bigquery__datediff", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.107519}, "macro.dbt_utils.postgres__datediff": {"unique_id": "macro.dbt_utils.postgres__datediff", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.10918}, "macro.dbt_utils.redshift__datediff": {"unique_id": "macro.dbt_utils.redshift__datediff", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.109378}, "macro.dbt_utils.safe_cast": {"unique_id": "macro.dbt_utils.safe_cast", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__safe_cast"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.109785}, "macro.dbt_utils.default__safe_cast": {"unique_id": "macro.dbt_utils.default__safe_cast", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.109921}, "macro.dbt_utils.snowflake__safe_cast": {"unique_id": "macro.dbt_utils.snowflake__safe_cast", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.110042}, "macro.dbt_utils.bigquery__safe_cast": {"unique_id": "macro.dbt_utils.bigquery__safe_cast", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.110164}, "macro.dbt_utils.hash": {"unique_id": "macro.dbt_utils.hash", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__hash"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.110501}, "macro.dbt_utils.default__hash": {"unique_id": "macro.dbt_utils.default__hash", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.110637}, "macro.dbt_utils.bigquery__hash": {"unique_id": "macro.dbt_utils.bigquery__hash", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.110762}, "macro.dbt_utils.cast_bool_to_text": {"unique_id": "macro.dbt_utils.cast_bool_to_text", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.11111}, "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/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.111243}, "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/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.1113658}, "macro.dbt_utils.identifier": {"unique_id": "macro.dbt_utils.identifier", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__identifier"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.111866}, "macro.dbt_utils.default__identifier": {"unique_id": "macro.dbt_utils.default__identifier", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.111968}, "macro.dbt_utils.bigquery__identifier": {"unique_id": "macro.dbt_utils.bigquery__identifier", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.112072}, "macro.dbt_utils.any_value": {"unique_id": "macro.dbt_utils.any_value", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.default__any_value"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.112401}, "macro.dbt_utils.default__any_value": {"unique_id": "macro.dbt_utils.default__any_value", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.11256}, "macro.dbt_utils.postgres__any_value": {"unique_id": "macro.dbt_utils.postgres__any_value", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.112664}, "macro.dbt_utils.position": {"unique_id": "macro.dbt_utils.position", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__position"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.113064}, "macro.dbt_utils.default__position": {"unique_id": "macro.dbt_utils.default__position", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.1131961}, "macro.dbt_utils.bigquery__position": {"unique_id": "macro.dbt_utils.bigquery__position", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.113329}, "macro.dbt_utils.string_literal": {"unique_id": "macro.dbt_utils.string_literal", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.113625}, "macro.dbt_utils.default__string_literal": {"unique_id": "macro.dbt_utils.default__string_literal", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.113722}, "macro.dbt_utils.current_timestamp": {"unique_id": "macro.dbt_utils.current_timestamp", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.1142871}, "macro.dbt_utils.default__current_timestamp": {"unique_id": "macro.dbt_utils.default__current_timestamp", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.114398}, "macro.dbt_utils.redshift__current_timestamp": {"unique_id": "macro.dbt_utils.redshift__current_timestamp", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.114464}, "macro.dbt_utils.bigquery__current_timestamp": {"unique_id": "macro.dbt_utils.bigquery__current_timestamp", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.114532}, "macro.dbt_utils.current_timestamp_in_utc": {"unique_id": "macro.dbt_utils.current_timestamp_in_utc", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.default__current_timestamp_in_utc"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.1146848}, "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/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.114797}, "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/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.114935}, "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/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.115038}, "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/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.1151612}, "macro.dbt_utils.width_bucket": {"unique_id": "macro.dbt_utils.width_bucket", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.116535}, "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/dbt_shopify_holistic_reporting/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": 1665702404.1169841}, "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/dbt_shopify_holistic_reporting/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": 1665702404.1175091}, "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/dbt_shopify_holistic_reporting/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": 1665702404.117701}, "macro.dbt_utils.array_concat": {"unique_id": "macro.dbt_utils.array_concat", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__array_concat"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.118111}, "macro.dbt_utils.default__array_concat": {"unique_id": "macro.dbt_utils.default__array_concat", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.118241}, "macro.dbt_utils.bigquery__array_concat": {"unique_id": "macro.dbt_utils.bigquery__array_concat", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.1183648}, "macro.dbt_utils.redshift__array_concat": {"unique_id": "macro.dbt_utils.redshift__array_concat", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.118486}, "macro.dbt_utils.bool_or": {"unique_id": "macro.dbt_utils.bool_or", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__bool_or"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.1188538}, "macro.dbt_utils.default__bool_or": {"unique_id": "macro.dbt_utils.default__bool_or", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.118954}, "macro.dbt_utils.snowflake__bool_or": {"unique_id": "macro.dbt_utils.snowflake__bool_or", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.1190479}, "macro.dbt_utils.bigquery__bool_or": {"unique_id": "macro.dbt_utils.bigquery__bool_or", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.119145}, "macro.dbt_utils.last_day": {"unique_id": "macro.dbt_utils.last_day", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.default__last_day"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.1197262}, "macro.dbt_utils.default_last_day": {"unique_id": "macro.dbt_utils.default_last_day", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.119989}, "macro.dbt_utils.default__last_day": {"unique_id": "macro.dbt_utils.default__last_day", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.1201332}, "macro.dbt_utils.postgres__last_day": {"unique_id": "macro.dbt_utils.postgres__last_day", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.120516}, "macro.dbt_utils.redshift__last_day": {"unique_id": "macro.dbt_utils.redshift__last_day", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.1206882}, "macro.dbt_utils.split_part": {"unique_id": "macro.dbt_utils.split_part", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__split_part"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.122088}, "macro.dbt_utils.default__split_part": {"unique_id": "macro.dbt_utils.default__split_part", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.122249}, "macro.dbt_utils._split_part_negative": {"unique_id": "macro.dbt_utils._split_part_negative", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.122462}, "macro.dbt_utils.postgres__split_part": {"unique_id": "macro.dbt_utils.postgres__split_part", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.122786}, "macro.dbt_utils.redshift__split_part": {"unique_id": "macro.dbt_utils.redshift__split_part", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.1232798}, "macro.dbt_utils.bigquery__split_part": {"unique_id": "macro.dbt_utils.bigquery__split_part", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.12363}, "macro.dbt_utils.date_trunc": {"unique_id": "macro.dbt_utils.date_trunc", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__date_trunc"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.12401}, "macro.dbt_utils.default__date_trunc": {"unique_id": "macro.dbt_utils.default__date_trunc", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.124133}, "macro.dbt_utils.bigquery__date_trunc": {"unique_id": "macro.dbt_utils.bigquery__date_trunc", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.124257}, "macro.dbt_utils.array_construct": {"unique_id": "macro.dbt_utils.array_construct", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__array_construct"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.124801}, "macro.dbt_utils.default__array_construct": {"unique_id": "macro.dbt_utils.default__array_construct", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.125037}, "macro.dbt_utils.snowflake__array_construct": {"unique_id": "macro.dbt_utils.snowflake__array_construct", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.125178}, "macro.dbt_utils.redshift__array_construct": {"unique_id": "macro.dbt_utils.redshift__array_construct", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.125312}, "macro.dbt_utils.bigquery__array_construct": {"unique_id": "macro.dbt_utils.bigquery__array_construct", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.125442}, "macro.dbt_utils._is_ephemeral": {"unique_id": "macro.dbt_utils._is_ephemeral", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.126288}, "macro.dbt_utils.array_append": {"unique_id": "macro.dbt_utils.array_append", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__array_append"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.126691}, "macro.dbt_utils.default__array_append": {"unique_id": "macro.dbt_utils.default__array_append", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.126817}, "macro.dbt_utils.bigquery__array_append": {"unique_id": "macro.dbt_utils.bigquery__array_append", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.126997}, "macro.dbt_utils.redshift__array_append": {"unique_id": "macro.dbt_utils.redshift__array_append", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.12718}, "macro.dbt_utils.get_period_boundaries": {"unique_id": "macro.dbt_utils.get_period_boundaries", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.13262}, "macro.dbt_utils.default__get_period_boundaries": {"unique_id": "macro.dbt_utils.default__get_period_boundaries", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.133128}, "macro.dbt_utils.get_period_sql": {"unique_id": "macro.dbt_utils.get_period_sql", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.133443}, "macro.dbt_utils.default__get_period_sql": {"unique_id": "macro.dbt_utils.default__get_period_sql", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.133992}, "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/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.1389189}, "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/dbt_shopify_holistic_reporting/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": 1665702404.13935}, "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/dbt_shopify_holistic_reporting/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": 1665702404.1398242}, "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/dbt_shopify_holistic_reporting/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": 1665702404.140331}, "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/dbt_shopify_holistic_reporting/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": 1665702404.1409678}, "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/dbt_shopify_holistic_reporting/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": 1665702404.141332}, "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/dbt_shopify_holistic_reporting/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": 1665702404.141649}, "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/dbt_shopify_holistic_reporting/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": 1665702404.142209}, "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/dbt_shopify_holistic_reporting/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": 1665702404.142433}, "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/dbt_shopify_holistic_reporting/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": 1665702404.1428611}, "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/dbt_shopify_holistic_reporting/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": 1665702404.143156}, "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/dbt_shopify_holistic_reporting/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": 1665702404.143828}, "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/dbt_shopify_holistic_reporting/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": 1665702404.144159}, "macro.dbt_utils.test_recency": {"unique_id": "macro.dbt_utils.test_recency", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.1445959}, "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/dbt_shopify_holistic_reporting/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": 1665702404.144922}, "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/dbt_shopify_holistic_reporting/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": 1665702404.1452868}, "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/dbt_shopify_holistic_reporting/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": 1665702404.145453}, "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/dbt_shopify_holistic_reporting/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": 1665702404.146076}, "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/dbt_shopify_holistic_reporting/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": 1665702404.1465988}, "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/dbt_shopify_holistic_reporting/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": 1665702404.147171}, "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/dbt_shopify_holistic_reporting/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": 1665702404.147543}, "macro.dbt_utils.test_unique_where": {"unique_id": "macro.dbt_utils.test_unique_where", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.147991}, "macro.dbt_utils.default__test_unique_where": {"unique_id": "macro.dbt_utils.default__test_unique_where", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.148155}, "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/dbt_shopify_holistic_reporting/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": 1665702404.148524}, "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/dbt_shopify_holistic_reporting/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": 1665702404.1486988}, "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/dbt_shopify_holistic_reporting/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": 1665702404.1493309}, "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/dbt_shopify_holistic_reporting/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": 1665702404.1499588}, "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/dbt_shopify_holistic_reporting/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": 1665702404.150538}, "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/dbt_shopify_holistic_reporting/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": 1665702404.150879}, "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/dbt_shopify_holistic_reporting/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": 1665702404.151375}, "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/dbt_shopify_holistic_reporting/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": 1665702404.1516612}, "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/dbt_shopify_holistic_reporting/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": 1665702404.15212}, "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/dbt_shopify_holistic_reporting/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": 1665702404.152626}, "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/dbt_shopify_holistic_reporting/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": 1665702404.153302}, "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/dbt_shopify_holistic_reporting/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": 1665702404.153961}, "macro.dbt_utils.test_not_null_where": {"unique_id": "macro.dbt_utils.test_not_null_where", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.154412}, "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/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.154578}, "macro.dbt_utils.test_equality": {"unique_id": "macro.dbt_utils.test_equality", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.1553311}, "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/dbt_shopify_holistic_reporting/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": 1665702404.156201}, "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/dbt_shopify_holistic_reporting/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": 1665702404.1591291}, "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/dbt_shopify_holistic_reporting/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": 1665702404.160574}, "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/dbt_shopify_holistic_reporting/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": 1665702404.160898}, "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/dbt_shopify_holistic_reporting/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": 1665702404.1610591}, "macro.dbt_utils.pretty_time": {"unique_id": "macro.dbt_utils.pretty_time", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.161382}, "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/dbt_shopify_holistic_reporting/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": 1665702404.1615748}, "macro.dbt_utils.log_info": {"unique_id": "macro.dbt_utils.log_info", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.161881}, "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/dbt_shopify_holistic_reporting/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": 1665702404.162051}, "macro.dbt_utils.slugify": {"unique_id": "macro.dbt_utils.slugify", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.162557}, "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/dbt_shopify_holistic_reporting/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": 1665702404.163263}, "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/dbt_shopify_holistic_reporting/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": 1665702404.163847}, "macro.dbt_utils.date_spine": {"unique_id": "macro.dbt_utils.date_spine", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.164073}, "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/dbt_shopify_holistic_reporting/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": 1665702404.164423}, "macro.dbt_utils.nullcheck_table": {"unique_id": "macro.dbt_utils.nullcheck_table", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.164783}, "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/dbt_shopify_holistic_reporting/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": 1665702404.1651871}, "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/dbt_shopify_holistic_reporting/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": 1665702404.1658711}, "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/dbt_shopify_holistic_reporting/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": 1665702404.166715}, "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/dbt_shopify_holistic_reporting/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": 1665702404.167536}, "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/dbt_shopify_holistic_reporting/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": 1665702404.1679392}, "macro.dbt_utils.generate_series": {"unique_id": "macro.dbt_utils.generate_series", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.168125}, "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/dbt_shopify_holistic_reporting/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": 1665702404.168632}, "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/dbt_shopify_holistic_reporting/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": 1665702404.169319}, "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/dbt_shopify_holistic_reporting/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": 1665702404.1701498}, "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/dbt_shopify_holistic_reporting/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": 1665702404.170604}, "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/dbt_shopify_holistic_reporting/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": 1665702404.1708832}, "macro.dbt_utils.star": {"unique_id": "macro.dbt_utils.star", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.171585}, "macro.dbt_utils.default__star": {"unique_id": "macro.dbt_utils.default__star", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.172551}, "macro.dbt_utils.unpivot": {"unique_id": "macro.dbt_utils.unpivot", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.1742249}, "macro.dbt_utils.default__unpivot": {"unique_id": "macro.dbt_utils.default__unpivot", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.1762612}, "macro.dbt_utils.union_relations": {"unique_id": "macro.dbt_utils.union_relations", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.178715}, "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/dbt_shopify_holistic_reporting/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": 1665702404.181657}, "macro.dbt_utils.group_by": {"unique_id": "macro.dbt_utils.group_by", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.182005}, "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/dbt_shopify_holistic_reporting/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": 1665702404.18225}, "macro.dbt_utils.deduplicate": {"unique_id": "macro.dbt_utils.deduplicate", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__deduplicate"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.1845949}, "macro.dbt_utils.default__deduplicate": {"unique_id": "macro.dbt_utils.default__deduplicate", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.184814}, "macro.dbt_utils.redshift__deduplicate": {"unique_id": "macro.dbt_utils.redshift__deduplicate", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.185013}, "macro.dbt_utils.postgres__deduplicate": {"unique_id": "macro.dbt_utils.postgres__deduplicate", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.185193}, "macro.dbt_utils.snowflake__deduplicate": {"unique_id": "macro.dbt_utils.snowflake__deduplicate", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.1853518}, "macro.dbt_utils.bigquery__deduplicate": {"unique_id": "macro.dbt_utils.bigquery__deduplicate", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.185516}, "macro.dbt_utils.surrogate_key": {"unique_id": "macro.dbt_utils.surrogate_key", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.1861172}, "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/dbt_shopify_holistic_reporting/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": 1665702404.18703}, "macro.dbt_utils.safe_add": {"unique_id": "macro.dbt_utils.safe_add", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.187449}, "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/dbt_shopify_holistic_reporting/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": 1665702404.187721}, "macro.dbt_utils.nullcheck": {"unique_id": "macro.dbt_utils.nullcheck", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.188092}, "macro.dbt_utils.default__nullcheck": {"unique_id": "macro.dbt_utils.default__nullcheck", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.188421}, "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/dbt_shopify_holistic_reporting/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}, "patch_path": null, "arguments": [], "created_at": 1665702404.189873}, "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/dbt_shopify_holistic_reporting/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": 1665702404.190141}, "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/dbt_shopify_holistic_reporting/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": 1665702404.190898}, "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/dbt_shopify_holistic_reporting/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": 1665702404.191396}, "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/dbt_shopify_holistic_reporting/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": 1665702404.192481}, "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/dbt_shopify_holistic_reporting/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": 1665702404.193965}, "macro.dbt_utils.pivot": {"unique_id": "macro.dbt_utils.pivot", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.195022}, "macro.dbt_utils.default__pivot": {"unique_id": "macro.dbt_utils.default__pivot", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.1958542}, "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/dbt_shopify_holistic_reporting/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": 1665702404.196356}, "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/dbt_shopify_holistic_reporting/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": 1665702404.1970692}, "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/dbt_shopify_holistic_reporting/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": 1665702404.1974971}, "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/dbt_shopify_holistic_reporting/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": 1665702404.198076}, "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/dbt_shopify_holistic_reporting/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.bigquery__get_table_types_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.198563}, "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/dbt_shopify_holistic_reporting/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": 1665702404.1986449}, "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/dbt_shopify_holistic_reporting/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": 1665702404.198723}, "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/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.1987998}, "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/dbt_shopify_holistic_reporting/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": 1665702404.199808}, "macro.dbt_utils.haversine_distance": {"unique_id": "macro.dbt_utils.haversine_distance", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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}, "patch_path": null, "arguments": [], "created_at": 1665702404.200085}, "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/dbt_shopify_holistic_reporting/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": 1665702404.200638}, "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/dbt_shopify_holistic_reporting/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": 1665702404.2014878}, "macro.klaviyo_source.get_campaign_columns": {"unique_id": "macro.klaviyo_source.get_campaign_columns", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "macros/get_campaign_columns.sql", "original_file_path": "macros/get_campaign_columns.sql", "name": "get_campaign_columns", "macro_sql": "{% macro get_campaign_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"campaign_type\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"created\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"email_template_id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"from_email\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"from_name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"is_segmented\", \"datatype\": \"boolean\"},\n {\"name\": \"name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"send_time\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"sent_at\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"status\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"status_id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"status_label\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"subject\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"updated\", \"datatype\": dbt_utils.type_timestamp()}\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"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.203381}, "macro.klaviyo_source.get_metric_columns": {"unique_id": "macro.klaviyo_source.get_metric_columns", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "macros/get_metric_columns.sql", "original_file_path": "macros/get_metric_columns.sql", "name": "get_metric_columns", "macro_sql": "{% macro get_metric_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"created\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"integration_id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"updated\", \"datatype\": dbt_utils.type_timestamp()}\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"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.204294}, "macro.klaviyo_source.get_flow_columns": {"unique_id": "macro.klaviyo_source.get_flow_columns", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "macros/get_flow_columns.sql", "original_file_path": "macros/get_flow_columns.sql", "name": "get_flow_columns", "macro_sql": "{% macro get_flow_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"created\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"status\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"trigger\", \"datatype\": dbt_utils.type_string(), \"quote\": True},\n {\"name\": \"updated\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"customer_filter\", \"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"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.205426}, "macro.klaviyo_source.get_integration_columns": {"unique_id": "macro.klaviyo_source.get_integration_columns", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "macros/get_integration_columns.sql", "original_file_path": "macros/get_integration_columns.sql", "name": "get_integration_columns", "macro_sql": "{% macro get_integration_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"category\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"name\", \"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"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.206135}, "macro.klaviyo_source.get_person_columns": {"unique_id": "macro.klaviyo_source.get_person_columns", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "macros/get_person_columns.sql", "original_file_path": "macros/get_person_columns.sql", "name": "get_person_columns", "macro_sql": "{% macro get_person_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"address_1\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"address_2\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"city\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"country\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"created\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"email\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"first_name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"last_name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"latitude\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"longitude\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"organization\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"phone_number\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"region\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"timezone\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"title\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"updated\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"zip\", \"datatype\": dbt_utils.type_string()}\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('klaviyo__person_pass_through_columns')) }}\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_float", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.2084239}, "macro.klaviyo_source.get_event_columns": {"unique_id": "macro.klaviyo_source.get_event_columns", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "macros/get_event_columns.sql", "original_file_path": "macros/get_event_columns.sql", "name": "get_event_columns", "macro_sql": "{% macro get_event_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"_variation\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"campaign_id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"datetime\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"flow_id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"flow_message_id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"metric_id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"person_id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"timestamp\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"type\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"uuid\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"property_value\", \"datatype\": dbt_utils.type_string()}\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('klaviyo__event_pass_through_columns')) }}\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.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.210104}, "macro.spark_utils.get_tables": {"unique_id": "macro.spark_utils.get_tables", "package_name": "spark_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.214804}, "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/dbt_shopify_holistic_reporting/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": 1665702404.215504}, "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/dbt_shopify_holistic_reporting/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": 1665702404.216375}, "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/dbt_shopify_holistic_reporting/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": 1665702404.2171562}, "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/dbt_shopify_holistic_reporting/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": 1665702404.217877}, "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/dbt_shopify_holistic_reporting/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": 1665702404.218766}, "macro.spark_utils.spark__concat": {"unique_id": "macro.spark_utils.spark__concat", "package_name": "spark_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.219004}, "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/dbt_shopify_holistic_reporting/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": 1665702404.219164}, "macro.spark_utils.spark__dateadd": {"unique_id": "macro.spark_utils.spark__dateadd", "package_name": "spark_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.221855}, "macro.spark_utils.spark__datediff": {"unique_id": "macro.spark_utils.spark__datediff", "package_name": "spark_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.22875}, "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/dbt_shopify_holistic_reporting/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": 1665702404.228941}, "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/dbt_shopify_holistic_reporting/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": 1665702404.229012}, "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/dbt_shopify_holistic_reporting/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": 1665702404.229606}, "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/dbt_shopify_holistic_reporting/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": 1665702404.231161}, "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/dbt_shopify_holistic_reporting/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": 1665702404.231494}, "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/dbt_shopify_holistic_reporting/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": 1665702404.231766}, "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/dbt_shopify_holistic_reporting/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": 1665702404.232037}, "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/dbt_shopify_holistic_reporting/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": 1665702404.232404}, "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/dbt_shopify_holistic_reporting/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": 1665702404.2326028}, "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/dbt_shopify_holistic_reporting/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": 1665702404.2328582}, "macro.fivetran_utils.enabled_vars": {"unique_id": "macro.fivetran_utils.enabled_vars", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.233296}, "macro.fivetran_utils.percentile": {"unique_id": "macro.fivetran_utils.percentile", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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}, "patch_path": null, "arguments": [], "created_at": 1665702404.234198}, "macro.fivetran_utils.default__percentile": {"unique_id": "macro.fivetran_utils.default__percentile", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.234356}, "macro.fivetran_utils.redshift__percentile": {"unique_id": "macro.fivetran_utils.redshift__percentile", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.234516}, "macro.fivetran_utils.bigquery__percentile": {"unique_id": "macro.fivetran_utils.bigquery__percentile", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.234676}, "macro.fivetran_utils.postgres__percentile": {"unique_id": "macro.fivetran_utils.postgres__percentile", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.234815}, "macro.fivetran_utils.spark__percentile": {"unique_id": "macro.fivetran_utils.spark__percentile", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.234968}, "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/dbt_shopify_holistic_reporting/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": 1665702404.235438}, "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/dbt_shopify_holistic_reporting/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": 1665702404.236274}, "macro.fivetran_utils.json_parse": {"unique_id": "macro.fivetran_utils.json_parse", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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}, "patch_path": null, "arguments": [], "created_at": 1665702404.237317}, "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/dbt_shopify_holistic_reporting/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": 1665702404.237563}, "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/dbt_shopify_holistic_reporting/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": 1665702404.237807}, "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/dbt_shopify_holistic_reporting/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": 1665702404.238039}, "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/dbt_shopify_holistic_reporting/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": 1665702404.238268}, "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/dbt_shopify_holistic_reporting/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": 1665702404.238527}, "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/dbt_shopify_holistic_reporting/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": 1665702404.238786}, "macro.fivetran_utils.max_bool": {"unique_id": "macro.fivetran_utils.max_bool", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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}, "patch_path": null, "arguments": [], "created_at": 1665702404.2391481}, "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/dbt_shopify_holistic_reporting/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": 1665702404.2392461}, "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/dbt_shopify_holistic_reporting/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": 1665702404.239341}, "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/dbt_shopify_holistic_reporting/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": 1665702404.239438}, "macro.fivetran_utils.calculated_fields": {"unique_id": "macro.fivetran_utils.calculated_fields", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.2398531}, "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/dbt_shopify_holistic_reporting/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": 1665702404.240463}, "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/dbt_shopify_holistic_reporting/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": 1665702404.2411}, "macro.fivetran_utils.string_agg": {"unique_id": "macro.fivetran_utils.string_agg", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.2415948}, "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/dbt_shopify_holistic_reporting/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": 1665702404.2417228}, "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/dbt_shopify_holistic_reporting/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": 1665702404.241846}, "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/dbt_shopify_holistic_reporting/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": 1665702404.241975}, "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/dbt_shopify_holistic_reporting/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": 1665702404.2421079}, "macro.fivetran_utils.timestamp_diff": {"unique_id": "macro.fivetran_utils.timestamp_diff", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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}, "patch_path": null, "arguments": [], "created_at": 1665702404.244826}, "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/dbt_shopify_holistic_reporting/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": 1665702404.244988}, "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/dbt_shopify_holistic_reporting/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": 1665702404.245141}, "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/dbt_shopify_holistic_reporting/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": 1665702404.245292}, "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/dbt_shopify_holistic_reporting/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": 1665702404.2469609}, "macro.fivetran_utils.try_cast": {"unique_id": "macro.fivetran_utils.try_cast", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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}, "patch_path": null, "arguments": [], "created_at": 1665702404.247791}, "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/dbt_shopify_holistic_reporting/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": 1665702404.247927}, "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/dbt_shopify_holistic_reporting/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": 1665702404.248193}, "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/dbt_shopify_holistic_reporting/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": 1665702404.24847}, "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/dbt_shopify_holistic_reporting/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": 1665702404.248598}, "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/dbt_shopify_holistic_reporting/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": 1665702404.248718}, "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/dbt_shopify_holistic_reporting/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": 1665702404.248839}, "macro.fivetran_utils.source_relation": {"unique_id": "macro.fivetran_utils.source_relation", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.249349}, "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/dbt_shopify_holistic_reporting/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": 1665702404.2499158}, "macro.fivetran_utils.first_value": {"unique_id": "macro.fivetran_utils.first_value", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.25044}, "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/dbt_shopify_holistic_reporting/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": 1665702404.250637}, "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/dbt_shopify_holistic_reporting/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": 1665702404.250858}, "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/dbt_shopify_holistic_reporting/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": 1665702404.2511628}, "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/dbt_shopify_holistic_reporting/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": 1665702404.252075}, "macro.fivetran_utils.union_relations": {"unique_id": "macro.fivetran_utils.union_relations", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.255859}, "macro.fivetran_utils.union_tables": {"unique_id": "macro.fivetran_utils.union_tables", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.256213}, "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/dbt_shopify_holistic_reporting/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": 1665702404.2566369}, "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/dbt_shopify_holistic_reporting/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": 1665702404.258143}, "macro.fivetran_utils.quote_column": {"unique_id": "macro.fivetran_utils.quote_column", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.25868}, "macro.fivetran_utils.json_extract": {"unique_id": "macro.fivetran_utils.json_extract", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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}, "patch_path": null, "arguments": [], "created_at": 1665702404.259259}, "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/dbt_shopify_holistic_reporting/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": 1665702404.259412}, "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/dbt_shopify_holistic_reporting/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": 1665702404.259562}, "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/dbt_shopify_holistic_reporting/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": 1665702404.259726}, "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/dbt_shopify_holistic_reporting/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": 1665702404.259874}, "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/dbt_shopify_holistic_reporting/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": 1665702404.260025}, "macro.fivetran_utils.collect_freshness": {"unique_id": "macro.fivetran_utils.collect_freshness", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.26073}, "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/dbt_shopify_holistic_reporting/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": 1665702404.261682}, "macro.fivetran_utils.timestamp_add": {"unique_id": "macro.fivetran_utils.timestamp_add", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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}, "patch_path": null, "arguments": [], "created_at": 1665702404.262378}, "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/dbt_shopify_holistic_reporting/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": 1665702404.262537}, "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/dbt_shopify_holistic_reporting/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": 1665702404.26269}, "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/dbt_shopify_holistic_reporting/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": 1665702404.2628422}, "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/dbt_shopify_holistic_reporting/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": 1665702404.2629938}, "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/dbt_shopify_holistic_reporting/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": 1665702404.263165}, "macro.fivetran_utils.ceiling": {"unique_id": "macro.fivetran_utils.ceiling", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.263461}, "macro.fivetran_utils.default__ceiling": {"unique_id": "macro.fivetran_utils.default__ceiling", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.2636192}, "macro.fivetran_utils.snowflake__ceiling": {"unique_id": "macro.fivetran_utils.snowflake__ceiling", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.2637172}, "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/dbt_shopify_holistic_reporting/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": 1665702404.264388}, "macro.fivetran_utils.union_data": {"unique_id": "macro.fivetran_utils.union_data", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.2655842}, "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/dbt_shopify_holistic_reporting/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": 1665702404.267287}, "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/dbt_shopify_holistic_reporting/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": 1665702404.268695}, "macro.fivetran_utils.array_agg": {"unique_id": "macro.fivetran_utils.array_agg", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.2690089}, "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/dbt_shopify_holistic_reporting/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": 1665702404.2691069}, "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/dbt_shopify_holistic_reporting/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": 1665702404.269207}, "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/dbt_shopify_holistic_reporting/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": 1665702404.269645}, "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/dbt_shopify_holistic_reporting/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": 1665702404.270079}}, "docs": {"dbt.__overview__": {"unique_id": "dbt.__overview__", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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"}, "shopify_source._fivetran_synced": {"unique_id": "shopify_source._fivetran_synced", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "docs.md", "original_file_path": "models/docs.md", "name": "_fivetran_synced", "block_contents": "The time when a record was last updated by Fivetran."}}, "exposures": {}, "metrics": {}, "selectors": {}, "disabled": {"seed.shopify_holistic_reporting_integration_tests.flow_snowflake": [{"raw_sql": "", "resource_type": "seed", "depends_on": {"macros": [], "nodes": []}, "config": {"enabled": false, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "seed", "persist_docs": {}, "quoting": {}, "column_types": {"_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests", "fqn": ["shopify_holistic_reporting_integration_tests", "flow_snowflake"], "unique_id": "seed.shopify_holistic_reporting_integration_tests.flow_snowflake", "package_name": "shopify_holistic_reporting_integration_tests", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests", "path": "flow_snowflake.csv", "original_file_path": "seeds/flow_snowflake.csv", "name": "flow_snowflake", "alias": "flow_snowflake", "checksum": {"name": "sha256", "checksum": "6bdc1fd92ee1a5bd818f2c9dc35cb33e0b4549d4d0b325569e0518843ce02711"}, "tags": [], "refs": [], "sources": [], "metrics": [], "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 in ('redshift', 'postgres') else false }}", "column_types": {"_fivetran_synced": "timestamp"}, "enabled": "{{ true if target.type == 'snowflake' else false }}"}, "created_at": 1665702404.5314429, "config_call_dict": {}}]}, "parent_map": {"seed.shopify_holistic_reporting_integration_tests.shopify_order_data": [], "seed.shopify_holistic_reporting_integration_tests.shopify_order_line_refund_data": [], "seed.shopify_holistic_reporting_integration_tests.shopify_order_adjustment_data": [], "seed.shopify_holistic_reporting_integration_tests.shopify_product_variant_data": [], "seed.shopify_holistic_reporting_integration_tests.shopify_refund_data": [], "seed.shopify_holistic_reporting_integration_tests.shopify_transaction_data": [], "seed.shopify_holistic_reporting_integration_tests.flow": [], "seed.shopify_holistic_reporting_integration_tests.shopify_product_data": [], "seed.shopify_holistic_reporting_integration_tests.integration": [], "seed.shopify_holistic_reporting_integration_tests.metric": [], "seed.shopify_holistic_reporting_integration_tests.person": [], "seed.shopify_holistic_reporting_integration_tests.event": [], "seed.shopify_holistic_reporting_integration_tests.shopify_customer_data": [], "seed.shopify_holistic_reporting_integration_tests.shopify_order_line_data": [], "seed.shopify_holistic_reporting_integration_tests.campaign": [], "model.shopify_source.stg_shopify__order_line": ["model.shopify_source.stg_shopify__order_line_tmp", "model.shopify_source.stg_shopify__order_line_tmp"], "model.shopify_source.stg_shopify__refund": ["model.shopify_source.stg_shopify__refund_tmp", "model.shopify_source.stg_shopify__refund_tmp"], "model.shopify_source.stg_shopify__product": ["model.shopify_source.stg_shopify__product_tmp", "model.shopify_source.stg_shopify__product_tmp"], "model.shopify_source.stg_shopify__product_variant": ["model.shopify_source.stg_shopify__product_variant_tmp", "model.shopify_source.stg_shopify__product_variant_tmp"], "model.shopify_source.stg_shopify__order": ["model.shopify_source.stg_shopify__order_tmp", "model.shopify_source.stg_shopify__order_tmp"], "model.shopify_source.stg_shopify__transaction": ["model.shopify_source.stg_shopify__transaction_tmp", "model.shopify_source.stg_shopify__transaction_tmp"], "model.shopify_source.stg_shopify__order_adjustment": ["model.shopify_source.stg_shopify__order_adjustment_tmp", "model.shopify_source.stg_shopify__order_adjustment_tmp"], "model.shopify_source.stg_shopify__customer": ["model.shopify_source.stg_shopify__customer_tmp", "model.shopify_source.stg_shopify__customer_tmp"], "model.shopify_source.stg_shopify__order_line_refund": ["model.shopify_source.stg_shopify__order_line_refund_tmp", "model.shopify_source.stg_shopify__order_line_refund_tmp"], "model.shopify_source.stg_shopify__customer_tmp": ["seed.shopify_holistic_reporting_integration_tests.shopify_customer_data"], "model.shopify_source.stg_shopify__order_line_tmp": ["seed.shopify_holistic_reporting_integration_tests.shopify_order_line_data"], "model.shopify_source.stg_shopify__refund_tmp": ["seed.shopify_holistic_reporting_integration_tests.shopify_refund_data"], "model.shopify_source.stg_shopify__product_tmp": ["seed.shopify_holistic_reporting_integration_tests.shopify_product_data"], "model.shopify_source.stg_shopify__order_adjustment_tmp": ["seed.shopify_holistic_reporting_integration_tests.shopify_order_adjustment_data"], "model.shopify_source.stg_shopify__order_line_refund_tmp": ["seed.shopify_holistic_reporting_integration_tests.shopify_order_line_refund_data"], "model.shopify_source.stg_shopify__transaction_tmp": ["seed.shopify_holistic_reporting_integration_tests.shopify_transaction_data"], "model.shopify_source.stg_shopify__product_variant_tmp": ["seed.shopify_holistic_reporting_integration_tests.shopify_product_variant_data"], "model.shopify_source.stg_shopify__order_tmp": ["seed.shopify_holistic_reporting_integration_tests.shopify_order_data"], "model.klaviyo_source.stg_klaviyo__person": ["model.klaviyo_source.stg_klaviyo__person_tmp", "model.klaviyo_source.stg_klaviyo__person_tmp"], "model.klaviyo_source.stg_klaviyo__campaign": ["model.klaviyo_source.stg_klaviyo__campaign_tmp", "model.klaviyo_source.stg_klaviyo__campaign_tmp"], "model.klaviyo_source.stg_klaviyo__metric": ["model.klaviyo_source.stg_klaviyo__metric_tmp", "model.klaviyo_source.stg_klaviyo__metric_tmp"], "model.klaviyo_source.stg_klaviyo__integration": ["model.klaviyo_source.stg_klaviyo__integration_tmp", "model.klaviyo_source.stg_klaviyo__integration_tmp"], "model.klaviyo_source.stg_klaviyo__flow": ["model.klaviyo_source.stg_klaviyo__flow_tmp", "model.klaviyo_source.stg_klaviyo__flow_tmp"], "model.klaviyo_source.stg_klaviyo__event": ["model.klaviyo_source.stg_klaviyo__event_tmp", "model.klaviyo_source.stg_klaviyo__event_tmp"], "model.klaviyo_source.stg_klaviyo__event_tmp": ["seed.shopify_holistic_reporting_integration_tests.event"], "model.klaviyo_source.stg_klaviyo__metric_tmp": ["seed.shopify_holistic_reporting_integration_tests.metric"], "model.klaviyo_source.stg_klaviyo__campaign_tmp": ["seed.shopify_holistic_reporting_integration_tests.campaign"], "model.klaviyo_source.stg_klaviyo__integration_tmp": ["seed.shopify_holistic_reporting_integration_tests.integration"], "model.klaviyo_source.stg_klaviyo__flow_tmp": ["seed.shopify_holistic_reporting_integration_tests.flow"], "model.klaviyo_source.stg_klaviyo__person_tmp": ["seed.shopify_holistic_reporting_integration_tests.person"], "model.klaviyo.klaviyo__person_campaign_flow": ["model.klaviyo.klaviyo__events"], "model.klaviyo.klaviyo__persons": ["model.klaviyo.int_klaviyo__person_metrics", "model.klaviyo.int_klaviyo__person_metrics", "model.klaviyo_source.stg_klaviyo__person"], "model.klaviyo.klaviyo__flows": ["model.klaviyo.int_klaviyo__campaign_flow_metrics", "model.klaviyo.int_klaviyo__campaign_flow_metrics", "model.klaviyo_source.stg_klaviyo__flow"], "model.klaviyo.klaviyo__campaigns": ["model.klaviyo.int_klaviyo__campaign_flow_metrics", "model.klaviyo.int_klaviyo__campaign_flow_metrics", "model.klaviyo_source.stg_klaviyo__campaign"], "model.klaviyo.klaviyo__events": ["model.klaviyo.int_klaviyo__event_attribution", "model.klaviyo.int_klaviyo__event_attribution", "model.klaviyo_source.stg_klaviyo__campaign", "model.klaviyo_source.stg_klaviyo__flow", "model.klaviyo_source.stg_klaviyo__integration", "model.klaviyo_source.stg_klaviyo__metric", "model.klaviyo_source.stg_klaviyo__person"], "model.klaviyo.int_klaviyo__campaign_flow_metrics": ["model.klaviyo.klaviyo__person_campaign_flow", "model.klaviyo.klaviyo__person_campaign_flow"], "model.klaviyo.int_klaviyo__person_metrics": ["model.klaviyo.klaviyo__person_campaign_flow", "model.klaviyo.klaviyo__person_campaign_flow"], "model.klaviyo.int_klaviyo__event_attribution": ["model.klaviyo_source.stg_klaviyo__event"], "model.shopify.shopify__customer_cohorts": ["model.shopify.shopify__calendar", "model.shopify.shopify__customers", "model.shopify.shopify__orders"], "model.shopify.shopify__orders": ["model.shopify.shopify__orders__order_line_aggregates", "model.shopify.shopify__orders__order_refunds", "model.shopify_source.stg_shopify__order", "model.shopify_source.stg_shopify__order_adjustment"], "model.shopify.shopify__products": ["model.shopify.shopify__order_lines", "model.shopify.shopify__orders", "model.shopify_source.stg_shopify__product"], "model.shopify.shopify__transactions": ["model.shopify_source.stg_shopify__transaction"], "model.shopify.shopify__customers": ["model.shopify.shopify__customers__order_aggregates", "model.shopify_source.stg_shopify__customer", "model.shopify_source.stg_shopify__customer"], "model.shopify.shopify__order_lines": ["model.shopify.shopify__orders__order_refunds", "model.shopify_source.stg_shopify__order_line", "model.shopify_source.stg_shopify__product_variant"], "model.shopify.shopify__calendar": [], "model.shopify.shopify__orders__order_line_aggregates": ["model.shopify_source.stg_shopify__order_line"], "model.shopify.shopify__customers__order_aggregates": ["model.shopify.shopify__transactions", "model.shopify_source.stg_shopify__order"], "model.shopify.shopify__orders__order_refunds": ["model.shopify_source.stg_shopify__order_line_refund", "model.shopify_source.stg_shopify__refund"], "model.shopify_holistic_reporting.shopify_holistic_reporting__customer_enhanced": ["model.shopify_holistic_reporting.int__klaviyo_person_rollup", "model.shopify_holistic_reporting.int__klaviyo_person_rollup", "model.shopify_holistic_reporting.int__shopify_customer_rollup", "model.shopify_holistic_reporting.int__shopify_customer_rollup"], "model.shopify_holistic_reporting.shopify_holistic_reporting__orders_attribution": ["model.klaviyo.klaviyo__events", "model.shopify.shopify__orders", "model.shopify.shopify__orders"], "model.shopify_holistic_reporting.shopify_holistic_reporting__daily_customer_metrics": ["model.shopify_holistic_reporting.int__daily_klaviyo_user_metrics", "model.shopify_holistic_reporting.int__daily_klaviyo_user_metrics", "model.shopify_holistic_reporting.int__daily_shopify_customer_orders", "model.shopify_holistic_reporting.int__daily_shopify_customer_orders"], "model.shopify_holistic_reporting.int__daily_shopify_customer_orders": ["model.shopify.shopify__order_lines", "model.shopify_holistic_reporting.shopify_holistic_reporting__orders_attribution"], "model.shopify_holistic_reporting.int__shopify_customer_rollup": ["model.shopify.shopify__customers", "model.shopify.shopify__customers"], "model.shopify_holistic_reporting.int__daily_klaviyo_user_metrics": ["model.klaviyo.klaviyo__events"], "model.shopify_holistic_reporting.int__klaviyo_person_rollup": ["model.klaviyo.klaviyo__persons", "model.klaviyo.klaviyo__persons"], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__customer_customer_id__source_relation.1b2185db25": ["model.shopify_source.stg_shopify__customer"], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_line_refund_order_line_refund_id__source_relation.1877420c29": ["model.shopify_source.stg_shopify__order_line_refund"], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_line_order_line_id__source_relation.c2797e7a9c": ["model.shopify_source.stg_shopify__order_line"], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_order_id__source_relation.81d10381c1": ["model.shopify_source.stg_shopify__order"], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__product_product_id__source_relation.48b32ab6a2": ["model.shopify_source.stg_shopify__product"], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__product_variant_variant_id__source_relation.7506695ec0": ["model.shopify_source.stg_shopify__product_variant"], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__transaction_transaction_id__source_relation.d55a33652a": ["model.shopify_source.stg_shopify__transaction"], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__refund_refund_id__source_relation.cd4dbc2b35": ["model.shopify_source.stg_shopify__refund"], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_adjustment_order_adjustment_id__source_relation.00b7d10cb0": ["model.shopify_source.stg_shopify__order_adjustment"], "test.klaviyo_source.not_null_stg_klaviyo__campaign_campaign_id.5dfc47dc1d": ["model.klaviyo_source.stg_klaviyo__campaign"], "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__campaign_campaign_id__source_relation.59158488ff": ["model.klaviyo_source.stg_klaviyo__campaign"], "test.klaviyo_source.not_null_stg_klaviyo__event_event_id.7a09ac6ec1": ["model.klaviyo_source.stg_klaviyo__event"], "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__event_event_id__source_relation.3778c651d7": ["model.klaviyo_source.stg_klaviyo__event"], "test.klaviyo_source.not_null_stg_klaviyo__flow_flow_id.a00a897e42": ["model.klaviyo_source.stg_klaviyo__flow"], "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__flow_flow_id__source_relation.015215d481": ["model.klaviyo_source.stg_klaviyo__flow"], "test.klaviyo_source.not_null_stg_klaviyo__integration_integration_id.fe572c5f1b": ["model.klaviyo_source.stg_klaviyo__integration"], "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__integration_integration_id__source_relation.be6158ad21": ["model.klaviyo_source.stg_klaviyo__integration"], "test.klaviyo_source.not_null_stg_klaviyo__person_person_id.bd77ffc8aa": ["model.klaviyo_source.stg_klaviyo__person"], "test.klaviyo_source.unique_stg_klaviyo__person_email.dc3a98b014": ["model.klaviyo_source.stg_klaviyo__person"], "test.klaviyo_source.not_null_stg_klaviyo__person_email.c7094cfe27": ["model.klaviyo_source.stg_klaviyo__person"], "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__person_person_id__source_relation.33a4f9ca24": ["model.klaviyo_source.stg_klaviyo__person"], "test.klaviyo_source.not_null_stg_klaviyo__metric_metric_id.4759d62078": ["model.klaviyo_source.stg_klaviyo__metric"], "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__metric_metric_id__source_relation.e9f33c04e5": ["model.klaviyo_source.stg_klaviyo__metric"], "test.klaviyo.not_null_klaviyo__events_event_id.eada7340ba": ["model.klaviyo.klaviyo__events"], "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__events_event_id__source_relation.847dad4174": ["model.klaviyo.klaviyo__events"], "test.klaviyo.not_null_klaviyo__person_campaign_flow_person_id.e27d13b0f2": ["model.klaviyo.klaviyo__person_campaign_flow"], "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__person_campaign_flow_person_id__last_touch_campaign_id__last_touch_flow_id__variation_id__source_relation.30e1824079": ["model.klaviyo.klaviyo__person_campaign_flow"], "test.klaviyo.not_null_klaviyo__campaigns_campaign_variation_key.c4588cdadc": ["model.klaviyo.klaviyo__campaigns"], "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__campaigns_campaign_variation_key__source_relation.e5d14aee28": ["model.klaviyo.klaviyo__campaigns"], "test.klaviyo.not_null_klaviyo__flows_flow_variation_key.152c0d960b": ["model.klaviyo.klaviyo__flows"], "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__flows_flow_variation_key__source_relation.925d4118dc": ["model.klaviyo.klaviyo__flows"], "test.klaviyo.not_null_klaviyo__persons_person_id.624a41e75a": ["model.klaviyo.klaviyo__persons"], "test.klaviyo.unique_klaviyo__persons_email.a330194dd6": ["model.klaviyo.klaviyo__persons"], "test.klaviyo.not_null_klaviyo__persons_email.072e38d07d": ["model.klaviyo.klaviyo__persons"], "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__persons_person_id__source_relation.b223d703b3": ["model.klaviyo.klaviyo__persons"], "test.klaviyo.not_null_int_klaviyo__event_attribution_event_id.8d186152c4": ["model.klaviyo.int_klaviyo__event_attribution"], "test.klaviyo.dbt_utils_unique_combination_of_columns_int_klaviyo__event_attribution_event_id__source_relation.654b98ad2c": ["model.klaviyo.int_klaviyo__event_attribution"], "test.klaviyo.dbt_utils_unique_combination_of_columns_int_klaviyo__campaign_flow_metrics_variation_id__source_relation__last_touch_campaign_id__last_touch_flow_id.3ea05faa81": ["model.klaviyo.int_klaviyo__campaign_flow_metrics"], "test.klaviyo.not_null_int_klaviyo__person_metrics_person_id.2c0f4e5a67": ["model.klaviyo.int_klaviyo__person_metrics"], "test.klaviyo.dbt_utils_unique_combination_of_columns_int_klaviyo__person_metrics_person_id__source_relation.4897d57f8b": ["model.klaviyo.int_klaviyo__person_metrics"], "test.shopify.unique_shopify__customer_cohorts_customer_cohort_id.c5e4855c7a": ["model.shopify.shopify__customer_cohorts"], "test.shopify.not_null_shopify__customer_cohorts_customer_cohort_id.88e9c30925": ["model.shopify.shopify__customer_cohorts"], "test.shopify.dbt_utils_unique_combination_of_columns_shopify__orders_order_id__source_relation.b2d1eaf63d": ["model.shopify.shopify__orders"], "test.shopify.dbt_utils_unique_combination_of_columns_shopify__customers_customer_id__source_relation.88d3656469": ["model.shopify.shopify__customers"], "test.shopify.dbt_utils_unique_combination_of_columns_shopify__products_product_id__source_relation.f00b2fb95a": ["model.shopify.shopify__products"], "test.shopify.dbt_utils_unique_combination_of_columns_shopify__order_lines_order_line_id__source_relation.2483d5ef95": ["model.shopify.shopify__order_lines"], "test.shopify.dbt_utils_unique_combination_of_columns_shopify__transactions_transaction_id__source_relation.7341b755c0": ["model.shopify.shopify__transactions"], "test.shopify.dbt_utils_unique_combination_of_columns_shopify__customers__order_aggregates_customer_id__source_relation.5a5e85c8a9": ["model.shopify.shopify__customers__order_aggregates"], "test.shopify.dbt_utils_unique_combination_of_columns_shopify__orders__order_line_aggregates_order_id__source_relation.09d921d473": ["model.shopify.shopify__orders__order_line_aggregates"], "test.shopify_holistic_reporting.dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__customer_enhanced_email__klaviyo_source_relation__shopify_source_relation.2ea9394109": ["model.shopify_holistic_reporting.shopify_holistic_reporting__customer_enhanced"], "test.shopify_holistic_reporting.dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__daily_customer_metrics_date_day__email__klaviyo_source_relation__shopify_source_relation__campaign_id__flow_id__variation_id.0489c190fd": ["model.shopify_holistic_reporting.shopify_holistic_reporting__daily_customer_metrics"], "test.shopify_holistic_reporting.dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__orders_attribution_order_id__shopify_source_relation.0eb46743bb": ["model.shopify_holistic_reporting.shopify_holistic_reporting__orders_attribution"], "source.shopify_source.shopify.order": [], "source.shopify_source.shopify.customer": [], "source.shopify_source.shopify.order_line": [], "source.shopify_source.shopify.order_line_refund": [], "source.shopify_source.shopify.product": [], "source.shopify_source.shopify.product_variant": [], "source.shopify_source.shopify.transaction": [], "source.shopify_source.shopify.refund": [], "source.shopify_source.shopify.order_adjustment": [], "source.klaviyo_source.klaviyo.campaign": [], "source.klaviyo_source.klaviyo.event": [], "source.klaviyo_source.klaviyo.flow": [], "source.klaviyo_source.klaviyo.integration": [], "source.klaviyo_source.klaviyo.person": [], "source.klaviyo_source.klaviyo.metric": []}, "child_map": {"seed.shopify_holistic_reporting_integration_tests.shopify_order_data": ["model.shopify_source.stg_shopify__order_tmp"], "seed.shopify_holistic_reporting_integration_tests.shopify_order_line_refund_data": ["model.shopify_source.stg_shopify__order_line_refund_tmp"], "seed.shopify_holistic_reporting_integration_tests.shopify_order_adjustment_data": ["model.shopify_source.stg_shopify__order_adjustment_tmp"], "seed.shopify_holistic_reporting_integration_tests.shopify_product_variant_data": ["model.shopify_source.stg_shopify__product_variant_tmp"], "seed.shopify_holistic_reporting_integration_tests.shopify_refund_data": ["model.shopify_source.stg_shopify__refund_tmp"], "seed.shopify_holistic_reporting_integration_tests.shopify_transaction_data": ["model.shopify_source.stg_shopify__transaction_tmp"], "seed.shopify_holistic_reporting_integration_tests.flow": ["model.klaviyo_source.stg_klaviyo__flow_tmp"], "seed.shopify_holistic_reporting_integration_tests.shopify_product_data": ["model.shopify_source.stg_shopify__product_tmp"], "seed.shopify_holistic_reporting_integration_tests.integration": ["model.klaviyo_source.stg_klaviyo__integration_tmp"], "seed.shopify_holistic_reporting_integration_tests.metric": ["model.klaviyo_source.stg_klaviyo__metric_tmp"], "seed.shopify_holistic_reporting_integration_tests.person": ["model.klaviyo_source.stg_klaviyo__person_tmp"], "seed.shopify_holistic_reporting_integration_tests.event": ["model.klaviyo_source.stg_klaviyo__event_tmp"], "seed.shopify_holistic_reporting_integration_tests.shopify_customer_data": ["model.shopify_source.stg_shopify__customer_tmp"], "seed.shopify_holistic_reporting_integration_tests.shopify_order_line_data": ["model.shopify_source.stg_shopify__order_line_tmp"], "seed.shopify_holistic_reporting_integration_tests.campaign": ["model.klaviyo_source.stg_klaviyo__campaign_tmp"], "model.shopify_source.stg_shopify__order_line": ["model.shopify.shopify__order_lines", "model.shopify.shopify__orders__order_line_aggregates", "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_line_order_line_id__source_relation.c2797e7a9c"], "model.shopify_source.stg_shopify__refund": ["model.shopify.shopify__orders__order_refunds", "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__refund_refund_id__source_relation.cd4dbc2b35"], "model.shopify_source.stg_shopify__product": ["model.shopify.shopify__products", "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__product_product_id__source_relation.48b32ab6a2"], "model.shopify_source.stg_shopify__product_variant": ["model.shopify.shopify__order_lines", "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__product_variant_variant_id__source_relation.7506695ec0"], "model.shopify_source.stg_shopify__order": ["model.shopify.shopify__customers__order_aggregates", "model.shopify.shopify__orders", "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_order_id__source_relation.81d10381c1"], "model.shopify_source.stg_shopify__transaction": ["model.shopify.shopify__transactions", "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__transaction_transaction_id__source_relation.d55a33652a"], "model.shopify_source.stg_shopify__order_adjustment": ["model.shopify.shopify__orders", "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_adjustment_order_adjustment_id__source_relation.00b7d10cb0"], "model.shopify_source.stg_shopify__customer": ["model.shopify.shopify__customers", "model.shopify.shopify__customers", "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__customer_customer_id__source_relation.1b2185db25"], "model.shopify_source.stg_shopify__order_line_refund": ["model.shopify.shopify__orders__order_refunds", "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_line_refund_order_line_refund_id__source_relation.1877420c29"], "model.shopify_source.stg_shopify__customer_tmp": ["model.shopify_source.stg_shopify__customer", "model.shopify_source.stg_shopify__customer"], "model.shopify_source.stg_shopify__order_line_tmp": ["model.shopify_source.stg_shopify__order_line", "model.shopify_source.stg_shopify__order_line"], "model.shopify_source.stg_shopify__refund_tmp": ["model.shopify_source.stg_shopify__refund", "model.shopify_source.stg_shopify__refund"], "model.shopify_source.stg_shopify__product_tmp": ["model.shopify_source.stg_shopify__product", "model.shopify_source.stg_shopify__product"], "model.shopify_source.stg_shopify__order_adjustment_tmp": ["model.shopify_source.stg_shopify__order_adjustment", "model.shopify_source.stg_shopify__order_adjustment"], "model.shopify_source.stg_shopify__order_line_refund_tmp": ["model.shopify_source.stg_shopify__order_line_refund", "model.shopify_source.stg_shopify__order_line_refund"], "model.shopify_source.stg_shopify__transaction_tmp": ["model.shopify_source.stg_shopify__transaction", "model.shopify_source.stg_shopify__transaction"], "model.shopify_source.stg_shopify__product_variant_tmp": ["model.shopify_source.stg_shopify__product_variant", "model.shopify_source.stg_shopify__product_variant"], "model.shopify_source.stg_shopify__order_tmp": ["model.shopify_source.stg_shopify__order", "model.shopify_source.stg_shopify__order"], "model.klaviyo_source.stg_klaviyo__person": ["model.klaviyo.klaviyo__events", "model.klaviyo.klaviyo__persons", "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__person_person_id__source_relation.33a4f9ca24", "test.klaviyo_source.not_null_stg_klaviyo__person_email.c7094cfe27", "test.klaviyo_source.not_null_stg_klaviyo__person_person_id.bd77ffc8aa", "test.klaviyo_source.unique_stg_klaviyo__person_email.dc3a98b014"], "model.klaviyo_source.stg_klaviyo__campaign": ["model.klaviyo.klaviyo__campaigns", "model.klaviyo.klaviyo__events", "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__campaign_campaign_id__source_relation.59158488ff", "test.klaviyo_source.not_null_stg_klaviyo__campaign_campaign_id.5dfc47dc1d"], "model.klaviyo_source.stg_klaviyo__metric": ["model.klaviyo.klaviyo__events", "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__metric_metric_id__source_relation.e9f33c04e5", "test.klaviyo_source.not_null_stg_klaviyo__metric_metric_id.4759d62078"], "model.klaviyo_source.stg_klaviyo__integration": ["model.klaviyo.klaviyo__events", "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__integration_integration_id__source_relation.be6158ad21", "test.klaviyo_source.not_null_stg_klaviyo__integration_integration_id.fe572c5f1b"], "model.klaviyo_source.stg_klaviyo__flow": ["model.klaviyo.klaviyo__events", "model.klaviyo.klaviyo__flows", "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__flow_flow_id__source_relation.015215d481", "test.klaviyo_source.not_null_stg_klaviyo__flow_flow_id.a00a897e42"], "model.klaviyo_source.stg_klaviyo__event": ["model.klaviyo.int_klaviyo__event_attribution", "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__event_event_id__source_relation.3778c651d7", "test.klaviyo_source.not_null_stg_klaviyo__event_event_id.7a09ac6ec1"], "model.klaviyo_source.stg_klaviyo__event_tmp": ["model.klaviyo_source.stg_klaviyo__event", "model.klaviyo_source.stg_klaviyo__event"], "model.klaviyo_source.stg_klaviyo__metric_tmp": ["model.klaviyo_source.stg_klaviyo__metric", "model.klaviyo_source.stg_klaviyo__metric"], "model.klaviyo_source.stg_klaviyo__campaign_tmp": ["model.klaviyo_source.stg_klaviyo__campaign", "model.klaviyo_source.stg_klaviyo__campaign"], "model.klaviyo_source.stg_klaviyo__integration_tmp": ["model.klaviyo_source.stg_klaviyo__integration", "model.klaviyo_source.stg_klaviyo__integration"], "model.klaviyo_source.stg_klaviyo__flow_tmp": ["model.klaviyo_source.stg_klaviyo__flow", "model.klaviyo_source.stg_klaviyo__flow"], "model.klaviyo_source.stg_klaviyo__person_tmp": ["model.klaviyo_source.stg_klaviyo__person", "model.klaviyo_source.stg_klaviyo__person"], "model.klaviyo.klaviyo__person_campaign_flow": ["model.klaviyo.int_klaviyo__campaign_flow_metrics", "model.klaviyo.int_klaviyo__campaign_flow_metrics", "model.klaviyo.int_klaviyo__person_metrics", "model.klaviyo.int_klaviyo__person_metrics", "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__person_campaign_flow_person_id__last_touch_campaign_id__last_touch_flow_id__variation_id__source_relation.30e1824079", "test.klaviyo.not_null_klaviyo__person_campaign_flow_person_id.e27d13b0f2"], "model.klaviyo.klaviyo__persons": ["model.shopify_holistic_reporting.int__klaviyo_person_rollup", "model.shopify_holistic_reporting.int__klaviyo_person_rollup", "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__persons_person_id__source_relation.b223d703b3", "test.klaviyo.not_null_klaviyo__persons_email.072e38d07d", "test.klaviyo.not_null_klaviyo__persons_person_id.624a41e75a", "test.klaviyo.unique_klaviyo__persons_email.a330194dd6"], "model.klaviyo.klaviyo__flows": ["test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__flows_flow_variation_key__source_relation.925d4118dc", "test.klaviyo.not_null_klaviyo__flows_flow_variation_key.152c0d960b"], "model.klaviyo.klaviyo__campaigns": ["test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__campaigns_campaign_variation_key__source_relation.e5d14aee28", "test.klaviyo.not_null_klaviyo__campaigns_campaign_variation_key.c4588cdadc"], "model.klaviyo.klaviyo__events": ["model.klaviyo.klaviyo__person_campaign_flow", "model.shopify_holistic_reporting.int__daily_klaviyo_user_metrics", "model.shopify_holistic_reporting.shopify_holistic_reporting__orders_attribution", "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__events_event_id__source_relation.847dad4174", "test.klaviyo.not_null_klaviyo__events_event_id.eada7340ba"], "model.klaviyo.int_klaviyo__campaign_flow_metrics": ["model.klaviyo.klaviyo__campaigns", "model.klaviyo.klaviyo__campaigns", "model.klaviyo.klaviyo__flows", "model.klaviyo.klaviyo__flows", "test.klaviyo.dbt_utils_unique_combination_of_columns_int_klaviyo__campaign_flow_metrics_variation_id__source_relation__last_touch_campaign_id__last_touch_flow_id.3ea05faa81"], "model.klaviyo.int_klaviyo__person_metrics": ["model.klaviyo.klaviyo__persons", "model.klaviyo.klaviyo__persons", "test.klaviyo.dbt_utils_unique_combination_of_columns_int_klaviyo__person_metrics_person_id__source_relation.4897d57f8b", "test.klaviyo.not_null_int_klaviyo__person_metrics_person_id.2c0f4e5a67"], "model.klaviyo.int_klaviyo__event_attribution": ["model.klaviyo.klaviyo__events", "model.klaviyo.klaviyo__events", "test.klaviyo.dbt_utils_unique_combination_of_columns_int_klaviyo__event_attribution_event_id__source_relation.654b98ad2c", "test.klaviyo.not_null_int_klaviyo__event_attribution_event_id.8d186152c4"], "model.shopify.shopify__customer_cohorts": ["test.shopify.not_null_shopify__customer_cohorts_customer_cohort_id.88e9c30925", "test.shopify.unique_shopify__customer_cohorts_customer_cohort_id.c5e4855c7a"], "model.shopify.shopify__orders": ["model.shopify.shopify__customer_cohorts", "model.shopify.shopify__products", "model.shopify_holistic_reporting.shopify_holistic_reporting__orders_attribution", "model.shopify_holistic_reporting.shopify_holistic_reporting__orders_attribution", "test.shopify.dbt_utils_unique_combination_of_columns_shopify__orders_order_id__source_relation.b2d1eaf63d"], "model.shopify.shopify__products": ["test.shopify.dbt_utils_unique_combination_of_columns_shopify__products_product_id__source_relation.f00b2fb95a"], "model.shopify.shopify__transactions": ["model.shopify.shopify__customers__order_aggregates", "test.shopify.dbt_utils_unique_combination_of_columns_shopify__transactions_transaction_id__source_relation.7341b755c0"], "model.shopify.shopify__customers": ["model.shopify.shopify__customer_cohorts", "model.shopify_holistic_reporting.int__shopify_customer_rollup", "model.shopify_holistic_reporting.int__shopify_customer_rollup", "test.shopify.dbt_utils_unique_combination_of_columns_shopify__customers_customer_id__source_relation.88d3656469"], "model.shopify.shopify__order_lines": ["model.shopify.shopify__products", "model.shopify_holistic_reporting.int__daily_shopify_customer_orders", "test.shopify.dbt_utils_unique_combination_of_columns_shopify__order_lines_order_line_id__source_relation.2483d5ef95"], "model.shopify.shopify__calendar": ["model.shopify.shopify__customer_cohorts"], "model.shopify.shopify__orders__order_line_aggregates": ["model.shopify.shopify__orders", "test.shopify.dbt_utils_unique_combination_of_columns_shopify__orders__order_line_aggregates_order_id__source_relation.09d921d473"], "model.shopify.shopify__customers__order_aggregates": ["model.shopify.shopify__customers", "test.shopify.dbt_utils_unique_combination_of_columns_shopify__customers__order_aggregates_customer_id__source_relation.5a5e85c8a9"], "model.shopify.shopify__orders__order_refunds": ["model.shopify.shopify__order_lines", "model.shopify.shopify__orders"], "model.shopify_holistic_reporting.shopify_holistic_reporting__customer_enhanced": ["test.shopify_holistic_reporting.dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__customer_enhanced_email__klaviyo_source_relation__shopify_source_relation.2ea9394109"], "model.shopify_holistic_reporting.shopify_holistic_reporting__orders_attribution": ["model.shopify_holistic_reporting.int__daily_shopify_customer_orders", "test.shopify_holistic_reporting.dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__orders_attribution_order_id__shopify_source_relation.0eb46743bb"], "model.shopify_holistic_reporting.shopify_holistic_reporting__daily_customer_metrics": ["test.shopify_holistic_reporting.dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__daily_customer_metrics_date_day__email__klaviyo_source_relation__shopify_source_relation__campaign_id__flow_id__variation_id.0489c190fd"], "model.shopify_holistic_reporting.int__daily_shopify_customer_orders": ["model.shopify_holistic_reporting.shopify_holistic_reporting__daily_customer_metrics", "model.shopify_holistic_reporting.shopify_holistic_reporting__daily_customer_metrics"], "model.shopify_holistic_reporting.int__shopify_customer_rollup": ["model.shopify_holistic_reporting.shopify_holistic_reporting__customer_enhanced", "model.shopify_holistic_reporting.shopify_holistic_reporting__customer_enhanced"], "model.shopify_holistic_reporting.int__daily_klaviyo_user_metrics": ["model.shopify_holistic_reporting.shopify_holistic_reporting__daily_customer_metrics", "model.shopify_holistic_reporting.shopify_holistic_reporting__daily_customer_metrics"], "model.shopify_holistic_reporting.int__klaviyo_person_rollup": ["model.shopify_holistic_reporting.shopify_holistic_reporting__customer_enhanced", "model.shopify_holistic_reporting.shopify_holistic_reporting__customer_enhanced"], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__customer_customer_id__source_relation.1b2185db25": [], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_line_refund_order_line_refund_id__source_relation.1877420c29": [], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_line_order_line_id__source_relation.c2797e7a9c": [], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_order_id__source_relation.81d10381c1": [], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__product_product_id__source_relation.48b32ab6a2": [], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__product_variant_variant_id__source_relation.7506695ec0": [], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__transaction_transaction_id__source_relation.d55a33652a": [], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__refund_refund_id__source_relation.cd4dbc2b35": [], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_adjustment_order_adjustment_id__source_relation.00b7d10cb0": [], "test.klaviyo_source.not_null_stg_klaviyo__campaign_campaign_id.5dfc47dc1d": [], "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__campaign_campaign_id__source_relation.59158488ff": [], "test.klaviyo_source.not_null_stg_klaviyo__event_event_id.7a09ac6ec1": [], "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__event_event_id__source_relation.3778c651d7": [], "test.klaviyo_source.not_null_stg_klaviyo__flow_flow_id.a00a897e42": [], "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__flow_flow_id__source_relation.015215d481": [], "test.klaviyo_source.not_null_stg_klaviyo__integration_integration_id.fe572c5f1b": [], "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__integration_integration_id__source_relation.be6158ad21": [], "test.klaviyo_source.not_null_stg_klaviyo__person_person_id.bd77ffc8aa": [], "test.klaviyo_source.unique_stg_klaviyo__person_email.dc3a98b014": [], "test.klaviyo_source.not_null_stg_klaviyo__person_email.c7094cfe27": [], "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__person_person_id__source_relation.33a4f9ca24": [], "test.klaviyo_source.not_null_stg_klaviyo__metric_metric_id.4759d62078": [], "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__metric_metric_id__source_relation.e9f33c04e5": [], "test.klaviyo.not_null_klaviyo__events_event_id.eada7340ba": [], "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__events_event_id__source_relation.847dad4174": [], "test.klaviyo.not_null_klaviyo__person_campaign_flow_person_id.e27d13b0f2": [], "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__person_campaign_flow_person_id__last_touch_campaign_id__last_touch_flow_id__variation_id__source_relation.30e1824079": [], "test.klaviyo.not_null_klaviyo__campaigns_campaign_variation_key.c4588cdadc": [], "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__campaigns_campaign_variation_key__source_relation.e5d14aee28": [], "test.klaviyo.not_null_klaviyo__flows_flow_variation_key.152c0d960b": [], "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__flows_flow_variation_key__source_relation.925d4118dc": [], "test.klaviyo.not_null_klaviyo__persons_person_id.624a41e75a": [], "test.klaviyo.unique_klaviyo__persons_email.a330194dd6": [], "test.klaviyo.not_null_klaviyo__persons_email.072e38d07d": [], "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__persons_person_id__source_relation.b223d703b3": [], "test.klaviyo.not_null_int_klaviyo__event_attribution_event_id.8d186152c4": [], "test.klaviyo.dbt_utils_unique_combination_of_columns_int_klaviyo__event_attribution_event_id__source_relation.654b98ad2c": [], "test.klaviyo.dbt_utils_unique_combination_of_columns_int_klaviyo__campaign_flow_metrics_variation_id__source_relation__last_touch_campaign_id__last_touch_flow_id.3ea05faa81": [], "test.klaviyo.not_null_int_klaviyo__person_metrics_person_id.2c0f4e5a67": [], "test.klaviyo.dbt_utils_unique_combination_of_columns_int_klaviyo__person_metrics_person_id__source_relation.4897d57f8b": [], "test.shopify.unique_shopify__customer_cohorts_customer_cohort_id.c5e4855c7a": [], "test.shopify.not_null_shopify__customer_cohorts_customer_cohort_id.88e9c30925": [], "test.shopify.dbt_utils_unique_combination_of_columns_shopify__orders_order_id__source_relation.b2d1eaf63d": [], "test.shopify.dbt_utils_unique_combination_of_columns_shopify__customers_customer_id__source_relation.88d3656469": [], "test.shopify.dbt_utils_unique_combination_of_columns_shopify__products_product_id__source_relation.f00b2fb95a": [], "test.shopify.dbt_utils_unique_combination_of_columns_shopify__order_lines_order_line_id__source_relation.2483d5ef95": [], "test.shopify.dbt_utils_unique_combination_of_columns_shopify__transactions_transaction_id__source_relation.7341b755c0": [], "test.shopify.dbt_utils_unique_combination_of_columns_shopify__customers__order_aggregates_customer_id__source_relation.5a5e85c8a9": [], "test.shopify.dbt_utils_unique_combination_of_columns_shopify__orders__order_line_aggregates_order_id__source_relation.09d921d473": [], "test.shopify_holistic_reporting.dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__customer_enhanced_email__klaviyo_source_relation__shopify_source_relation.2ea9394109": [], "test.shopify_holistic_reporting.dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__daily_customer_metrics_date_day__email__klaviyo_source_relation__shopify_source_relation__campaign_id__flow_id__variation_id.0489c190fd": [], "test.shopify_holistic_reporting.dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__orders_attribution_order_id__shopify_source_relation.0eb46743bb": [], "source.shopify_source.shopify.order": [], "source.shopify_source.shopify.customer": [], "source.shopify_source.shopify.order_line": [], "source.shopify_source.shopify.order_line_refund": [], "source.shopify_source.shopify.product": [], "source.shopify_source.shopify.product_variant": [], "source.shopify_source.shopify.transaction": [], "source.shopify_source.shopify.refund": [], "source.shopify_source.shopify.order_adjustment": [], "source.klaviyo_source.klaviyo.campaign": [], "source.klaviyo_source.klaviyo.event": [], "source.klaviyo_source.klaviyo.flow": [], "source.klaviyo_source.klaviyo.integration": [], "source.klaviyo_source.klaviyo.person": [], "source.klaviyo_source.klaviyo.metric": []}} \ No newline at end of file diff --git a/docs/partial_parse.msgpack b/docs/partial_parse.msgpack index bcffb5b7300b188e721e3e8054f9a24b408a8a2e..b87e3ac30f4c5d81bb8490d074637e9431a69b0f 100644 GIT binary patch delta 184061 zcmdqK2Yi!N7clOV1HO|Z_n_jSHbE&1QxT4f#$tj;*VtI}XR2zISq|GvE^kpxY zii@oIQ%~L$4Eyq!FlH~*EKqb&(C4P>yHq~7EytQa!%|*qEXpaHU1YMD*O%uP;>5yKFNyNS&&~e&0@|k%5kIdv)1WF%j**1VwJpu!R_u# z?klj~HgCS!W$jYk-t@3`n@WtPX~wCRoFZeP#WrOpw-?u!78jT2lo-qN>h6T#9`f)I zOWCyY;*u0|ZaE@fQe1|ALGZlbj>#!*FF!}#d(|E2WK-D;IFq0Z9Yt2ZEXDH^&k?{p zp!~eCAm3Q#;RfhtGBJJ4TC-VeNHu0=rW>{9EK5durq+^SvFJ@^U8+7qmtn}#S~Jqj zsYY$O)skUK&CE(mH)m;eSsCd%L;CXLp~A9tg~*5bCYZiUQ5e3U{uqgG$ngsif zGm*WLy3W&3X4l{)2~=_^H-9QFoOG?ooNv|O#f>JXG_-OA7wK`1ka-O-*rm<+_V{af z+lAck_y7EOY;|<@liMT>lw&fY;F|MI|gjeC=!f0{g^i_aC^qNZ2OrjT6d zCtX>Os-~jI?9fk}B{ht?#NxQts7~6u4YhcgDbG@9to1t-;0yKSPO#mSU~MVET=Y`& zG!CV&_*x-FG@_8|Vkn$SIw?^_wb50fe7vNJ=&eA3Gu>j)re);n(^AuoMq|3kYB5=I_0}v?R<1cK&1x{14Y^rX zt-+X@YBpV~+8NP8wbKl*Ic4jbw1W$8I!EYn4bti4W#{{SuHpUqyzd;tI}NevfCmjR z#-SlbyK9L0hRbNa8`Wl^rKp@Th7X;iN%yuyXS^tB1iQQ9B(kJH8dVOya#;Gh5$Me( z3FM+9oK)`PHb?{Cr2&YLh<{C^!U8+%s3MVrY9iptPOw?DY z>F5vXE!XJtXj`a!7S{7WvaUhC9h~eGZEw|!cdB7`fCtqu+MyaoHO{mckC-b=Tsk`^zuZ#TyaVAY9pNtCyXjt?E zX>LT>VHYG9qPS=RCq3O$Bo1f63E3Y!GHUGILE?ndzB2b5^d_oR(q4%!f7AYRby8T6L)=lR(J-V(rV3^?6hWJ zx--|1p|xPLGgoUdXIe5+t@`v-iy_^Zp-Z!vargRFooXq)Q5quFO~Rie=(=bFCuzF6 zJxfXBYsuF%BKa>8z=)J%>M*3s7D>wO*Qi8O&?V`me@fQcn3iSH5qphpxHcUFvJTbr7$&v2L2g$?#5^!B|8%=m}) zaByZ58xz&`Wv&}U*xkmjWN)J_d^Ey8G=}bJ*u@|Y`FNeB$e4>eX?3ag$$~y&x)|)+ z9&T(N6SCd|n-6xd`5^bTv|9#yaO7hHTG^BVb%DRxy~c{%g8Z_)#x@nNyG>1Zquk4$ zDCZ(UPO5uQE}q`?wM1zfktm0Wb6s+3M~wzm=&kkbXv1fy#Cb$rl0c8Qq`ZBa$)ruS zW@*!OBoHGdqLR{?KK>`D)^-PN%XM`!f*If{kT#%BA zB{sTTagjeKWrAHEkX`|%n2V74U?)DV5gFU+GNs*krM)7FR)bqqqFiy11j&8{qHmUU z?U!LrPqSoZT5%WMYBU-3R=q)=nPo7btAzj0Fqty-dc8REVHGv#YpJU$AXVBW$}t0>{p=-L^>_>%2;t)dsZ0r?wvuJrcvCv^2BX zl5W-O%m$NHiyoFvmz$ZDi8~@XYpPCb(p#;$7K6c*nU#SXwI(w@o~kpZYtb7s7&46i zS8(azx!202C6>~%;vye%>9D3^g-s=S#aM?>R8g3F;{pZ`oGW4Nk#pnR_&iy9+Se{l zqkJq)XXoQCHa>PItySd30vU}x2<{rPW3HMav*Kc=rW7d?g4EFJn0X{21n zpwp*XFqdUX%`jz}%&C~e%1p%yzEr$qMmIgfYECzpjaEaN5fj=vsF}&My_WL5-YsPH z1$G{2gv-0Rak(p(H1bkQL?dsl2hkYf5RJj^O3fa{IZF6^96XQlP4J8{h?J*>;2i-W zQ8#F>$=#iM#Us63Ss%f6N~T_bY#y2sgx+`;q!Rp{-K+%@_Tl|#?yOLFP? z9!$Ry)VWWtNsGy>4818;uQOS!7JXJmD*8_7F{PR;=xOP(wj?(-SC9YKXJzWrbXr3? z?lVA)15vdsqzd7CG>F-^yVoVLf-JT zbcZ)0-EUAJ1u~`0l!o%rl1S4#0ropojwO`TrJ6{Hl$(}C_J}O7cG|UB*0C+LtSw?H zrzE9bgB02YnU=qMU0`xe12~!73A%TQwg+GLpagn2lz@lrQM;S!LpS;VY?iH?o3rzx z9Y+^2cGAQ{uHwjOuAMJ(664w`@GL%W^XUWv2 z>h!wwwA>6c%3WqUDaOh&rJ2&Sn47R>;0~_Ynqe?ot$MQ|Jzc9cnoY)3s|BrUCK}&s zt>?&Zp^#o%O6~Fe?yL$^V&%zlWX0{hlNI=H5IqFuw-Jxd7(rIRrl%&@I44?7onls_p-hcE_4FZ^&;5?zv&bt;Ib#ysHEE9b+Rp zu?_JKsXe9Q?#3+lf1Rhd7Ue@-x-&}Ka+fU= z$Edlx7;(xQvisQDe%lu{#GkHv{}(=W!@UYFR4Y;mkMB5`bo-6KdPQq7mK$=Mi##Q5 zaENClzv<=y$?6n&0!30ijJpv?hSr9UE^Gy&JNAw4=S1@An8F0lNIvwCJCe0yD^n?3o?V2Y!-s!j4C(HwSyf`R1-qxZ@1bk1Grm>5a96 zZw%6ZKen*7NPqsg#TDtN9}LK@T^1qiSg|Up35|7|yA$QqSg`DCSzo zz0^W&P*fW@dQv9rs9bye#whVSUMOoVb>i3QU8!^O2lj&``(`!)|vUy zxp|(B;=_7rHpdxv57eT^-D~&0mEkKN=YQd~bNA0_Ey>2ct!CnDYCPw7)=4M%%jzA3 zuD$wxeFj?oj)wR^-De4IB&}Mm&{INAc;{D!Z9cN5!R(Eu-u;IvTT4CDdm)Uxrp6_a za7`pj6!P3jMqK1BwE>|jO1P2_mdaRXrMtVQ>fk_^Qt}&3!L*~T_OX@6WK3*Lji<_X z&!k*-ygv8UUidD7xS@%IzICIei$st8RI=pikA7rWXZe%1afx=VF1pbKP5!j?Zop?e z6IWB?vDV2mMH`Xl#Hyd%2wGKp?DHPz&imDgGS+!m(?iz5o^F=TqBc1Acw@;KQLFgs zq1HpYa1*}OuvCq+q4`o_{WqV~049&9CTcdWjcz@*gFI8J-m?Sm^i z*G5-MjR(4J8<|v}eIF+5Tbpu*-4XozlML%@&E#4_*=TE~8%yBu+OPktXeEJbU;gV# z*P0p+4SlYSs;f@8Qx(?i2&|uqQ!Iw;Or{s?{#e29xcJXPXKbUU$;fF1#u@q8!|Bg1 z(C-^rR+G+pT(b#DX*Af|mFWzXrxo0arObp@kO`{qW}?L*4Aa#$tkXRccmg8d3lzj` zIn!6EcY(jyt;l9r*eMU>85_dX4|x>{5_uxqGJax)Kl7V26L5X$(-w3gOltyON*m~0 z5!hbr5Xyu*;y_W?mXWKQCd%N~e)T{Ur{0C8(9 z_Eobdt|7P|6Cr*T$GoCwnh3+`Nr-SYksEe)be>Dbv>BSK2BgH|P%y&1A4*EXKwAM0%_-`L3 z!ode3@<9RDGz$zpo$pQn=sz!zW_raVgPG5XFi2UA>#Ya2jAmMs@0D0!))*$rRYykd z4*XeMG?o#XQIA94f7$~DG?SSmviPvk$_x>^O<>kAth3H8+TG=$MQ#mDZv%QYy~ovJ zld?UZiGZt{H-vCCbC@`YvM?(6!^GsYR>oldT&4|NF*5<^c6WiJ_XaA-uU8^! zYHY>ljZ?H~Wn}1I;LeG4$y6CtzMv4`biPd^Ayb}ZSm%Cs7k9eax1DbYWsxNxZ3R6= zbZ!!v4mCB7E%8>9uIhacq|;H-J$-LrAl2g=3Yec5)_D-ey|mWVzrIm~i-6fFPl9@vsp7b?|hv*xoU&2Qk5s7%KN4nZ6}rZ-w=wSwp-Q; znUstv>NpugG@1l(Yw4Ayz1y8$aHfN-e!$D7iBe=e^8Ars$drQOF9kg_6At z3$=@wgZ(nIjHHR1j`85!xubSoYz&(x<| z(sK0~+FVmcrY-|Y{!zr*6@$3vKBh>OY(v&PSRC=sW)CYiriO_|g)qH_`9gL*DVDZ^ z$@7Y0;%_UMbQdpB+!q{lpA3RxWP&I@&U6k)X%zF3RS&phz6-Kzm@pWFi9~8bI=;xL zoT0#V;F+M!jM+O1ytkR@!R(z(7hLv=oy@J*73r7u zpx@t0K@m|A2v1Fuzbf8g4nx z98N4ME|+?Llob`vv=$hrS?V?az(ydB)(Z(@@<&XYHcSXDc&o=NclDL^UC~e0q4uI8 z+)?NT+xyB=RxFk!K|rNEt3?`S-FJ+&wS<#2jOi@%NWU~JIW%MMNIaX1hi_8NSqAK! ztxwZt8VtE$8~g|JICyIsiRtQCU5~G z&iH}Z)z*&oioUY@$d>VluguBgdhin~tNJ zt`&3+R1CpG*$!|-kX3p`Lh(7J>>+2&ourl>5)9qdjBx&)}%&2#|G z$-n@rY6geOF7Xa!t9BU?QmG5W#EWr1nsY4D1yd zVM>45cm1^1G;MAwwsFN1ZrH*etM#?mt5uhpW;Ui94Fvan93Xc8PPWv~3AhdIF@JjsNBS*dyHK>-{U&>iEcJB} z-W89_OInR%4kI7!isLWKgN8!NYXO3IStc*>|%ZwbZSvd>Z2syUq}$ zmG^FPH@0QExH3!L9#+T6A7~|>9mIL@@(PCGQlN;*!Hi`kTw@BU{vR`Cav2S-dcot*dQsI_9n;fV9>r;Zjj>-7+WllB!7sd#q#+9wur!;)(|{jp4-vo z9NIS9C$^-DM)HBLdhxn(zkDi<)myU$b1LO;dbbA8RLT9Be%RO*6N47)5`)2k$!JN> zAV&tV?@_8Q1G{OYnRQz1Z)d>|Vd3{7ELqs13yM-IiYpIRGD72*xe!ZB!@>Z_9_>aG|I?B0u2Wf^0b| zzv2{%4aenggtbH{F2uW0r3%hGA3TWC;=Lc_yPKj#%MKS@BZn>tS0uqqH(s83D4ZqQqt}|wt^to0; zrpao?BiJNGieLQFWAX)6tJRD>6Ljg=YA!t$dl+Gt!_0bnE)vtr42q|Otmcj6xJi$= zuW(&YxcH$w7WQ@uZcBOpQZK~=0{+#Q-*ElZLd{^s3a=vhz6Ze@c+h!4sh=j#U`xvL_~(kTLAug zv!c6q;P=ZzYL!|QJsW_J*OQ689w2w;#A?v3VdLQ`lOhV%j$=E*vOL8)Mk2qsH(#-- zC6r%Ppa}F1beu^e4lPo|HUOPmcc=V-q<=h9J|31%LqsU~vr7~!B}5(+OQtKHYyl$B zvt03?R~%G49r5_MLg8AxNjQjHht)F`G?E-}N2mwz={g{wHt;{3iDGFJgKhWVsOs5@ zg)P8Ad~=RM?%iV0=_b!pbZW2|ZDBX)`8A+c8MaP0p#Sm2cf8QZ(vak)2HBqbX#m+ zkY68BJZ@i*DUTu|hGmMXrV*ja6~0-nxZ28P5K*^IXn+El8%C{^h(A#7{%sZr3S<)? zd8GvSeml&4pG25H1jXtWz$`xTgd)zX6%cW{I~qVvAb{bkB_SA?^glPYsfO)g2>Mn~ zL`uwa&uT>}f&aMTZrJ&(!cR0kt*Bv|wFvEC^+`n_bY9yk{+Ei$;-67)PWaJRpG)k( zuoO=R2(~<{*lQ>Ao)?hJVb8b3?n+>aAFOMg@uhG=#P^TgeXCt6JNKlUpAYBhjV2yi-$xcDta zs8ejI3reng5Q5iDZs1qLzCCsqwCZg|ft}pr4=7$}F>@!rtJu+6M8w_)6&;-5JG9O> zJ>6iff)NMMQ+_9j4S;u#DWW0fJ;ee9c;7(wLAd&XB1#flTh7k-aXS4({xPKE^5%oo+et?&%h0b^PZ*G()*CFE%Nwo}r(0zm4=EYzA*@fUrdaMzu|4{Un zNPjmtd>b+APsNO87Gb)XZ3jpGQY>xF9-6bD`Q^VAU)Li&@nc5b-^-2k#E%Gm6Fzt^k)WE6#ca^GbgX|GGm@9h!+( z?GBBmoE4yyVJAqmpCb;Fv9&FvxBv>|aeQ9VY`Nv|-nKg^L&;!a5HplVmWps-qZBColJgvWM)1 zpWGe^uW!fR+hW3>3}=V8znoo>rO<5^ou6CHU09_+~4)cxJ! z$WH7dE#`Y!6#KYWl!uE^>?H>mISAjglN-=g(61941xupYC+yVU7KhY762s1HDfOYK zEBlXE@Dkz!o%c#C+qT{c>?hI3s8Jrg8|dGKwUPUYXk>N21h$XF`*Xy164+TSCbzXa z`;b@Q!;nPwdv|ir_|OBn(R-{wDA8wJCcc`Cf458=dALQ(dRMOvaXR)B2bA@^$59Wu zS0%f9j~dvZXKzK|(S@9OEhOe4G>!H0M9@!Z?3WJU9UT4G7IzY(_edd)fa(mk$j;R{ zy^*UQ%VbMi%+>my?0K))f^s#T_vKz}P(7|*0pvQ&?8DMT_oxkP-0+|~ByrMnG*6Gj zkAOXW*bx$wOMZ-qIhrS%;UQ)y+a1RA_tKUE+EO*NzmxTct^M)*z`UE;%k>t7_ynWV z-4T&Inx%P|Jo;q>>Y70V**O@8VCb6O^mdPkfNQM(2&F8#q_Z0`n3K(51UBP7E* zda!$^DkvFYH>|kZBM|Tp+xcnK7#wu!sAio5LVR&bHe2WeMChF6Ti6*55GfqT(tWGZ zC4YNhBf8ZvdJIw?_pO#m%ri&ad>gy8C44h|JiFE_DG>ASVB?$s+eLTu>c`z+wfSH_ z7}>6H$6e@3*|&9akk|Hob}6khC$o(Av=+DJpz(I_H+97Dk_O%|N+LUYo2NZO z+(j57C9}^PSxjb&lXF>RGf<<)b*MEI#-jio#2O15?F7?K-0Y)r55(2wArE|7!0KSZ zR5shDMa15Ds2G|xLXn`lo88)KFoULf;(_eb_cQ_KQ}*TGT#U=#v50L!>=Ow)O4wF~ zJxI--KxP8m*A9c9|3-PwE@gkN&jREDcW*HJmmD`dXm&9kwiF}HsrtrHXt5ompJyOO zw^p#Tn`ezk_~vi`gYMY{cw`*k@XTNc%_FtF1*uT(*?$+W-fgSJTz4>|^ZXyc=tgt>Of*F0-Ss zy@q|pz82Y!;aXf;&NjDmgId0w`1%Squ{By=L^)sI5PX~%<~?o`h{Ne_P}}lKlOIR0 zYaVAmkRW~#?p(u0iQFo-xlL9AF(AZk#k!|3ylE}z;f^&(p+!%#V;UepuEYInZ3z6G z;Q;|Gny?uraV`6Uo#Z7i;()`SWluE2HMn!o7S3;FJBr2^*hLKEMG1ARh?7294}q1i zW&@i<;=EgTda756e%=PVcwqzEg|P$w^A-et*CsZoX)ls&d$bi1cwXie+(74h@+J1= zdcd!s*WD%f*6;RtScbJb?8}h)3VX(eiTKp3?Ds8Rfqk!IHm$Xoh*-qFr2+gny9b*# zuKj%;;74E5#zw)r+2yrg=sUn2N-hLW?8dO<+KW%1`g?Y&_}(6NT)Zr9O6~T}A<*X> z8!aF!+$OtF7YoKdTqFdX3lQMpbF9ue-(Tn0(XE(I#QBD(WZk5x&i%%Ap;IZA*TqAP zA)qs4{LW@NXL<2=bdy?()v7<(PHI^qoodDBTr5YBVt<8x=K^$)#&A7c=3%(;t)Ax@ z8TTD4OO;T1QQ(s3M0_|*KNk=OG9{PA--nB%G*oLKrw@0VbB>?-a3fni$BDk&aaI;D&2e}T7ejIK%c@J3 zSg-f@h*RufF3UOJV}rTdTRmUR5Uv*|(@XRHG>S{4IQicKHF-=t3>nQy;uKzv;=4Q# z8-#s6nu}}IY}lw1rcC4pi_eVV`l;>GC7ZxW(iPYN&!(MeHf2(Who zH=wnXia6=JO1t71V&$SKia~?m=rL?(x!lSnIcNLZ$_;PrL=tx2PUSS5ELI|D*CI|s z7clrXWJ-$Nv?8vrb3Wup0nQh3!@QgHvtn+x+|HRLWj4-ib0_GkI1ThY9>~G|GA_kF zZ|j@8(FJT@!QHH~^XS}4E`|~`%gmGkmVyFfX^J_wJSjJS z>huar>Fg9;vOZaxQjni(nPoANe^W|km*Z!;Q{sHeu%S5ll1h1 z{^z+UxNwkTq5Z>Lt}iALPd&`N+=(Yh6dm3pk!tfspCFJYZrQ{glF_l>dhbnX>|I+q z6|CCIW%~g5Jn@lj+!={D2VV!H$aRG$UgF04WavkCa1TjCAHD^SbyG&doL4x1$bN;J zgQFt%h_|C6=jXvwUvX;D?{#jNobu&~wS;9NVcRaw4;Jm> zCi-NO5eGPx_{f{+&Cp3s=R^P3{bN^d@aG|X50~SMImGsRxsRpcznx8FD+;E(j^pR- z$D==*w|v8&5WS!KkD_pPo+Mg1KL{)ge%mLam50S#+#huK?+YXpaCm=s;sh4}Rqyyn z0?OXCFT;-$Kxg2odZ_fp5!JsbRcLykci0QbJn8GSK{_`nC; zU}^k|JOm%+w9uQy@jw3-xmJ6aOZRdT5vAf5Y5ZTa2z}yV%rT^Y%26)Q%b|&>$rF)C zy`}Mg|AVNB?$9AY=?_tz{RAlbj0=Nbx+(qO^l`4Mx6`54D1#jz*;wlDp)gjf)WhkI zIkUGTQ$)^w!u6LB`7e$j5(RtOBjk5}=C!^P5psVSHOE(1)#->G=mgqRD9G7g;!->n zgzJ5(omvgqUvMLRf=k~o(Z?l{_n!<;F^Q-=dTsI#B$7A9C*z}*jhDt(tb*WETo$}O zUm3767jfuxio3-Zb3mKZoSw-6-4S$*emKdshxM7f8s?qmg4$pk$vIs$WtMVH+4KSp zem7VJ%f>0w;lyd~5tzaY3K+Cr)dt?(fUo}fKW;Upgz9Ig`kL!OA%*I%eWXDbe8Z(O zqa08M!j`Ym(oj$@e8UAd0%{6W?NYNa>VMqaM&S+mmZ*a$iBV2}$EhK5xTF}y`GCG< zpgzk5i|4=NvK1_0lnzj{3untY?;E{9biW!Ze&oWiTi3q3{X=2xk6a%(^CM@0p+9l| z&?SkCp;kv-QBqKBH0N0J3oM{{m`hYTF2LCPxHuo6OKp)_u#XEDw)(|X+JE7+@dd>u zV*!OAr^HyEm#871GRZZTSrRq)Z-FJJ%#>#-G}?a^84E258e}}eigPpt#Z%*Brp+{# zPA%)9iP6m0NPm-trSyre8gsD*TYHw^G5ciuv_o1sZ=!AV-nL0#-(7zFpz0(yh^UzV zVm4yBA~=KZ3PnG2`97dsJj}hwO@x&fxC?aE;_(0^Q7QjzL6ve>xex$bZ$ZywO@LYf zCqxuEdSlgWH1$*N?Cn=on9f>QE2=70F6DPlgR&vU3oZc6cP&CD{zjJvq zil^bTm49&tSb8f?G-j$w4Ss)dqkJ)uxa%*Dk>==AL9AF?_^JyZ1PTA4e;sxOO~TI~ zbD=KR#$WN?dZLYshh6`YP}Dl7D;(}Ggu%rBxDJ&`Nt&sp#$1i5qO=s7K1l3dMy?f= zmuXDJMb`YO8f$SW{#jUJEX^;&&Jmgd(lA0(TtplC+H^5}BgghaZ`+&6Q!VB3anfLM zc8PJQ@ABdtsQ!;L%W)jgiF~Tq{u1{#ja>g5rb1K6Z1?XBQ|kOV2)x1-`hxgy>I(OO zjQdE;zsfzs
+#oUTdK5H*Xu$T0jH^2yX_$)BGD@)B?Yr{C;%{4FNAb-g(b26=m~Iy z6|&&Gf-h%Q!gf6$3P;~kB`1qC7m8JTvQ3;*Wxyc_@0 zYd+)OOB{b6^Paen=R3>97nOW46O8otKm$Kl8o5$%HIu_{rFhb02CZbUk#l?9PH2INnO>7 zBmTpwI;TK9^*)>l;9v6z>*LhZ#Hm62JJcEd@43Hm>mfLjZwFN&sD37d@OSxYn!8~^ zD6dgw*fE67(R_RHKq$XeAJ<$lk&WuQOLsonTvVvp|pAqJ}N;v>Y!BtA~j z0>xyRMLJd$O+|IosCJ?n-aEylgTuTqka-%84d)|8LC-H@TCJXbPb3VM4tG!D1EBX& zE)JIE;9sMrprXpz<0IeXf`LCR`6mBaNg^l-e!L$i3CiHd`h=fwd^2D=sEyboljo$F zE`KQ{R90spCZ$=tZ}P2VCJ}n@1Efi=o+l~ANIu6h%Va4jhhNV7wS}!OaqS#e`XBa< zV@34Z@6L!sEht6=dvD7L-+ zQ-;9k!@gNd;Wa5Ip8~u8RCWQ)w`u_@|53I>w?sLEx+Rx*9+f7I;D6&(VQ}O6rrK@a zp3awpPuCUEn0tt)r{XQMO3+^-j%otU4q$}lyrh|{DYcXoV9&Jpm^kuz ziHQ^AV&LL2?mkLa|6*ywq!T>vk2!=+BUOIV`W`1geYU=m=Yb3#?5Bzm9KTissFG!M zm!*6{U4ZIVND5R%z>q-Ie5m?Ro#Y7fE(Kpif!MdfKU!{_Iu(o-+zEeggMT>vYUaV%+2|5?Z?E=GCa*i7sP`hhO2dAF0|C9X?b>2(tg0(iO-HqLF$A@fJVMn;{smJg z@l#raDsg40S}_cXgq{)NhyH#J9-SqUGC?~@)4R7ur!f|p>s{AR()8)A(UW9{jo_u0 z@`}=;czhXZuK0C^ZGZVG18A;;j%z6>v%r)H)q`+iJJ%5czvp|vJqs~@PGS6qQmRBB zvg^{*Wpp~KQXoO zL7FNMBD>&Xz4s^A4*n)TeJ1*^*cU5NuZjlEE0`!3(^W|fZeNgG=ilin4Mb+BUZXI@ z*AWKFLjPDj5}jvNeBJlxJeNkegII*d|9!WY9;D(G{!l#ZlMA6dNp4{x9k#~_p=y#q#|t^+!kDWwv{CL zPSRby?SD8Eg=Llki>X{wQkp*l)8$hwIpwoU&^@5(9gBrBjkUD6kXU2;u=tTbOjj1t z5p8Mv_?R&_4<9sOTu$~a!)_loa?p@Lx6-eP(f4Oo=2=QDn&RBMaVFaf2wIHmkTztH zdt+>jO3b9~72>!yd?DYAxzv1XK1!kU9ZUt_9tX{wR+Kvut`)t?ETt}^mX#Fbm&e;M zL}BR>moTB&YDLP$>k=kuqA_78Ik!3JDV5?5iQht!O}R8=1&s;)$?{0)FI+xSE0Cyk zT)IJgR_T$?#QJ>ZfYHffb%#_c6-lX5g{Nuc`FQ(ECp!7U!4lM8jH2YE6KJO3Iy%?~ z7h?*htzr9Vu5*&6yqNG!+{BnT)Ic_Z&%L`izbGEBC2H_GQBCyzJh-@pyN}X&BbErx7vl=5VV(TTj>O$z6{qLY>c{2OqwSzrLOdX zNAhamrPExDR%4gUmQi>f6o07hLtP58BY7zsw(0q{@Ow|bcOR>FMR8;M@k_+Nd-1Q+ zl;5RX4o>yuJHYY2{6H^<7IEmcG+lDZqJ_Wv^W(i75H1ep9~Q#~@M>w)sWV~pK+Hc6 z9D=s*j)8o4Z^x&!7(R#(l*Z40333K|4Yi0+KPC-0?HgD+l%L=OFjJsn1aE{_hVkdA z;FZp%IYD@PI6uS}!;3il?-I~6`+)IHe+?`h#Sinv&=hj<+0p#7()e?OU}QFL@^sEG(wj0kb1&bSWN=4%Ikb3j5`R%z zjy>xkdJ3N?<%Mw*Sp}P8l`4s5eW&oL#T-3PLO8$`~f&q#xL~&CL7?k3f>^& z7Q=^gFbkOTmVY?BQNf2YiLk5+vsp32{6ipR2H#PZlmsJY@LG9NQfHX1@C(HQ5;ZgM z!35~HL>&%&_p6m1^U$#^uwWKwwni#>(U|bkR7)9dWWnUC>S*|BI6Cu(;{+v4naL;n z7vZLKGJZP3Sca|_w5!DJmN8$dIXF|n_l1p>{KU%6==ajXby`MHQd*239oFEteleMs zLekavFV@u*YsxB0N{UO-F}4*NV4Xp(1wTNIGk2DfPb6Zr@3>2mK@OJXn5JRXK|xs# zaW`_xu?Poa3{n(ki!b4`PcZT1@|>+iVXj7U_0Yv8$t%fQAt5lqXhIx;0z(cnaiHQR z;R6W>VD5By^#fE#Usdo4F-<~1Ll_u)5fkyls`xpuX(n#5j*mkd^Vm8*7?aS2#*%nr zIi@soE6Pdu5J$oYgk&ye9m~q`I5Zzm7Odkez8m>>@GSl<*m(p6z3pti0$1*#*?cEB zvq%^KlgDEM;!u_{Xypu^1=T(LKq^T;@0TQL3E^{;S#R|x(P}S4J`w)Cb9l9keNaS( z!?5^JKHnbp&F4GPIHNqj&=L<9=JR^EJRfnMRLKvQSTPL5Dt=@TQkb}>$51aF&O~fxx%;Xjy3mjJcJM_Qia< zO|I+i5+zP>?CZNe5TBrderu5xv%laKZS3qtKHrO(>bQh>2)>{158L*j-P-vrAD|#l zfHp%IN)BjT9y)gqZ2y)IlP+(08>P;NsKDKcN|m20v@m_45Tmq184tSCst_)2+%2~a ziX(tZ1$}e{hmTsho{xctm+~WgK~+&)#@{3H#;ApGEC+d;`iiG(P>OJp04Q0`5B9-K zN12f@*N9;j8Cm?HmcLU0M;^lxx05SzM_|t?H0Tem7o)=8FYpPfl@6xIj|ZU{K!Wg8~^$ItS|yLe~7i&KfTDWBiYK!`7`Uf!I7OPD;L(IiasA5y=BSjH~2lw zJ7WJ`{Jjh<+}tw?b;wWi1s=}5$@gDbDR6N65Wip;xErJQDT9?9JiExh9URz=&M2~` zADrFIkA+@)kcofZid$JFdyt8@cMu}PXZN7lf{nAVbaE)|A?=8%6dEIq&v5WDT?a~Wy_F4Rai0Q$X+vD8a%`ydx!pGw53(k0FC z`z+X=#dd=E@1eq-KUt|>d5}-`7AN%0C{7%Ve&4^1c<3PifJC_e+DrL>HSh6l$dulv z0_x9{|2{v8;&p}T20>q=JNC(k-iM#YPx!Z?-4VV6(+2cM_yjTMh%Ios5-=C`9`!n5 z1=0-1`3S}jw8!}$A?hRkA95Ijhx4ED%ZZx264t#=1N)9*G>-nd z!lY066v#i0BERWVo@F4qix2{Phx#cXa5=_KM?T}X5VpUfISC6t_kmCNCI6CmsLp2h zuM`c0wMYG9VA_{Ha4EjzKbCRt!q`DrCiT?`ejfv$oaKWDmsv36D>9Kt(yX!Ve&H7u zHTh*2UzL;Srv&4^M(#?RkYuBB&27riVESH>%P7DkOvXa;gj0NY!?%I~xBPN$Q!3%=Z+I?89Eqox zr@bqv;hB@T^WHDXUqQya1@0cGz${S=`tEV3_*AgU{eq-b`+KB+pqPJ(SI~sml|}!9 zNTm=*2yDxgBq&i2pZeAZsSC1{pMArxpyGXH@fz6rEw7bk+V-ta*7GGe_Z_d3$zP|7 z3J;-I3{?t&U-<>Pq0`UurLgQI;zgEuY%|O3SV(&?PGfT161HH>Yug^MMeKM~hTMb+ zzo1+4Q!b`AjX z__iAoLufu_6iU1sL-;cW`klcud79gm3P|aOOfva4j1mYhIN(m`300ki$o3jiyW|4B zb9jjUO&vnvRZv9QpW~xyC;Y2~9_RRIICGAVbRBGp+^-$s9S*7nVh^?wxu05m@Eji^ zE$hm45Y&n91|NLS-|DU2!KCp^qThM`h&1#Q-{UDPA0(d0sFQx?4@eyUJPXnD)-}v_>3$slDL4Wf1drJ`90Z9SoFMf|KUfx(d=)vra+tsh_EKy3Fi}WR(Km99 zrfC)M@H%{CGK&gm{%}Fj zh6{xyV#vRIcLwepBy>}|AO=fWAxe>e&qI%7Apv*jJ>X11Dsj+2a=MZAad`B8TYsX+ z=Cr$b(Cw$9C`)KIJWvGlMhf_8u*>{a5I7+UCSFCivR}Fo4$<9EUG?tHcY*sEp^bFy zQ?1Z>WfEq|jxjA+^{dYgP0bVa+7!5B8L;g=Cr13?IiL-)7~b--@QBO^ZxbEW9*8h~&^8ceP4wvL6+_y0V7Ygkqn_gu18jkQkCKSg1>Tb#*-1wQUQ_dMR0W z`UI-QzFC;;+mIpL=CkSGg{Rbku=)ft1RcD4x}X-LvxH6(2x}9edLQ~`fxR(zHLZt` z?u&^<#PbVj{O5{b*_ZxZ$oQjtF*Fbo!q`5@?{~n3)0j0})<-bH*1cS&nABGYmuB7Y zpOip+vLBL@CJ^y2uM>z=RVVisR>{;)1Evu};Z%S0fm^Jz!r<8fLXw-#!kXNF|G`tH zjcBa91`Fq%j`h$X!Vk`0X+wo6bbfedsBrNAJ-yb>vtF~G2<-$@_Nh2X(W38gWrQ${ zf!$g(60he7YTQVsp~$pR!o>QDFUFznO8;-wbXnro(LyStd%~wmZtoA+e1RMfhrh-M z88CmM5Yq~$m7b5k`jH6|Ckj|sb}OodD{rb*a4K8S`$T|8juU2!zmFBB(L$iBbqqFl z#X_JEm~aXUQE@`A69+_2MV#i6qzq0x3dYM^43ymNBX6zicwr~=8Jr$3ys<)ymUZ(T z!h78vdp0iNUn9|B) z?T{D};fjJwT4bQj6NJ0rjkoaR7ji*);Hplt|97W(QR9A=@n8!%s>orF^BH_1oj zUu_ZY7l%$3Mo7#1-x9JJ+?|Xc0Fz(Anz$1=LNA}NDxFDb6jG#_uC#|fxq@#hMCs6r zO#-cUsJ`i@|7f+w%HC+Emwki&@j0{Lb=?b<1DxnG0l)etHi;NTuXlEF8*L~=E<$JJ zWFGF7Zp;(%WJ0dkHeXoJNDWh(>7_zk^c{DjHu26;7Qen*m?MuRwF#!O8MGqDRBFNg zE?7!M8y`(CKqjAFKx(9V!Z9uSS?h{~9?)0Eb9XlH0yopn#8(Lo($}Pq*uGf6w(YB= zGU44N!aW0}!*(>i;ez3{2x3t=pbty8R!I(``lig^;Fs_GJHUt21#hdz0kWuzNzwG>>*5*IF=g)ks18q@_9TUSX?e-c`b@$uF4AG6Oys5zUh$xP(52{PdYeJ zk5vszW((d|my<~zxks2I$;xs+=rZz#n>VtMCE({ z@`{8mDi=~+3{&1q*>&{^I9(}pfRB&>zF0x==PDsWV$!u3FD}5$iGG1F+809u3YiMV zEx?Sy)he{ua~BG`DGtw^hJN?@!0-_nD_vv<|M^m4^SlqNaa2;5sDiBf&;z(|zi^NO zy{;$x@_-Nv-#j3U@db56?J~fpA4P%ut3W;t8d!AiS9-}LKPYH3_3<9)(B(0Bse&+P(35iw#wBvojDKZe!?P%Q!gME#X)GABA*jd zeKHfKY-fu4=Y_cvz0UnWJnJx6^AvielU_h`i*t_i#Y`g3)L-JHAAcrwK5?MlAb4Hk zgAAV`ez-xXm4^OpGW4IIjDhn{;u&{JsWqE@M5*3e&|&)mw#(IFuyr%8_Pkrvp|Iyi zj_qLE1;on!io&8CQWK9!j<{}d*tY@>kLDwiNS_JZ6r{K55nNL8XFD&98~d&=&YK4h zZ5NV3w^ir|{Vw8u)U-FTB5gq@ejpZpRp0avvs-ezj&Ai)*!=J|;eXQVU;c>Hm?prQ zmjthC$5GC+K=})%{Ad1#hdMeALtr+!GrOAMk3>Q1RfxDAL<1#VZ!2G696aXE1gqXiu zD5VR-#O1)5JwlET^o zJbX}?j>0|AOb_t&g~9T;c0Va+hFJKWU1i>^j8T!p$-u_0sej6-tbJjQ<=cj z!d*L+Q(*5-<-3$9ta@8%?gN8a1$HkFt*vPnlrL zhXQk%bTA9gnwTl|=9Wt=1qK2TZV#y?hPn~(wT0gMl&8}O>E=J|LOQ9LOJk&y?n3Zd z!Ry18M2k5ku>UW1+RgYy8OIdE>R*(j;NmaJmno$dK4zoTfs6Gh^(*-qxz;y)<_VhD ze^qLwm2AHZm-F(kcr2vvA4<e?!4|>q}c_f($~(MYp*~Ben*y7|rH-gmk~{GfGM_ zQolVRsQyxhFq zo1rS~kp(-PDr~b%6&B+BjV)TR3rd;A1u2^5S~b#!j+MV7(4qjuXA`{J-js z9Xvg6%cBu>k`42R;paQfpHT*RY=T+ci62BAs#R(944B7<#-?MDu6Cf(-{ajIOZB1G zK=n5r`8f|%g54isPrJphDpdpBI)_@y>XDq(i()9%X!FdNxHzeGrk-%{Q(Lw=BtE$` ze`;QR!`$Ge??m6xJ+po<&99Z%%5G;5)Of)v)$LHIQXQo7{v7ujab-f`cC{*4Iyc;5 zE-HkN{PCyHyt_t#8tA7=CJpsMV3D6{MgzO@LQfaNK_Xskb=jC*vEBBqU1`wOlXTRp ztk>w%(KBqFZGM+ixy}Mg+r7rxefExtOC+6F8+707T~u7;+WC|IPJrXv)m;bKMs(!K zHI0q!HmXZ2QR0-1hNN$?u&e4zrHYdV#e=xYL6kAJcd{8w>^h;48L`o6Up&r4J%4hA zwpR6(LqzSS2XY%clY5&(pxx;Hh3p=fo~dkiJL!w+U4vEB#coYc;oT>>PX5NyQseBL zvVwffZxFcXCR zSJiNIxuEEnsI50LIp^W%$qL0KXxeXiSk*y#h*aCtoRG~>*tyU#f)ireD;B0N;M;}~ zj2i-iYH#I6zp!987~$#x41pf`9yiBNy@JWS|82)ok;)@nIrVs6=U#H?Ke*aP)lTjF zoea_8SO(xLw@Yv|?5x-EwL9Duj-F0zsA{4t4qJ4#Q+0;Tp{n(iz4yHPhUDkWY>SZ0 z{mCALtRp|KGhkux#Az&kscokUVMJhl#LD5F?Nr@KH(F5q;+IDoDFzcG^4265HxagX zLn^vnFeago<})SjaLU}9!zMB1P??|_3!f&ac2fEsjHP~JD7@4S31;^bRqze@c_Tmy z7vJr!8p!Afncl0|;^4L9JY!j2Jv-6hp3jVg;GuWzWWB00GX)mtRX4+Xdev4+t0Rj< ziPs)aMWZ@tiJjNpCO>_~YaXCkWKbnCv*DLeHo2=;ZQKQ(<+EOf|Hbz({&D@!#F^9mX%u|Qfw+zewltZcc!<9Ums9!O7R z57j`jal(9hMQR3xO@y=X`qc~-=Ibq3UrB$aWMW_C8wLEAm>}BHQ`Hf=-hyC$)l-$x zr6r31r?skkdk|de9(56W>_(I`!&p#ZsmJ9W9`IRGEZD9ZBzueiK)_<`OhbA{_j6p6 zfO0rR>m6{qxJ4C?2*+_3Hvgj31v!4!i&~P;VM49y6{S+J--nAY`biGT$$O+oRcXIv zf$5W#QgYJyxUcepO_88`VEk(a?e3UVA*xPyyvb#(1Meb15ov?4H>JZg^-#%-zvm1xiv$J24 zpVt|nFnDt~s*PG$^9XK!|1w-v=nOHac|Chv>gi7_qToojssoLH{B3QYvGc5@)Cf$P zFH_4;k5$>erC}bU(yC_>M~xaU4Mg99D&mbXDjijERK$sw9s;L7RvMsc0G`4fnXSsD zf%=cDrA|x;bVoRCK$CLv6rP1)$081aX}(!!DV^m6_>-}!e<n59-nH)?@nB-V?8 z?Om1q>47>*@GGla88zyNQess2{sa8$1|oFeLuEWn*pCFi`k`_FAvk`Vi}2->hn18s zWsF|p%V9_H^PEXX@ISO;A!SZ_t?C$l5cdXxtUIdIL5FXU{2$zoDNF(b>GU^C9onVw zRUmEKFyT;G(qJKE^5ri(Jxy5s3G(}-7u6~z8IF>_ec@2FkhgCASlNY{3bQ^|j+EBn zX_CiXaxtJi^qjAxJNYs`{7uR6q=4c%NLw=ZM#K8zr^+O0JAul<_n+eS1(5?y<11jr z^I7E$sjpn*a;^%3O@0xu`ht>BKjnln;zn}Si(e>XnQ3t33rww2DL8#b84TOnA)9GW zV9xwh68!fiLP!ri%-%&{0et>$a2IvmjgfJVkylxNnt^Z?H6XL^qGm8bfmHNDG&)sNC9aER{7ZxL^!rZaCKK#5wP%d6#>_Z1#GKf zRltTFuy_97d+*GfnPe#Y65Rj)^ZEPnqnY>aJNMjk&pr3tb5HTFiiAf0?lAZLu-ySa z6}tC*OvxXJF1Cnnbkhf5p5Q+5*axTHCj^N@76`kGi|%kVsPkp>slYs(KqvISr&r^p z?ybGTKh3$RKP>f#auXev#`;%HI*eA3MzK*9lweUtv)wzoIVTSDPLM-?n>1VdT2ioK`%1L^y7Yh;Xhv_Cq`Ymez80)hS^hSLn5qu2ibDml3=sY-o^4rX8Vcm{daNp z=eD1|OJMQgcjp(fzfzxXBj=wJAvtoXoD#KA_HW3U$NbVoxh(8JI*|Q5<0Ir zrmWB!O38HDl`s=b7=rWClxt*!&R;3#kaCs$HkZoa;+8C+}>Ow^=~PZnY$Li1eZ@Y(Ook)n!P8zPv$svOj8q zE>I%1q`0f(zLau3%#!P$LrJx3S#`0U*T`Lw9Q1!tfr?#Lv41jSQ066B~35 zh#O!;iTJZUtMTj%qLobdtbqmmx|P7~@qC;pk1j@%yaQ|GjtIH`ZVfK9Ss5&5qlrEX z`3?74TAjn1JHGz(Z_6ZY*gi`i?yeg>&L<)|w!R9VV^lQ?x}wX3XRVJXW8TNS&(*J4 z+@jA36X~bd+a!sEA9U=SmhLRq=!)pc?fokGhM%npO?VnvdjeJ)XKQs+Mm`Ng*(|y` zM|x7k4}bMG>}4;$-TJ5yh=!q*`i^C&_EMAO0zs=8W)>CFiME!aljZ*rJz1&jKbBV4 z1YzB2=#FP?UJ*U3m&kLw{N2{OSO-V42U;Hx5bOitRVmS(*!25) zM$WuKFa5y6QM_g)G*R3yKeXNrbA=OgcEfj;;U=gzda|E?er%EBn;y}{cF3!dA6mwX z-R-MHv4PQk(JA5i_Q?Qz`o+OEJ5HieA5=slPb>2V3wlP5d4S z`nfYj@I{-BE550xuEmB7gN-n`=~jJ&k=kIW9eDcXw>V72lK;C{Kts(arjZ8$q5e+UtAH)VckSu1EB0g>C^5J`Q3S$l?! zKgnnS+qOn&!^cR4w&W&NX5<-U5m~sAC$IfsOD@kT$TrcCWQXS*wp@%#9V zK3*=CWgDdV*O|w08!tDbY`Q8$zu{9RQVP`VgFpF{`}jkRLz_~EmVALq zd?9oIg%VTuM+KA6hc6?60wY$>lMU7%?N1k{Bf780VM`Aa^Dsox*MnI|kLx;Y8A!Jt z#!{Ta5;m@R0@p?d`&*Jl5>|S38_q=0c^Gx$b!KE^eb2-lIHUiuist{0C{n&ExvRm3 zPg<`I=!~NM`BO`_*cdi92o+?*?^df=c03yH=x42uh6{H0-shHT(cRWJnJFlRs=sXg z78-M(_TSMUW=byq_(tu2T^t+^SzJOL_8y=$DU&2;z`5aX~?>W`{nGk`X=G z7FXFiGU~&j@V9-8E8ydwTa>WGgRVWMM6L9=C0@+-s}Inj7&W-=H>58G=x5Picx*kJ20ww zGDd}N+ICcZv}KAUl9EJ!{$|KMk-NHPktobt$CHxC!3S*?z(HH$q=ZP7pU(=($r!Bs zd|wcS(4Y*rt_g*_=Qqf`+lM>}7{(D(GfLznVJ8Dipasuh#m>6zVm}sVT_x}e)u)5$ zN&Zke^o>Y|U_O&j40kQCrYgZn6E&J>>n&D^t{malKv-aFJM(=_1;IOVe;K>dc@35I z6*ZM!G3Q=yT`B6`m3rKjrLd~mlv9vISG+{uf__Fx}{=A?&1?m?r85o{ZpA$Eg#UOlv34XgckW z*epf+oA)_oAAisU4UarQ`MN%SN?P)nif)?EE*X;kyUF4zI9~wYJYZ^17k(qvb!Svn zZ70g8#d5oJRznlTwv~(KiFr73_3_Q2NQ4@#qjPm}7uEz#EZ0?XF5BTk|Z!eHuDLqP1##EHVt% zv6`4n9@(oGpkQX8XeV|57D*n@>SyjgF9fJ4MbE0MlzUlSm1(1nfGcu79 zj%qHmbeR@DG#v>zRLu5zavEw_<}3Um@;aekk+BZDfPG;_WhGEXIndf#9V30HU^P1( zeOoP{TkMJ&zO(dXjF+(biJ;(Rxu`IM3x&YtnYNgFEXpgz$ie4rlLhN!GBhLN5`8cN zdc%v&N$n#%-`}Y8@7AN`3%H~7fU%)RCK4VON@vrmF$k2o_E}R0UW`6ujI697Gas}| zyh$(r6cZP0z=^Z%c{qb`n-Pjb{jnq(9Fati>q4yM(1W*3P362U&4BRH=vC|eHU>K@ z=C&}v^WbgVSqG|h5X&mY1y{$S5W&Sd6DE2y+7L%`?wQ`asuDl@dEdY74{EL>jWnk{Ch-ov)HV zU?rrIgJ8%NkIOM629k+!Q|uo^waEI)_Ao}$hZ;h@yZG)$%Qwg|jr#kO6Hl*iBFM=Y zN+%mDHWbcd>sos|3N`v*)m&UxvK^LpOeB>eLAbgAsH!u49FtFs(j zR2DBMcjWmlTfS?fbUi0#$E*-42M@8^8L3-fQ%}x&m83zD--S?HEPkQpKv4QYait>2 zrR`gSXWZKLWFK?8{=uItofBGoOs=;r+;-hAeKa@hMSxFJ9x-)hDVXCTe1FC%9mdbc z%PgH!TMVK;$kY2{hK4Y8%a*4{?jVyd>FJNzg`POQss@#>1RDnuBE#tr)#7Ws?h0Rp zJ1B(fcs0RBR@#c?CHAYZ&@tygsrEwc#G85k1>wmNE6I}`>}n)egqijXQ65m5Sz#|b zi^wQEw+a8+jy9PWebixstJYo*c477MmtS6v;FzH*(Kg(3r=U{@|^z52euzSMUT z7Qk-LKu|Ky5ShG07YkMdM(CWG02pw4*cbi%fY4(_ZMFDK2 z{#tM_Bvcvemp=*$r816iPZ8Z6xZew#-a6#un=wld?PhHneE<|P9DSIeh3L&+$P1xH z^XgEvJM@f%?=kdK9$|w*3E#5P-X@0&kkK`?vQp$ zTxfFF=#JEFt;s?=E>X>NbSeA;xBeONptp5arMU3#$vMa}qW^zq#$r|#ehka&w*=p5?Ye`jFUAtB3Yl% zweCm=FQ`W{kq9p$5LA~5p&P+ji(sknxnNXgTvnMtzQVQ96ty417&(wcA@) z$2N~@h!2=ivRMr@_75cNIo0!E$?at<-sm8|P0w>mcr`P%| z9%4JH<_4JB3J;7zY@6Y0CD=Qum^%|r~XIn5UyPC6#t)nquA*$PohRz>Fbu8n4?C!0ewTFkV593 z)^wJV!*qo+&U$k~x)17r_lG_WDke=^^ralyAVl&O7s{GWn=!JY6RV)r5;w=z*H&13k*$l!NHs8kpUkM2-96N{J%dwRwRtA>u0hfIap zQG-O?Z+cRvs=newKRzw;dV`izwwSnebeu0tLuh2?%q2Kj*V-rX)IfZZ;F$}{tbcV4 zvq}bZ6Q(wV&Skh(!Ig@zx-cP1hu;19d>K~F#iI8vsHkozs}msE!dzsZ<66+tOc|$2SAvsc^Go$wKDTWa%r`%w0>bV|F$k8l-OB;@dn1gz=uNO!udpynxVnI4PRCaQX=j8Mltuu zXoeYBLp%xekjYDfUjVa9W%cZg^vPBBbo*tx;m>|q`T+azz^(yCf|Q4Btf_RlVI_m% zoq<6@QKS`MT*t@A&}MyjJ=qYhr6Xg~X(y_Eb2XcDE!f6W%}n`VPcRSLBfRPCEV9V% zp5tOA&~Xy+vy{$J;3ft*)a;!d>mz)e8apN$p2aw%c#a|N*t};?DK{G?Mm3{ zkp{+ZuWzUYwmOG(2qzJybICF)ea_O!Pdj~>(2$WG1*I&6(I53?Q0OvAuTmY`lO0RK zS);`SaKPvD>442DaAFDM?+$3-;V(i2MmVbAgKz^F&Fj8?$*!-8#% zfgav+mjvL*gX!ldRyZEyXo&6@={V0S*7pTlo~8yw7mtkT%c_E#M1gtRji`XW_bt>c zEp0LlM3j#?eioMwC%ykTr9G$qgnD~W3!VHM&F?Oy(r;F&P09&qxO?8oombk;I7>J; z4jT_&566B}lJIKeKWp|Qw^m!kJ_anDGqi^jB#-EL*4H$-J5t&Y>mapFZ%5kfiT97&?GM9Iv$3)a?>o4>8@AhkuZU2Z>{p_w{K!jG_>`yINY zGeVLtd<$;N_^WM-9PklSvUDjAGH5p^!yomX*;Q(rs++6>x+F`IwTUUxmE7;HT}=$F zj*aU`N4rZyTkG-!Z>r_mXQ|ReF@XPjN|eu`ow0Eynwi#mX6GH0_K>a?Ja^3p^i@x( zx=qmT+*{&h+g7x@{sU3_^s+uuWt)J$J6*a^AiVl)ipiADZxg5;`@&(3>%40V{fvT~ zim_DMPil3!3QlJ*%F6<6N~6KqQfrH}5QjP|2kDIYS^U;3_*tATGsUs&G;q1!y9b&* zPT;LA%%!2H2LyZHv5?l7;`&l)zSQdKjU4}Z1yZBH|ISP3&=<%F1gdvu@Z;zJOWiQI zNNROCCEnAZVo8)cX?NEb^khlv`5aL*muVjlkj@kM?~K!H{C1+ML9LfDfZwPs8!VLx z_)l%7CoFOOC~m0K>e4J6^{&ID*@EMrd+bTtRU##?UtmUBH)InQkzP*@ms%a^#e2Hv zENP?|#Gb#47_6Zqk*@|lwYuO4hu>$Elq>jiUn1p5aVgZD?bkd_!2l^Pfy^IcW7#^U zO%h&Qrd>K#TFhNF+r9pDz*Q6bDDno5Z@sG~8xSpiQb})uNc^S90q+ ztv*-Eq2*5?F!S!|$U*YeK~pl>vaPXXK4dzN?B_}GG-tY$MH{C}YpBd@iJ?*VA`9{O z^Q8N@eEZ5tQ{Im0NOM2OTq3nqTNJ6yCVQzgL5saW8Y{^0LmZX98`GKQUMRJ`;1_cx z=I~t?Nuve)pFcs#RcUr>$<3XiIp`N=N-G8ENtz$w4$u4PTR0AapXxABu$LH2p*W|DeBh>w3!QzTRY}pRbq3 z8OHRhRnpbG=1%NPZEdPEm$s~xdFB*urT|=42p0YEUaUNWfT^rVjn$6+Lz>2=WbD&h*B)7)M@t^S zwq_8dcKsIVCIRiW4V3OwOgk)|63N8aty zbDV~6A0(HCgWaI{b{FJc`;FrF=dC+(=%bhLiu(rzz?kC547Q zh4YO8-q^htO5@0XNvQ(EZ-1gG?@M;N`e|u~QE;^38EG$Hz2B!d!Fg^r62>6^qsuV7 ze>^Ac=kR_Q26*$k0N$>naSGk~EQ~Dso|lRYL*D&@^csi!?YzZ|7C zuRwwU`UM8SX_)@=xat`DTaTs;owl*mYcK2{mtCPGFao1`-mB=*AiB0ku?yGFu0=ct z4+N&;D`6vj+=s}Qzze$RHK}KN_*>ND&H*M{q*k;q#tjCo_}a9BPtfl}n=-`&4R{rM zpFvb;=4;YHJ}t-3CFhdpt~Bd)h#!N{G}jwa3ZDm4)O)nzSX^(q=S{42gWzcUzonNL za;A0`+IlT=w&uKv1M>rK850(4Wz&wgrF|S^Ofs!`F1j0SZIUJ!MNr$mANeFXIP;jy65tEZk4B$k3ULYcEET!KrK1}PSbl?!`qAhqIguLNHs31mJ z=o};h9~%d${rRwzC2WpEq-@(Mb%``c8u~rx`p=zGf*Lx&Ka8vcLVNWSPA6-ywp1jd(CSZ- zzu_I5V#$m2IzUzb^*d|AGQM-l!TE%0a-ut~9~vW3)*yK!CseQJo3i;vo)`%p{ct-n zQ(;e+n-Tht;=sm}k?P5SLQq;73HcCS{88t{lYi2TeoK01iexNeVY=%4lf_IzC#0*NmMALf&0vNGvElWDAn%aWk%R>4;;`)=542gRA z)$}Pzwuzj3O^K0~P&109&q!aoG{axp+h3}HmAm4U^i~R|Xm~$}SDDC;nFWE&Lm(Qe zs$d%n6*8Hq62-sBT)GrYEYqLAHZAAdZU5^i^;IPMTXO^kMFZQ{if>_=xb~>jMJO0~ z-P!rrPA?vlCL0AuuY4{2&XLQ1g`&QN8Q|M*45@q?kgF1S6<$JVcOqEJ`n@#92wu!Q zLAyH0G3$=XXKAQCI#a+MdWf9Sat~Vdqah5rp&|%(-A{fygXygGbmV8Lp|z-v(7OH# zD128LmC}^Pc9rhy(t+^uALA0%T_hVi!G;oJg!a_$(ojK+G3#i}k8wTM^_8c!3h_sd z%6}IS&wibT{ES@pTC{BFAP-GFU#n>+i)1;bDUVQ8EHW(pYC<|rJf5OVvN)toJxs0`q~JvlMo*D2H<^(ymTRTwNG-L}2<0u2?meKDCPsXH=&e?0 z&q6tUL9(@P37Z#3^(&`nfqDvv>4Xy$G-YIgnBPzhE4{8povJYEjk-n<2~1deX0A-p zrk@pi$v-6Mh{jJw8zYu{))1krn6T0)u2c;{qA--ji+M&-_mq!BvR?T_+(HS ziqtNIq*Y8A>M$l!t7b$zZ5ndDq4XV!laQ`DN|Hwz*@EkMrOLqp@`I-|Jp;g%=JS4OcU z0j8R~V3Gj;*~nj8lqCu1L}iaj=0Gvo-A_wBjdTk&qA(V&q_byp3&+tU)w1qg+1BXq zNav>rb$5e#EB%d6R0VeMe^Yl?#PreI+mzI^{cu|tJPcHuJxL8-&aG=3*kxB&bAZ6e zDv(MCd)eezUJjYsn7-M~=^Lz;;C~Zbq5prO-TxO9+U48AEpI}5XQyMGO%i&++_39_ z5?^Lg1Y zSe&XN%?q>9{ZT@4ThNHsa+acVbls&zGhI6 zl!rd6$fvY>L`-78lTD=mi$D`PT7in$UnRqrla*b6*KYHO+ zvj0dnQ>4rQ4s>uE(i^bS*<9@3bqPByrvz7+zMf$hJX3s=<7WIK=W_z!{)ZDSrZy!f1W}>aC%l3Hr@PTmQWlpL_IN37W#%zO zIv7AJ0PtK1uF6uxBOwB{_p+H;7iaa#%FbGvH8iVlR==!_tjw$#S+la1WGzFN-l{@w z8ScGIXK4}4&OT@HQeogkjg|~%aibg7%Sk=Nsh77!Pcy-b{O@G~G=ofQp0RY8aN<#& z;LXy&QGvnB@+->hZ`{&s>SyiN$cZIL(|cKZ#*B;6_X%L(vSC)glfKSe;tVS{Z|`q+ zE?c(jBtXx1Siv&>tRK?_EvLT55Xc# zzy#KRsk_pJOl`Wzrl|YWjvX!WL-a zQ@`fNcOjbpXLC}g6X3M|KDARq3vB54GYF1Z^(l%19eBiIrVqCv)`tlL79n7I*z+jO zzZ@ZdF&$(>xBJ7#%P<^ukk^aTz&ne@MenZFattj=k_}zVGMLObIrela+4J4-fP~B7 zs2`>7^lc~E$bCNr`)rpicaM6Ds~1#|EN88+Rbt4KEMKXYUNIda+Smp5ydOJ3V}?aD zj&^mC`xrTk1iRhPRZfknqXWOgduBnpoKCw|$f{;eky9l4avSdEZJ(M4(BjKwg>s^- zJmZ|{*H`FR?*JZ5dXu$}+_!aj9O;AM-z_d!YSZO@3=f4CuY^+xpVS>4f!hNsQ9pgr zljOJymFC$$P=4Hye^ zySd|IG~bFcq(_S6a)U6tQCT^zZC)BIU#N90k#hyIDf4LRFG^Rc8X#A;9x!$N4`L%8 z7>M=8=dJr~6mH8USYsWcw}^&TAKsf+R~Bf#rhYJTiBB5z7THvRc&{ z9|esbEg!HmnU&=bwEKgIA`Xd^CgSDeYM}!r~l!7n$6+`wXh&o#Sh$ID(J9dxC6P=lzH*pCW z@=5#zwoiq%Zo8rM)=|@k@?bDmg+7Yo%PmQxTRv}LZ)Iv1*V1&b>_R!jj1AY7Vc(#H z3)5lP=5Nl=Y3j+{RzgO6^m90hayiQm!$Bgo-LU)U`02xbD0s-#U(&WCz$E2)Rc_Ru zMI1Bo57=}1PVxJ@>N$%832yX{dEVlMUY0bcfn9gm=T%f8GZ)KMfa41?BG~I(@PUQT zEYkP%&9MjacFgO5b|X2%)3*tm7)kz0{vqT zYI;szXG~v#WqGl-c(R-?O%06_p&g+HO9ir zdh2v!$YM+8yWD)O!?}SCZpsp|!5y6gQt-~QpMvVSdb)g;5xE=e;`Z}!waj^J+61=C z^{4(9K_)?G?b`YQP?rm3?wf5s$F=?<`RZ1oN^l@fr^Pem-5lL>FQefz<;z1k zo+w6t-f=o~vAnJ|;A*wuWpcUzcfr4Dt4l7R8$8%7tw+EO%UyC$+UGIO5*ier@5IuZ z(YYyCIQExWZJk*s?$#l`!wW5hlXd3vG-)b|;D9fFnFiTx-RP=H ztZ44WJJDuS$##ixis){ z#B$mou@5=-$lYVPdmfeTYK4<>fK)b<@bzPHOsHi$2ad_`qqg-BPerHtUVMM(Q!2gK zlGH8qNrw30%o6^vrMcwXp!SaC=+o4lQpflf4GyiejHD^k*&4&qO$mXf=a@C$kjA*8 zEA3ouHJSWmKiTcm{dhs22(I;iyrut9jwQ{FZub`GUR z@NTgQoQd22DWPvqO$g4?x@+UfX|Z-ZTgQ=T!E7{t04<6`$EGid?Lm`!==(6rFu&R} zLm76xZ(cXL#r3|w&V9)BzIa0O?=g1RVqSt~Kh&@b{(S#KogjbrKM0|~LKu{JYDl~P z9kJ6_037kN*U^0Z_vMHNne;D{JjjpD ziHC@MeHBQKR$5(qsuSVH_Vn7NvY`OnO_$*?`1v9^LnvnV-prOp7y9zgIK>TIV$6)l zVUAoX|4qQ${4pI}X6%3oNOuSzTSqWsehPKC0)}m7Eugi_jTzB7b`2}!rNTtE{c2{N z=YS1GM00R`R?1F+=VLR-^#XK@xmT-JX4FfdcPUHF8%ZtgQ4_ z&90xrmY4t5pWP)xW6Bi9EoS9HTH`>ouxm-X?x)$}>n!e<5`GiSwX*bdaiJ*S#%3Z* zb1pSqBX8ic`rmVr+=oZMyRJqR&!AORu=~|&C#rr(N;0CBMj&h6!$CV(aC(Dsd4E)q zPS!w6+I5XOxFa6px>Ybk!@P3j>K`)L?x4vR!G!k9RY;-p(lu(osAY7l67}ycxJXqK zPdF_xAd9?iuXQ}d^tE+Zx7;SvQypwwBeE2;oN_w-=bxYx&pH6+52X{oTU*=4bn5YN zP$4@3oy0ZVQ`e{i|ChAks?7(lGUI$7CVpDjkiADv0!(SHoDrMf#M5xYew=I69VQt}-syHQd;&61&Ec=b1FO(}6W|EWLbV;0ki{ zYB(4hxF8HH_Zf808dz?wTZwz#$MbQ;dvq}nM<*Sl`qOu7?;PBEcQ)Z<4#Bzy3GLGkAZ!**5dd8$0y^3C+zCki`vday=rY#_2~O z|FegTITLg1$gEV{n9e~QiZu)>9hz>%PS#+N_{+wym+pF9W#7{5MNm{W?bIb@vo;wO zRW%JL>c?t=WbwTCJVOS4yJ{-3M^slf%&W>qBIBw$mIs@^Q!>(d9xHDx+=rOCBPU?3 z;UuVU=5y@tAp|&cC>}|}{)RdK?2weuY_JLO>S!)0e%(Rym*Z-X89^i%8U%Ezxk3rC zgP_2mctNf+Px-;kh^JHjQT}Cy4N;*cl)1p^wH_(guiASav%g^vXpjU3Qu?FcCj1_9ugc9C_zubVmCV5P= zHzy<1$rm-8wwYwKn1_(MPM&LI<7NAdwr`z$Z#!mtwq^ z7NDE&QvCbyPa<0C1sT$Ql(>_GrRyWQrQRGXXclIuH^;DtXP#_+v$Yr-H`)8m*5XMB z$riGGD0!kNgVl1>!A&TPqS$NrZ+=R|j}X%05tnzIHM>0%YQOiRqucMp=KYMbQaDYR zDL?$l-tj1c$yTWU>PKK3fq6g^o^fNKAW7(@2h^IN&rh@cVMYj%W-+DbEP8m0(!Osf zl#}b26i|jN_D4hS0z&D^&Xj*FU9&c2;xVvsBx<`k{> zivhHM$zf>sqy;a*oz=hz9o&$jfgV@!e7aKX28y}`+3SX-+TfP`29`%^FPOM_{NBDh zaU$n0kk-~vMhC)fPiFsWyrAXz0Ap022V8qalI#9sxc6 zIokCJEKoB($0&j}%;i#SEWPy!%;d(X)s0^MPO+G0d#k*)6>hSB0prChacbC;F4{An z;ueIR45Z|5k+$L3*D&?&_yR^>U}MMumap2=>3P8y^0{IzyWN3G3ARp@($^M8-yJoU z>4WzRMKU^cNxl9`jw!Gq*}ehc*L{P>Mk#$d{ciqN&f?2U z%Dj}Kh9HWj|Bo>J_WK2$^R%LT!tt!YFdCEdLMHr$ALU$H9r8qzev&^GESJBS(mG<~ z8-5iS7d6$GPdur$ZDz9nB_5`Wq@Dp_C2f5QahZ4I^Q4B@quq71W>UBF%i@qjV zk^&DNIjYPRLmX~n`8bU_GM%`Gbw`y>+NyTS=xDxbM$cyPs(H3#+L2?k&~LGdplFO=-5I@g!N>tSbKyU0yiZzoZ|A zadMXpwp(-_M?6LP#yG{0_wQ+=@mHJDNk}x;LAJu7`gBm{w9RTh;-uD!|JX_SMJ$E+7how2e<>z~I(1bH1*>sN z-@iXZhR;n^9Q2+mWY@xz6fGx38OtxDrAxO6*01S{!2N@%nDCUYnDAk!mPzsZ<#^f} z&2Ap_w-dS=UkP*?s1Z<$)%K(+eZ{W2q*M?ki4xKj!y9S~0buKa{o~8DmZCw!n>k`F zteDG4lSSRqLJ6`y4prdx^->g?m}Z<5r;iW;p%iUbFXd-})fHoD&9Yct0V0W{bj4_N zR5x2;GjUngPsyMm{jfwPxh=s>ACI%O!VJZ)ZLRt%P3fx)78MSr_HD(SoL>JL`tQyi zSEZZ3WEs0(ib3TW*|@hkpqk#`z_`o)8dP>PJibSeoYie|D*3b}2aIq> zJhJYr9*7O=a84`c|MZX`Akj;EDo<(P^*W?`{sh-u*E!grt}TMY>DvQPvI?xw9MR#Jty+M3qnVEQg@`vzl+1TKc$ zfw;^%b-%w3RE~?;c=%PeHyHQ450lJWhAZJp9vvC3^wcH|RZ2x~Pn^eggkBUs4Pvl# z7)$Xm1Vl&SuAU*!`V2SD3UqRWG$2$Y^xmg8l4}&!XvtV$fYN91IA&*@OGhbrhG#rf zB(ERWY_rg&j8+~La(M4UNUg?CH&x@nc|f7;%=AgCiakHWg-1{R_Hk zyz-qC{CVx!%Ixq4zn`tFrt>d{kLSjZVCvx|7#^6Q%w&cNX@8?Qf=wQxNaUEP7>%;+ z7S0VvCpKeG%`r)-6+8E#516W!P5+*v7(aN0@m`DG2)*^xew(U@I9KVz+o~A=;pGl}51wkA6+Nr{jl#v*qb^_0D<9 zS!O%?TS(*htH*)lSRi}N(p`KGOq7N z>f;0*_j4-~t?c+EkA55K)mJ@mP8#?ToCfE;Wh_-{K=G{Bu6)~{p-!HVE@H;)`{9xZ zz;PjmDm*hRvNVV+;i4%|dXc8SBhNN6Rd5_xuGPOQJ2;cc=O(f03tb6_ndznX3`NOn zfO)e3cm5DMe$beEEaO?Sekf1ZI=&At7RHzI%(Iw3YYLt7fg!|LR^Q$lU@jHlN)?)F zg}>k5Kave4AI5C=)+T=}7YpW{J)IfZJJJ_Rurb_SqZrEV0hlTD>q2FMcE^1G%9m@A zyta-l$2!By(GTbjI+hkMGF-}(eDgd4ajZ~^jx0Be5rafa8~;5 zbCgbi8x?Y)ErQDM!y?0)fxw-1EQV~ncAV0I`BLS?$V+{vBwiUqQ_Z^sv&&S(r^zX}zBcLJW!wq7L*S^A>clt8uM)x+HVpb^21+q8J zBgdUkV_%+NOJp8EMqzd%W;&#I?}Ve(@4SKz zE(7o6tOG;ryHPP3s_Vyi*IH$$!1$>fXw6OF1pqcWZz&q6a1}q)$a~(yp$0cyiHsYt zOWY1tzia_EjpesM`Fr^m!~Dy`6K88%ZpA|7yWPK2ab$^l7P&NPu7nDWo_t334z}BA z@O^k#FvSN?FkbFU$#(-LEYV41yAy}Wi|%X%;*9w;aCJMeTt4s5csZ5+@;U4d@pr>U zYfwAUmy1gq{5R!CF`q|v(fo65*a7cRjKgEt6nP zjnb{iOfYRL9d^HJgD@b)Q4aYHwaS$%yzs6rZVPTdUc0V zZ4?qsSYx%&#wVdiWY7;!DoagS_Jwo2we;dPoOW*8smuyISo43%NIG}{%KR)_uGrS^ zR%~=ho>kDPCV@Mf@`rElGA^fdYzELfGG^1pM=Sj2iT2Xs*zhB2$Vdfq%&l?SYg{NA(cvdFl}QMRgf4t^G$yjIZ^=F&Oo119fcZ&;t0q{q<=q=-D?~;@O!v&?KAW zLuOb7lEKv1XQPNJ_}M~_U81JY%FVLffDb)DT;-2h~eour`( zo#AJ#4z`Z@VFvmLpuxg67_{|spt!EzuB21VOtYEBK7dR7G1n>abpM}mW0N`#SU3_@ zllE&r>(*%c=_QovVilP?v2WQwf^dwVc)mVL`$p+tMt_{c-en_Ux%ud$Y-=4Ye_8p2 zFS?DRsOlBN<}JS7RGRgwGC-TRR}l%Wl)HZv8S(Derx?D^XA4=?0JtKm2NMqW{`xpS ze1_yL@_0QB2&F>Yy_Z$=>@Ei%7*1Qn)ZdQ(^dEEU=2zx~z+7=LYD;gtNs=1Fo(Izz z-4|>e8d7C?gsl}06B#vioHGJ^kj2A)DtM*k@@ z#MAP_<`}wuvuqtvI=i;Ip{BHa5npoWyK1YDBxe9mj8hhPRmM7jEeTtRz1k<O*X7BU!R(BC=T##XE4#+!p6i9}ptSiY%L0$f>?qOWskXuQFj*JLQIt6fTIrPArNJAejrar>#23SZmIGs6el*jq(i>e!h)Dr2G%9?|L z?5e3o-~emCpmSXvXDH5~c27mE*ImyVR@-&RK|V6d zNOb9TMOFQjXvR4v@i<7kM!zvNgp;v3g)%nNX->wLT%0n4Y=AcSKJcd>i4eISvUjm> zs#623IygAxXx<~;ncjo7CFkpMni9JHe&42a=@^P&P!7(>0#6dUT{p}K&x{)+C`cv5YTAy22*N4kQ(s++#^-q<|J`C77{Ix6s=eT7 z!L`t|jR&lRs2$$ZSqe0NrQEwP1mY<_8XVYgGAZg4c{uIym{scjri80jNiQyMXyfBiNj>%D z59OXkyN60`=<=C%ArVrtIf?C1SXws16Qnf9RbF5kkeh$_Yd8VNKQHkVkIMdhf06Yt z-bHvq-~Tzew}%9!MWpxsD02wGBey;cinl}M14=7s*OeW1;?46LAkBP>C}%MIh#<+k z=t6vNw3-nYkl&fjgupwmfNhZ|JB)2teE0{lZS&>t`T}JsPe8cYA%qJCY=tyF4Z5*{ z5nM?6OIqR_ii(-os2GWO*~$!=e!I(Tp%-p8b)YY9H%Te>VB+`yA**XEW>-LwmTB8x z5dZf{v}&VA21Lhah?*V2AaC|T=8S5e50X5?kvWSUe9@uUJ@dfgemDWZ{0IhrXQfy6NbPy5go*!F zvJKmH0DPL(`z>V-k8eTqU;qz=yQl%KBVM^5t?^qlq}q_ zzLFkGKxzjLYuG1>8ucwr9VK;S58fiR8dja#u2v))k8y?#XnrMf*)ChA)qJVgqNpqe zZr40Y0fUT<<&7w($TE&8G-|(5O?f=zly3eMr{?2dDIS9q_hXuIRB=R!>~LD;QIO*# z2=4h>xitzEm=Arcdq;2Jh3`zRQ@TF95 z+VZP%4t4!m=@#`HmHe!f2h5rMbPpzr^z^ba)RhS0yvLA~AS zP>fo`sZsF-ogb?jB}9sDiH@NmCRNf>P3l%I`P3ytSS`R*`qrWv^#*MYowi8o*r*xW zkCHknismF^!pACVP4D2XOT;3H+%A+!k16Wr7*}P3m$s-d*B(qZ+vs{#?V&&0lzwB& zoKKM;GDn4(d{tj{F!Iev)gYuk{^|`#y$!cB&s@YVHM={JWvi8rj*|`LF=BUpopVBL zoy~8X5^3D0;G-MPwMg;I7TV%{Cq1IFiKXHWyQ)g0-v>xa$1PwmVft*|AjuYbmo<3C zEP8dD(uXg|W}~bch-1k+L*ah5>t4lV5|>}xDiT$~?>w8eXE#cmuxpZ=A~s-zjr{5V zn4tC`K{IuuNpr$+%F6Bbx3ltnC2a6X@y&>uNkcEf{YKe^pkDUvvm9OfxUi$4_CGCSyiJ-PB)sEpw88Pje{uS za_O%xvVA?D!Q}4E(+%%Q08IQ&U)?+=bnlac+cc$vmP$GRh5+`$fT4`DB+>MtsF{&|Q^BNzU`mmy{bRLcrnNknLvLC4OL zGHlI0rxoWS(e}YNP@rZqq)7k7~p+P8dr2KnTY2sGFcG>5drr83Ad z`=bWwlKiBfM5K;+^yF!y#*LXoZ+)TM8l;kT2vlMjR8CAKmUZcmrP7c{R0JkC?Zi9%iN}x1-Yw?R(x$*!B@^>J=vKmk#dsMc#2C>4Hbak{+0(ispnDW zj_Riz?hAjXp>u4#s9z`JAT@w|MjX>#aW?g%Z99<^<#@8%oir9UnHxBd^iFq zPuD)}qCPKlz_*6e>N&P-0X-0|hj{J+WO$G7uI3sMs=~ z{wT=4=T&-jqI$Vea2k+(LEzcciT2%sps<^#sSQTKiLw9d9Cf^4-;X|k%!qQ~@YMf& zb$;uho_m2hLO?zCAk5_)>K8LWQ_Ps3752|iN4Bn$H)g6oadO1{X~cS$YNv0?AR7#F zf_8@sA2Yo-E+&&1rd?Ra2cM3|<;#2E-kr~bd(AHJIDaZq7pO90cs}@8HS}CBCgq+UqFJ8c0jKQz# z*Q$$K2Xx9!Y77sxjNA88Q?^(H%U_94qHETxuGWFxO{#Dbk9%`C6J9w)w}2!QzlTfR z+qbA^8-=cc8Y8)Ujca<4x?G|5q|a|x&ou%rYNJ}O9r+8kD9(Nd9${RbNK@`GwnPE$ zSs_v0{{bgy%uot_z6opJsEFEfr+TYE?Qoy<#qD}h?Op2mMz+(aXVf$V(^)NA_TB1o z0rIP9bm(soqHp{S#51r(17;>2e^?!)z3_K+o`CsV7n-`qBrhT(|9fxU)p1gLdvlFd8AKtdsf5*%8?gOm_{_Yl41QXg~z7oKz z0Q~W7Dk`mRYc25WAA}acc+_StpeZx0ooM+x@n$Mxs1JEqooSRV8s={+XIY!1AwnYR zIkh9%-i}Y8_qMCE3_?xQZr0SkT&ma-<~BJ6)Ps+ye>Mt`cK%acE8ni4d+ESqSX#<^ zYRA+pdxghaRbSz&@YeeMGIQ!0n$2_IIr}n0Y9#_W?(I4ZoKRtt8`DX+_WzVwH znHfLi8PDsD?DniF?R!t{Yh{0?XQtzp2u?=S{eW6XIZvp!@|j8PMhQ!z?R4Y`!|Tbb zeYisv0Wda4zF11jcY=fdvm07e_Vp$+Ex8x^8lE`~($cF<+ofJ0cqxA%TUlu|bhlip zeet4##*2p6tylZ?C3SohOV?x@J8H+;-R~#SzW5jmUGj=L%^;p>EF8u{H@vPEYZvZC zsRK@mN%;cfVLMfc4(!9l+~GICio5pV7RcD15z-Ic_o{k~cQbh}V|Gq)6k2!<^lA-o zxEQFJLaI%j)s)W3!$tjpHw;f>DB6eKRF819r+v$))0w{dw_0f!<6mc5C2iMRs>qIH zyKpz9HGmY4H^JaUO)#JvB!xD4zuKAWNjCRR+VnxZgYHPS#?gK6K+QD@^Wt~ay9CUt z9478MQul*~XDgFzpFw@-c1RUPTWt%*3z@g;eJtyYgE;GNeBYS$hbt!>`i&o`ae|jG zb%!kLe}06mlXr38Ls;O9(ZfH0*FREiqKn0IghZ7NL+fi5%nqNZRsnPAN?mA}$@($S zp7g0<$&smnDBH!_xa`5Eo@{NbJDwoZ7oQv7@9DrXb%OTw7ts0mvbYcX%HjBIN<9Wq z0W%gdKr->M{44xC@{J++&m?IY?}zprw8+|DkNA~#+vfM_=u!1XgVavbfcqU$u}qR~ zrJdiX4u&-fu|y>#(&yhm3>uq7j_X8i*SC<9oF)&xOH;nb8Hhv2X4MwZr~II%%X|}f zrGRe&mik&$z;xBs)3GE}sk!VG)n@iTqNqvM48wzATSGfQq80s+BH-vNCQELhEBzAZ zp1_mfT}4x{q#gUXFEH*^wUj}HI*Lhi`e=H9<-S0*Eiq^x10%!5BkE%%Qnf1P|p9}FvxkUim;)!7V15MSo|LDUQZ9^qy^uzvhU1e^a>QV_r2oyk{aZ# z;Phaz?DP&CKGj((UOH9)>+@Jkd<+v&yHu4SNh$4rBb%+0G)r&NRPpdHnGaUE@@OEMvdk zl*Eo$Hm>`hsTDmoz!y5tJQU)Z9e5dJnx-0^XTsYtrs>(`#1l`;vgB1%rLA zlokRkC~n(Wb_FTB^K&VwgI{oljI5M)U!u#ZF7z*lyopcGXUErW+uoUuyr`OjFkD`9 z5*;^L4!VD1;-WCX>t<2l=ODL&CU*Ck;}c{_JJ`u8ESm8htjLFKHLkLjcCn7) zcMb7r$LZL&@qGx{2Z9_1l?aMBJ(+8j$hI4<^;_;zjq62V4hu<6>uB2lq|#Npyr*@O z%9uO8^mmw~!G5f-F%GL?Yay{7H1u#cKUl_lk#LLI0uFwU8=v>`tj28tm8;=vH~qW# zj@qO7)~m!ESMGrIDCk;XrlY%6+uDu4C(_nYt(f716ZYc&pne zb7}zjf}qH%A`b0_M{(sgW(s7Bc2`-s|iOmq~x7qHRQ*@ zHE0fa!c=RTp!BT;Vl@SxMK9U0f!h-~JCu_$(j}8e*5nDW{#ZpjxbD$ZeHs{f-CmCEM}0KG#s$T}57PWPYn5R% zt1q<<(H7TR+Y4~-T*pkh>GW8G)vz^}7);u-!1@-`=i?9b#Bq1U3%I_0V4>CMy-k`1 zpdAH{2cM+s*aRm%vB+xlrXx+eY_WB<*s?xXkf3Aq!W5kRbOuGL@$gqv8t%lt8*w(B8ut-9hP@)R$3X8l018iKo zV#w0HYpvffF_JJ~s}PG%s0kfu?@d;hQ6gy9ud|Nevz{>gU7?yB{I;D+gRBV>`HG8fQuru_rH#yQUH z+-yfqWktF7Qm>o+Kc{9<{haEmyzCO1I?N1@*xR6Xe6Ka$W{oqc@I|ey_B6Oz_8V>8 zChMdq1GHGXdr}$=`>XZ7n5eX-v+3CKc3mAUoLmRwUU5l5p{K;*EGa5<<`?QXu+&9OS$xcSEylbB=j=K!i*OQ^h3{g+ySoa>km}Yn zjpSn;KCfL$pB5ixw2`Mi@ZE!ygYrQrqblBH6eWQ?L6IYsL>i!3w?yrng+`Z-NK znm5&{d+la@WCp3b!j#Z+QbA#Uxz|@zR9p-y=6M~(h2DHeK~Z^bL0+NDiIi;G;<76G!qLEJ4@TqWl zE@`N%p9ec{IH8Lo5<2bFAM2#QGOM+u=ZszK_LdYDH z@D;m?T_w)E5?4_{o~tOg$nA0!d7TcIJJ;oQMO#ITAp9z@M1qLcX&O;-l9BTZegA`ztC0W zEbzL^9VO0^5*-QSgdeXHKC1;Sb;36%M$;Hh{gz+oa>rMROkw(chOV!qN22+I5gO~1 zUiO7PNQ0DK^8&P&au0acQNprD^e~;!Jz5evoB~aQIeA;Q3nQ;i)NYZ8dJhB1o9Lum z`i?#fgQVnAy4Y1v;&n240TJyeDR&kWI`W|7fhTi8yW%2{*Hd2X@)kS2AS`r0x2rhU zS&rY1yu#cf9SP&KEYxY)IWjGqCUOeqws@;kFtE-8vOG))>>r7ukDl-oox<1ss1MF4 zg?|CFy4{XEUkNynZF%{w!h+nwT6%7zf@ij9trI-tjn28fBGGwE^Oib!8#}a?yqkvD zaFQu3@D>;Qa7gjF+^$?-ZhmfYNq)Z5;lRH|Zg+8RZmy@Gyu8>4b=;j>>?m>+<(7Mj z%F7*$#dREv^Y37tys06B6|s%kAy1lya;o+Uc_bR?R7I*;xO?aXO^rm*e}pvBX}Ns9 zJ`SU-%2YOIL4n8PE%fC&J^5~*11sO@EH5r8hRW>px_pJjo)R1kbsWwR z8O6w(hH!T5d17|-F2FfYr(*X=+<0%WjZVZR_vr&LNJPFf`O2|i^Gcjp&IRnWobSxd z^Fp2S<`ub%-JU$CQN?+%Q{>^12LiRo=PAthxP18qE-122w~mByDi-O?nB0O&*?i

B=~LGzLk^Wo1dZ+kySQDA%2r z>vVg4-rSO+JS<}@Ug$TW&7; zRuo2vrYW4lEv11@VP?+gU4-bS zOgpyOy7!Dw40AkcXt6urmFtF7z$wcMO`xa%)^?D^QwVLMs2E1E!XjTTtZDg$CB+2= z1tlJrx4=>4apdMX%L~gn#b{uO%}VMIrVKj1)%xTaAOZo`k;8IvE8xt_cNMvCK6Jvo zU0m*Sy2>36cV2l(z7JEJSL`V8;D0Whx1pN5oJ9q$@{(K+jzMl;5kvO7Glrd)DXt!e z&+YQ&d5Vf1u98BJ)8hiAaCr54y+!$j4zC*q$-vDKf zIZFEl;YyEv8rS>Gk;e&MD#>-^dGfF-3fxYZamq{Fx$Yv&TzR3-QQ~vu`*7#tDs(}$ z_7q|Fg+7hFqok-P&&|nGLgkvNn^YnpP=K>~2Rpxzra+zDYt2>!VGP&O% zgpf>Kx~jW^W;!4$K_no%f`~(PbyX5GnVDoJU=%dyrwfm(k_0%b3ky*$a*G541wj(x zx*#Gh;i66?68v=eR^$>vmW$%|J5_V*N$~sZRQo)J>D#GuKkxa!|M&ko{UgzOkbvla zdU))lMtQ8_B6NHEvSD*t`X^S8>vVhVJ)y#W`??KXWUJZxK(e)E_j`RVX1|h}TD4|p ztvvoBEM_2G%`rOC(LgvE1`^%5MCA)I{{3R|)5()Rd|<3j5Pjot$fDL7p@>%Sr7pAG1Ky+~z^2 zIGZ_h@-#G`<-9S~QqjO&fbWbA%21)Jlhrdq-a z0c8*DEY*8@qvUgw`zk?GECFY`96*Y0I$67x(tHl zWF3rJRRgx+;^7&ZA-DIUnm0@}uhX8AVemR@mZJK%JVzR_$KDv*Ji2F9|5R#-76h?H zt3_r{T4z>Gt5vEut60+1+BX68yqt!U%3{|l;+n!d^0PX&8U~u>YDF8zt!KN2$1s%q zqQP`|&*BU-M60Syd< z5$NMq1`5Xam8FTDV(eq-1y!17 zr?h3&B7lrfhl9Cta9DU~9gZE=0By;FD0-@^<#l$0ob6-ym4Lx;IeJV#-wkbQI|0-1 z;jz=jPrugCP%}{Z+22GZ>YfAeLwAbs?=?+I^-KhnwQc9J9t#@xCcQ0bL{`xRP6qkF zE0@D9>fwwo=1mY!%-NF8c8ohT&&+e9n?^*htbd zr&Am{H9cKia0l_Z$(mGsYJYD7Z=qjepuyz76FoFV?RK=U4$+;7F+|AKLS@lT0bSh^?qt15JWxb&^$X>DBfvZn3eZLx|vdq9z= z=Rv+y$CGvdb%x6XJI~CPY+H4Uxt#ot4c(w`FR_vn^|6 z*_|xhZ90ad&lTU!a&U7O^RpcEhVEdcaJJ)d2dKa?htJb7v-mw^SCSs|eq@+G@uTGV z6YdQ)&Si2+ndOj>Jt+|X6F9&8At(6Nx75xFe*UARUA@_XNoZz0x)z_H)D8irpnU-CgbOk59s-e*h<$)NFy(d_u~Q>d!`a#w9eymAY8!O4##zh1RL zu(J+4O$%Vn!ZQzGpYt)Oa)yB+f;r;(%wS+QNq3Xm4W?Aq#L<+~z+)`7ps2=+4yNnH z!5=4gR;iw+1&e<|G)t9AUmm1>n(V4p>8G{1ZpkvT8YY5efL>uJWIaqI?&mhX5P&04 zP5hv27OG~HEPToktL!37Pv6Awi@Lb2PH7b1{8{pk)#`)-I04r&41R1)_AH10;NQmQ zVC2bte1zNntTWltn;t5#Po4}SV&a%t5{Z*zSc zQwaD04}giyho1lk0JKkEwX&u(ooKX*{{>gLV(mQ6YLhE7_=qqq&zmWMs%sh}ZI^G$P2!qD-8k`u1Ig>FQDbRv1o!?ah zT)k{9@A!6}357ktU4}Kmab^QBfhU@pyfa(e{Oxewi+_HYQ)=n+$sbpv6XetiuKP{$ zD^=@+f@?Y+i=O{UwAuvb$O8|00NC;>hwswSEx2_>&_z0m%bb}9fy2Zq0XKlNj+_(^ zu4Gc2{k!Cq)#?wNP&UvR{9()-15gm>2nHMoh+*W4j*G)2=i^h+@UCcBA9e|Mk6UuE zSlMv(Y&dL*YsIVomHfh_d&Bw^Wn0n4Jh&EEip@+C9gp2>w^XjLF+YTkaQmq+ZfRzmm3&#v@RTuCD zf_C1tK);IIt3WFa8J2^44nj9Trp1}<%3VC`nE?By??!7h_geD4YE?0~?Db?_)dnkA z@J4b*)k+r!|0j8%L4mNa!G+0|7|9T$jiS}wM-$I5ay& zDS9!YT|a$2CEJz$lk{g-sa-k9U~Ue$7q&MXCb$UFB7#DZEt+tYVTyu`aV*jhYS!K&Da(f@{0FPo^~d!sENf){rdg?9yh?ph%5t-I^FXWcGK!vS!lJR<90w<40Ol}$ zNpOCNu5!NPJ%gMJdI-Sj5{qf!b&=retS!5T`r=6Laq;~5_04mR^vMs(`bfNo|GY|# zXTLQ73-K#~yJhpPT7unX;jM+FW%}G%rTYm60Dv>MR3JIRYf4bxJT_hyeKZlqZ~6XE z<3kVneR9ujnkk*>sW-dLRbuEar2hDh6Yk@ zRMO!NPhwp$fOgoEQvBHlh!Bw~^vOE|t$DMvPhx$kxQV$IR0u-T(&?W-*6v*rd#s?L#BC%IR4Zgrhb= z{@Hh2S(C)$HOeW82gLMIO4S@~g`Dd_d-jMLGoXcO9FGw5an{Q)J=Fz6;w}Qc$_7Z0 zmL5)H7q_ZeSSJ@}e1^A2QEb|>K?Rb?EP7i`nh0n{Z(LX=UdC~tze@8Prf7!DSwI~%G> z=zb9#-qu*Kd==7_$IZ;qi)J{GWrr&52b*WwwZ8Z}IUX~vn zVt1W#;qKYz7Pk=-!TQ zmUK{ZkK+S}ERhfqVmoEaeM9TAhrqbbmF*p?sk_r5Hh;CQ`GoTK`ev6c)o5VZd7Ut$ zWJn(zw{zILV#X_}8P({4(4EVri|8cCx}J|a5jud$VS!(!NQg2U5U!aL^Z>jQ#CzdA zE#dXWN27a^_k=YO&gaS341>_5)^dB);@#mAo;U2BVI38|+q-(L2lH-ici2(l)FO9i?~Bonyv7GxSVM8JQfU;ts-7_*w%RzLSzsW zG6~R+i@XIgN_aHNI3Tzt|6usZcf-LdGi~~-y-Te7PHj_D#EB~3cf>1-B58zXS`xmh z)Udo|a*pGwF-&>XLq+v5!#$iS5T$W$JJ1JcA{&kC5TXJ2frA)w6f_-JUs~v}U#xB& zHk=*uJSjOFcMVM@2`6mm=xrbPsNd!pcsXKOiZUiumD-K>4<`_@RY;By8iYkq!b*jp zP(*A5=M2ma+_X7jRA9lm_`E<6ig^A(6JWX-{mz(A)hLbQ7WZ_s=O7!jK3XeHxxv@N zZY}LY-)islR+8KFLT_Zl--Cr!r7pmd&E<)olEX__nhMk0!olKk5?j!HiO)gGO|pExSOPuace7=|$t1XBkTHW za!<8->7GYYjfsXK>fZmG)EEDP2@h=C?nDklu5!%0o`=8BrpZoG!ZT-^_~Y|<24M0L zArJPCrOg#LhZ-8toeLW;tIYbd53 zxl#7D*R`ObGpqx`_a7Ykq3d*Xly^~&I3((t7ark*VaCnSjO*=*jGNT(x5$edZf*~y z>eCUoa$HTSwOWfHc)BLFvnm@=xXsNOlRCM2tUwLxR)g*e!_OoJ%a@GfR0CEa&WERed3&>mb1Slr@#ctpTL|vXq()VueHlH!bwX-c#lPOV=9ogTpgA?6@)91&7J@%bOpUF) zgp1E81Uo0E>MAcG*i;BMOi8s=Uc&X?E(9N*mP%Gs!sg>rOSe98b6b#{k(yjd2>~*E)5Ks@358IZ_`&5}Gg zL~g~QdL=vR+4nVz#Iudl#3x=&{Z8CHPRWQTeq65v`k_>@Ce9ue(_T+)O)L>RYLxkk zvwpp^u^mV}0@P%~7&nls@D?rV{FJgLqZIqeSrVi?;VXEO^Z zQ4^#_KnPAI@hEWyA8)VVJ52VZy9!EO0pJ#omo^#2tLcXAkr{v^HPixvM{lR2poY?N_{>y z11H=-Mf%Ou_`xd9exQD8eSdxXW{2H3?4?}agJ0eJW@_5ti+zeRPdqe%D5e)5P9HB8 zrj@i%A4$)Svxf`dV0sCk50Y*~WB^Mee`(?4lYuMvirCW#HUI_Fb-=P5=olvPJA~tEv~gHHd~4v9Q{w-G zoJ|QHt5rT7-vG-=cvrph$@of?lkmz$<+fODso;^6(wGo6uchXWjm!wKd2c!^+Fwhh z2i`ciH$5}Xo-PnHL!68bhm|N;Pb2sh@`@peyO7WjT!0cm#GX{~$HfI;3!ebE30+ts z6Cfe>ZyzTr%J^|nog@0Ea5@^Mial2($BylPBmKwJwDPZ9u&!amJJ;7K^J)j2lhR=s z9Tfxb#C%lb3wXtmxnp|-F@o)4vTG9O#O{flm4`V^WW9wxjRt*G@(>BWC#D`u3Zf-^ zf_y1jG4|WZ##Fy~I8fE_$mo9|6Ju~14~ic|C&*wsSwUZmb4Y{Vrj=V`o$3W&il~;* zO(I~02>{dEgF%B{5An!S913L%bip(jwicHYPlpCYcqFm<#BE||=fi$VTrHeOnG`oo zP;wKG=-QhXZZ2Z)1ZA4IU?mBT`D;&{T~ojXhhCagH^o_mB?j+>9Z`Cyan$ONXw@77 z3dDZ;D9n09B4d^Ttr9+gn~zA;XuvOSR#qj<&;U&iPI~S<8^penqD`AK;>I)lE27Yp znigY|>^3xm2!_O;!tswMEY!ut@Wj2&)Rj7b2u0-$tR6>7MiFE!7qyI2#o@yIj#_m3 z@6vTG5Iy>5@$edx5JRln)EF)1Mi#SdD9TdDhm$%p;;U%kaHpAagtw*9dDz=V*omTc zqOv~5PRWbJB<0F*BkkXDa6*uNTWGJPmX^O0`<8;lldBWuj#bZwi4=-dC?{2ipT}nm z=^ULHR}x#LLCT4YfC>@ugzRwtl;aZmFqZzbo~9ME39mv41DYuDZY7Fh~4)l5%03eO(~ZgZNc=a+;2n;hNl^ZFJ;_ z-p&%^50MZf6b!@EP2@&F?4c|XI)Q+p%dvyvQrO~PMT-*irL%Ra5-ZkY2QN=k+G5>U z#XU2W{}A6PDNSP6A*3*l`9njq`1uEvg>|!6dYv*yy_offhAAR7UulkW%*1W;mB$j{ z;+qgX`KsfTrS*NY2A+E7p@tSA<*QJ<jp=( zO;?OqyZ3Efc`9KI>)!5}jg$K4(cFPfUNaN;GxmA(a+XdWKC(@78pnr^9vWU{4z)SK zim{U|`_kz=1|9cb0lJd?-`d-9DZHcsvz<9P#*zW&6<=|X*f%#VKj{mQ4=$qPn&X5-Qb*F@ge5){@3E&8w*5S$p{71_E6eF z*cD}I(kOr%z#1nW13g$QMOCH^z+|*J*~zR#xDD)M0#o>+Ncf5+7A;fGE$g)#mkr+p zUR@URCUDzH%A*ol>_0lUo~-1RUHuay%Ky0X zdRRCxDfbo|=ZX2R#C&#keMotZJx`mfkn{RLL#=ppe?v+f`wqC`uVyMs;%sGb?JVWv zvD!JoXXhw|cuOqIL!vUyR$qOr@{PnX(a>JDu76V(|Mp?!xHz9uFd;W1po;ZN6bAAp zQgzTFFxoT?5a^sFv|v2zdFji8!Va5QYGOi_!^wyIN`$urKm3R?HP+S#-g4z1;w|x{ zkH%f%%#SJC;;rLHRw#bFC0b`8X&Kv$0l93;<%s;`wxKO!#C$jPb?Yy zW8~qWJONK3C|V*{hOVN^i?9&7N60?ZE2cR2w#2blZBiPd2HP$&8bbU%WF5VJnep)##))EV3x-x+(AwnYc3iA_T1ERig{GlJ|g4lz! zpmj-@8%mcBDwBDFRe-e7SV5W5L-Z|U~ zQ+mWzPX5>C>`v6XLh1Vto(g?@%X;uJy*9YdeZ{~ec0<1`_rEHh|Omz)8l-8 z0T}_b6^LxcQx0s4cqs`)m>1IPfja{>hm7(@drU<#BuB6bDzUi`XGh*%-h||e8g(UJ zQrU;%y2~5KG(?S%8eKwN0gV3YSxWu5p*Nv%NCH8#oFBv5Ccn=|5;UK1gpUNCvSx9s zuk^;*{@|vS%Doj47cc!xVw#w-R+$|vZV4N!k+9{k0n`YH-rrlze^+vf!nK8#zB`O6409BQP!euKDFq( zNU1-%a)R?Va)~^;4!NQ&Q4nW;UU{eDV#3jV^kUBPii-$G_v>F!&N|8>&e^1#bCg9a z_>ywL(G?*sUdQO3^uLs*ipvSMe??he@voyL`>lUcjH4{#l*^Un3y*G4>+VtNW;8!} z><2%5?+NAU>N@{^3N*{FS#%#zW*71Zm=h(3Oc%lhX#XRSOz#pLCdNpm>G5g;S! z43-`kf)s(WP+ij{Ef|fMoY;3jF~rZ*RINxqty~{gFt{wf3I^6QN?jr>cIWmOi~Z5h zl~h#hj-SU@tWfr{3H-}1mB(d`zk1%Q@fBS_sK-XDiyNs*LM<#yG!D@-M0*qsGAYZ7 z$PE%sj19?*@?>FwcY@}X4ToDLAFC!uN*CwvSAH4x=B*3jtDCr{p{5YL^D8ACb?F@+ zj-~8?8QL9|_|;DoVkt42^JIS@%{=11h;(>T(wPunn6!l4OF%3Ov6~LVR+m!#MUsF5 zN5gVJ+XZM1%|0)h^DkwX^9P?(z7clk_x})I1%uZQD)z}?vETc4jK$tPFMZE3i3+xh zeW$0bVE^*;afwQQEzbBtO+oDZX!`jIN(gwqQ~9G$`3aBy?HTFcSMX>NHob6WdSS)S z4-TA_=KQFz+r{g1M-_q}o_!R3AAIT`)1Rxn0{81w;IeblCsba3~5^rV`Ke|`B6(`O_q{`JRxl*W{+wB{2Z zuI$+X?Iy6W(#PKYX!?rEe|`UB=}%Vv>&qWcKVA8+pZd=<@p+ZDd*{A1^!DAiO*|}0 z4K1!Eqb3tkvZlAIyH%3mkZbMg;V+T7Bs1*@QEFFdnGXc#Kb4*kYk_}xI{jL#1zz%t zG%ktwnp^RDRqs->Htv)%k zVL;%K*N0w6&#I3aBtK3(GHzzwz}Ll@o05~nt51$=99DuXP^?H~8f*K1wROk6lf^5K zjT<}krG;YKp>&Hl_xEWprY;f7>N0J?=`W^FiFH(GzLfrQtOd5df{b=dZI-*dc;nUd zt%H(f7dP%+JT}e^kg)2k!3?#B!?=i z)Kw%4H& zt=;RpKI6H)@>jFe638_tDv1&4P-L`8j3Tv4@KYcFs<}6B=vj!+o_qjvjVQXjzKA*K zEs`0s7s()?MJ1x6h{o46(te7c-JI!cllucQ9k@K;EbwJw^3YW9FtA-BrATCCqYRic zEE1xknXeM&Pci@!pzB^9;N1&8|2@PZ&O(UY@QJxXsZ5(@NW9raKq&B2CJ z;X;&9zb2UiEk^@{PxG`C${f*-+Xvby)yln|ul1cE4s9AWH6wFMpvV_?TrXO{Jz|HY zw0u-ENH>$v`o^7)@oc6&D(rOryPz0+Ci^*?I*VUN0HeOH&1iI(yTEW%tS6?P)#y(;H-kMl>-Rp7J-vnVHla=30rXcFESU*@?uJIzB#BGW3w} zfs%Y$Euu0CL6jLvQfCvbBz6{}4T)+XKfR`Hd9tbQiksImw#3w}`@!h7lfPU(R(*xf ze|}b&EBT?D>t~)lYd+9l?@9)H{(@OvM~^qlcjUj9TylFfxDkWrZ_Sv2N!Mo#l)U#z zIAM!FnrsxUPbJ1I8YuBrjt|b0QoGap*s@%XUw|o N?fp$yxjl2z{{@YT2DJbH delta 92048 zcmcFs2UrwW*ZyXAXJ>YHXA6iRQWhJibP&OcHFnV?CRSWwQIuZn1zYR_q8v3bY7$HA z#&XqIQ|z%MMuSGhXrd`bjcFRof9B3oj4?7B|L^%8!!GQ(@9E{^{{Nt&KVq^JtRFNIcZdULVD^TIOV76 zU(~vpM^R?87_Sc#2j#>MwWTK82Uh0rdpAz-w5WlqRnX@wbK)FQ|)Ov*&&0I zbB5#&iqEoVq-Tf7AC|}@+J}SRX|q?+sg>-OU;DLSVEnh{POxvNTG*05z+Z5A3QIZ^ zni*FZ*iLQK=8oCJ8$T$DPisIq2uS{2{en1Xm6q-d2MyEfG7wwe(!6N)IDX698D}-m zVxVZuJ$DJees5_}k1-7?{(HIAUz7&I$7DK#-)C$?W=qd;cJ5iQsoZ(QEf~6$gcaG+ zY86?hS`1#RvTP&bvoll9tLqe z+PXfUoozWK{;)hr?N2rF$ujMW(!|XbsS2TQIkmD50|$OG$H;yVyE>r$zcL`%k#6HR zVEIcELg8ON9rvQ(_dGXBA$;n}?Z0ZvY$+$m^^7l=S2ER$9xpQ$oxEw@;(0UpMOoIcJChaihnB@{8TLy816@vPdv6K-HIRK4 zlVwhB(6xu|M>K&?^2kV@0>KPpC{n++o&K=p*ZYPS#aZpg*$O$6GzTB;HG6Jr$apZ2 z&{f@r8}4drEB4d!PCPNiuvIDE_1F?EVArwCMOo9Z$7D){^>bKMup+y@O9XUZD*>ms9r^$nSOlJ+bW46e+wC*`Ik zqV9<=0_xPsY_Xh^a3r?^0wfDZJN#j4(z|nLHB2{KUXF`PzE$?hhLGqGf^qNIQtP^u*kRoT?b-r8RF9oxT-KIcpio5ET=Ia#)}Y+FK3 za(deHELc)-X|w;8G;$Qgrg9xyJ24L!@LQw}hReUaSRF6y%FJ{|$8UFI0w}Zk3T8J# ztkF{QdBK*lxqD>(3Y8T9CL$VYD?}~`-R5a=vSCrg$&XPCg4@(krZmp75uG8 z&q}OXmb_A53t`<^+E9|P*O=3lE16*_w&BU6(x2{$YyPb#e&P?!1DGia_*ni4<3~*K zOkIXFAIQ`e>d_XsGR5>Y30Zbqjy*BnmUFDtS6I1t1b+n?qg?`N{5&v}Y5zh{yFr6Y zMoAG#p?hR8;S6~>n_=`-fnNQQw{J`pq2p^!0)X$F@*W(1;{z&z31SC+>U ztb3VkEaj8h>F`wX_pi=z z`)j5Kz#c_GSK+kGp?3d>1mhyU5W1^7dm@ z=>_{sn3u?j{mfeolrD0qT-5(ZcKs!9))r4-G;rf%Ccf&HN09H@G>J;}yaUC`RC`WV za)NTEe~kVdmZdYHl41cB`w}r9VwN!w_a(NS=W0~0eg7lFHNfMjqRun39b1c-jxhpd zR%$&R2v#T9QZsDHgK2G4q2nrqzuiA>@GA+c2!Ae)dboV}!_1Rw#i5@uE2UbIn)rrA zE|qJ=|15_wrxcZnk{kfbL>>Iu(ZvgvoM!GwC5BWlI-smgPRp?m&a#!&ixo1dirxR@ zUtdb#b-=ig;h)HY%oJG~7rtN?GMF)_G=84U)~x9G{Ok9;WWA3D?YQo{`%%RvQds0MF zq&+4oEOd}5VVtqN&UO0W3@z&tRlo#1`mpQM3zaq3| z$y>oZ?4LVDf+l!wc-L*G}#}eI%8p6iV6eWjZaDf zm>cRr(wr80bX0|aZ4Vl|ZLcZ_)^}9JJky1Aom5E*`Gc#SRC8k^2ic+$Y>fs*h1o)F z;gM0c(1gUsjT1u$MMT*n5)vaKLt{eiVF}T;#72>gqN41L@vjo_7q+Bmdsw198a8)U zeN4u6QMGXYoBa>mqk2Qy_VGCa;OF8R{)9lZA#i%6>QnNYU3H&@dy`q}L4Oy;Q^ldj zGeSsu@kzEOc%-T(R9y%J5L1E5ui6VVLu3g< z^9t1ng?z!*m8x%J!^0a#$JiSs#e{~1McTvcNeMQL=7Yi`qCy)b*%PB8qQVCyL`Nh= z4N3?Pi->8Q)HoudaddR3Jt{gfa!^bn^lQl0C)S@`JXm<#RV9$1^{N2#Gt9Ey)lral zm6f}!U3*o(>!87H*$l1uFR)+9Iu6;Jn)T=7HQk?Ctsp2bb_mVr`sxF26E8>PT zj)J+mx)$!_L{wKV;{Ka#zwl8fE5*FYSB*2op5t1R+J5Rz!ZXoIyJ~^czbL5M0u7Xf3NloWL8^S)HO3Z}l!}G+*3<{oL?OtW>=2%}Q`@ND^=96%`91$!aZ? z@sd93g$CzMx!DkPhEmMdWOX;DxW8)$f(LlUdOs64hcXV@Fn%8_U!?XBY$^7%L|c~B z{4SlY{)*0HoHC2?Gu7z|AwxTFS1%YhOZ|0GQ5(92`b^N$HrxYOwB!PH6cupyIqG4| zGtkz7$8*)q%XWmH9WVyGqxOW$`ReIa$4xN06`&=zi2&0I_28m`r}@8QUi_B2u4Kod zhvJ}Bkva+k#mFM{=Nj0x@}E3T5!m!a>M2zR3kbF*8M0VCp^Aw2UWTx5RB|uKFHv{a zKK;+Z;A+QCp~41gumi z3)C$5)!DZP>!o*9iJ)WppOk)6RmToZcocbtW-4X&zzEbyskPGS{2ra>Y zf*TGHQ-Vnne;|EI)Z>kEVWTTw=!w$08Y~Ug)PwY3jaNl|{cOhPe6QZ)6yu-&pca|f zL|eG6aadA#M9iR=Mv;+?L+we4iD3!hp^;Icp`rH1F_EE(Q4x&>VaXE_8WU+xjJ8K6 zHEL{6!mc(nF)|W-e^Pfat;GY830cV*(g5eY`W-UiC-pmO(&4uHmFAVWM3yE)Xt0JJ zK5TUML%34v`YP3Xrw~m?p}gx;s{7BHXg+mH1fI<_j~L?DLbKETU$h>vY(7|eXG+cAj01y9=OGxK1-JlH#B`1GH#mYh|#y)+@IQli%#xQ5(}-ax(349 zVomi*M%4vv?oMdAvY8UHZ!8L5Kow=~m$KdkbC!Y{=d6_X!lSU&Cy zxA5&!&G*>2MujItC5A;tL?lGm8aK8#icD-AnGhKh-e^!_#GtT7i4jRjQBjeN2iYTR zp-Is(5s49vqawp2ZT9ep=tkjm_CwX&bGc>-|8HvUx(iNkR5zz;PFkax&V#s_^>BvY zAc)wiS>O!QByO9g8w0xsSG!E!AesQvzvwx}=T^xm*mq9T5ke1X!trQgkGkx1*n2`_ zCHljfH&nvT^7sx1u4?L%&yQ+2M!^75Iu8xjM;JdT(FMmfRtDOb*&_P7+EbQiDE<(b zCfK6iJE2)uhUfB^h^N~r&GM)5gnprE=o}tO)cs3MQwJXDH5kvy!BCv{5?DgDUI6Db ztIA-+Uql$!ztYTp8phTO8k18n2oi1YKp@d~eM%zY4^TLe^@8s&Yl_Q|#9c=u0arBR zDkCANAgfa#fYMv?t;XGf1YZYBHJ9<_OR_fh)nN@V%fcGL<%VWV8H~%f5JuGZn#q-6 z$aZr7M~&J!ER^WZn;P#jz2G8G+lg`80vVa-ZOu{{&kQ*EhsKu-x}zzojE7i$)kHf7 z<-{MzAN#u|h(eh!(GQZuVzNZa)-mGGa_d;okhPLS_cZyH*9Kg>FPwU$X$W~1tsXMk zvRcqR)GSx%K?FT0U6u!~LserMd`%WWYzNk`;4(X>OesW-K-^SpUS%L;vxcqXoDe9z zLM`j*(8o)>1HkU-GJsn=yShvRM@+0Qi51wlD=#ivgs;f@JBPq3AV(?_8%+@$kThVf z<|1oge;&)jGz&Wv5yUNIhmw9S>=Nd0VXHd$)?`i4q#CE zk-8e#g+w1i9USh!_q3v|8foxy4y@UJWbk+=Rvsf<@XJv;xLk#!)*f$l50nD}8J5&lRN}+}x%pc() z7Yqu8j4#2IQCI!X5+?!dU&@whO}aH;8$0~1djr<@Y1gk2>acuVzb0G@WZRbMz9pHTJpK1S~bY-;qpDMUK+gw_-8GP_MJF-mkAp=nJU-W)5*GS>sq4~2K z7BxSBZ6K-I0uTD3RaX63Iw=|wT%w6X-_mMN+rQ`U{mb)^0lIWRGwXg455*lG$aZu{ zh>W#8(;d(T+`(kWxH%>P8B>I=mShcomW!xn+&Rdwp&@uAvG0_LXx}gtQNrMV7g20V znTTc&RW2f2qD(~6YEO%(W=5C4i%2@42(PEH%^f1zp8hv4vHgII7(ZY+*q6a7nCQXs zO!h&!NUWQ4!SWGX8+^uK*38b997O6dX26D#SSd`;Vbh;*m5NnEN3b^(%(>`Rf9N!n z_4<)4)@xTsv9wUIejOpRKJYgz6zYv(`#Kn=vEktu^vB8$Q?dS$aqLQk>yvBaS+9yP z=@+}UJT4evUmp8)nN7q=INMHQKlx|gNvo;sXh!Mc$ozW_N6DBWmuPZc>qYM(#OZIdBmS9rh+fX#SGqLiof5wO4(sMny7U@$ zyyxJ3%tV>@*cI%n4yA8j$ME{ch;fOJ{Q z=00Q9`|DT*yYO^d8-8BTo_R7G)*aSNN=#P3RcpWp8!;BjtpH$N6am*yl#-(_T;Ih0 z_D{Y(Qz_@-7WRBO=XDpyR9gPSt!!GE<{#}u&40d)&3cCB$L(N$Qo6LHd4hyP9ZHwh zfFC}Tm0tJQOj+qv60>%*ogI>(ZNVQOvz=g*3)=xpCKqGzN)=H;C0BRwlI9mWJEkCUX= zz#o+*;s2H(2fjuhvHq~*D7&!?#_eP5wWnZEo=MGI9MK1#BHH^L@OCX?lr7VG6CD=9kf5UdeXgvHIR`&!9Ouas^ z^BTKW0pqwK=S9wcE49jHc_;YoDRAl=boZ^-*@?2ahrz{f*f-<~`K9mKN0m(;SN%-c zf;GvzKjI{#V!^%3SZG9RMWC@U})vhaw>>8cQhZKnSaq z`e12@UCiUs@mlSKrj<431d z*DiSi4h=a!`)S?DkQ!QdCB851h0C@P*3|qnH_csLgs(>*M9x?wcVg;Bdr(l zZK$2fII-DMk051yl7sRsE%LN78eQK_a3>*_DZ>&NiCFH3Y0ZD1nc+5KBQ2+L1_n@~ zLbP_P1B>(;MmLc~64kDqEE087?G*W?o zohRkRv)gLt`R+|h9*z%|*wTU$Z8^4}gxr*z+$?+0pya_p!-vOYz{6=;Pl#xz?W~{? zr&~;Ui?y9e%l6t=0<7T!pR>s7G_9XBM~SJo08XZ9dshuruXMEVs*eXMP}wuIr8;Y) z=b`E|T3bgth7r@CPKo0-gAJp#5mf_c8l#PK3Y>MU)?06F{5)_yr)ld^k%dkG->=MJ zuyLBUNmZaJy}1XdB12|qzhkW}o`oN_P!(bxL5j z3$(v**2w2U`(vTDHWgSj57tH6!Bs=GZISj>g{TM$tia9M?0JCdZqhcS=G8Q}r1B%{ z6E|ris|N1sCT$Oe;ACz7wpsg;i#7Ur2#@eQOxt?J5z{)>#$&VeX|G3D zsu0sCxcF}rrGW}?!>(#4>Ykqln44NZs?;v-c<7XZ>u|HGl3R6C+ev{^E5Lp5v(~D$ zhCNTI*MHSoDY$Ms(OoN^8jSv}3hs*HQ~Knwtk!kEYe%V{@2O4hYyBy>9t}zyPq$6G zuWj^Pn>%%1o8*MhULt?~rEMiV-%Yz|xmwf{Ucqyyi(Kl#TUze<5d=}iz~eaJ9@*cJH-xWvVS9D?R%X^Bruy%(=l5HFiz+3|w!fKOUEKuN|B* z%APhnWH>&Yho|?lLn4BsgJVKck_UxkjLI33o`$dCv#mS8L8fB(D0@K6da6u&b z-ME&rBv^GM^>B9ucJ$;LJ3MkU`0tY*KJLjUS&_!jE2mIkc zU#{3GU=RCotz;@k`$@nWLizyb@JJy;PsYV_i)BrGsmD7G?g;4Q>GP1yI2&ho3Sr+t zm|v-xT=18IkT0YPW)qm2qjlzw=5S^%m_>+fj^1z!I1i`Rz~~epuW_XogeGw@u;UDp z|8Wyn4fdySX2=_iKP4wQY5b9cxo~C(v^t7j<(r0)1<8ffuv!JHbxd7rwmrv+7spzI z>W;%V@PBY%F!zZXe+|qrLp4}Dg!_O-y4&d`(UL@K!=|BF0?bb4Qk>xy-X6+DFt1mF zBatf}#(Diaq!8Hfg{Xu2o}vXt4C4ki9gTYUs{`i=^u0@= zIuT40m0MrlJj^(ydNU8nW4I%TqX> zY@EnlmQfEhNg>V+9&bWtd^iQ6ADoOFDNFWHP8pDL6ZmNgS6{>29#a?69`f!GI+d#l z`=@egB;*b59t~nS;|EI@wYZ_nJ-*6oq4#ty)rm#55Hy3Erecqf?K8M{7;HGoLSq=PlZl<9u{n%5IlVIR3G>Proxzm_|*0l$ViH}W3g)-f0lN!(5@Rs*}U z`4DKF%ZGt*kZ;Q@fek9&hy1XYn~IkNS2o_^hHs_n>20Urc00r+0M<-yu*}_TBr`w4 zC?cs~xX+QYV&C+M;$mO&e=SI~Ny|?$R!j07UQaE@!?6dQ6D>h{D`ip*tq^yMuLk?> zVzDPZ#aOkrobgAI&biO^CkKD!c2cbm?^y(=A7VIK_6OJ2DN-B$G$Idsugu z-s55wk|KyInZeWByNAbv-vi8cZV$ND3W><9`90)JGM>a!5cP3 ziQz>lyMbwjrPR-j%sS}8^X-+=dd&0ZWiTrkC>*A9gN$w%(jN+ZZ-t})Nlhm04SWaM zs}J8=4fdFLFW6+_+bJWphFmoBakQQrQFjaY#hBe-Kr`&4db#mkl#$vBLl0mTgpoi` z)>r52P*z6-27=jx50vORI`zkUu@9h}2Yc`hl&!Ib#Ma=)Gm=6^G^&n|lt~I{*_Y>` z)KfX@q8INiqinJcCccTRQ&`J^vN3@t(Qdb6i)0cOF zW4?TxQetX9zB4O1#fbQxvaXWr@qMaJguih!XZD1ZwntRLRlq;@Gaq| zAig2g25SQLl2fL16g85)ejx7s6 z6HkfMms&wM8OD1Tewnx4QGyA!Dwnf%f6p5)TgN z8wj=K{&7s*ASj5yf_7^-zg(A)o51Dyf=KLm75lynQPA)6(GxBg4v=RXZ^mR{qg_h zZ98(5oP@d_feYY&((Kmstg@GQ$-O-(InAC3ab0xP;K6i*wXuJj^xTw0{EHkbYTjx? zG%~kV%B@wBg{*IhL+RwhAX_$C4>MAa1?Uky2gcty4vzVuF(oy|_>A6a)CM4c`t@P6 z^v3&*(SoBx(6Bdd)Ua@%G2aVj`tb(X6vDp(8#ZdRK3H@nNH;X3WFx;7FYukTq~yV{ zf4|8c;?Ln+5e4YmT2a2BfCjhW<$aWqFW-gJZTVUfJtG7+)eEpc z6-S(;EiXcHYekV=q6{CV;ivy<$6u1l-jS~@EwRG#Xv`rSo8ma6TQ?LdU1V-&KBDUU z0|otV7k;!X#rQ3-ytSN!s!K#)QAi5tDn2 zW7o@kO|s+_ez{shCtI6)@?NCR>%5L}yndOlPDb_SU1Y7~;muTi`N0Zdkn{b}mL%&M zIsGUc2tWji(e^7oIs+8!2c%G9{&6@`YYTf@ajOF20pX#(F%#e z^+9}nrU)zv{Hri@C(fqc-@(^|ZmB4$aKq_Z!LYV=j>^Bl#%~ zi?ff$jI=3Uqk+uHIBS{kJ1XJ&Xug+hkIl!R=yCX$I)?8Lrw$qoaIK-Pn)J?hWB6d{ zznimgE|T#vuOUHW(fOsfdi;z=K5iV(Fct~)`EA?jW^FLuf)EU06EWCf1Ez;95I2d}!`zlSd~DG1(oD8Z;0IB=AN6w!yw4FAN}q(Wy7@%D4l8Y$R*IsfGMd(!bb|b4GvsKga}3 zl#f9<^fG$0Rrm~dVJA!-Ig9uM3~btn?)>RnycNEGi|+|TuAqUU^J*Y&399Y&B{;1* zyx(M!E1AAacsFu*34cR2lRLk|=0m(cTwJEq;zFcG*} z^<71w_`UxiI0#$8hpCv~DYsyJ53Bm!I^F_r7h~Qglv}mME50)XS5SEq* zP_P?+Em1L7;Al>l1Mh8y=F%s{XHXO=MKw}{{5{x=Jksd;K$jo*nb3VGW~)Ja`Dznt zTd}Q6O3up8k-HEpS}?XfS=JGD>j+y~j?~d5<))-q@f*Xk?Ab%CN!VOvr{`uR*sa5p z?IWaKOYT|lFKl=}dA8irIYfxxN-%h^Ju6-!f#1L?lW1-YD0>a>uQRy7uuu4E6sF&H zF4K%3l}6*%vd==dCc5fLW2FAGtJE@P;~8|?e9A({ddQwFwWaov$;d@^x&&QrRPAXA z>A83}epXrQNxM<0tHWjz`&H{8J6@b!)`LoW!qg=C{ewwJMYIC5aF~>g&|y_F3Ap$z zju&jZuz4Ky6BZ{0Awo4TG`&h@HmLN60j9qj`8aqKkhrm$I)M#j`M|5QXRYS9q_x#*MXzQak!;ufQ35+ zNBBkHeS)tm09pbqAgthX0`tLxOME?AGx(k6J@xHvDcN>8kdO^0_;*!OqVI8{nX4$d=zBNzyfstC4LZG`UtmsYhC7} z=(LLd+beWL4#?T%bY%_#Hmv=?}ZwaUVyJ8)%4pAY)bMZJvw`4Sn zFLq$P@?fiBfRt3YXCxK8^7&n{w)D|@6(1$GM?79R^K`Ove+HFmG&MoSb$%j5uE)H5 zS*2su=_!fulS&sNf$(K3CAsG_a2dlWl8sWyJ||%spMlCqQE44x+X9X5Fu`7}KmEvWl)CI-IM`6vh^)Se z&dC&m-yyy+94o;6Ywx8dJ$QQHzJLBL)Oh*EEj6|k{w023@xX#1{SaE);M+>ZzvRws z-j^0!3#0Q`MuhL>|X7I1zhr z56!S2O#Dsn3IqIfTJZRduT}gTZv6DU&o`FB@0yo5X_`Rx-^bY*MRT^JJn9(z3XVF= z5BMGmR;D%Yi3j|fD)9%vSqILCA7XazSV!03#X52?Xg(UZEt+A4SjlS>U3F$Sw*!;N z(_YI#v(db#Ak}F8)S$`0N2oOAKDzQT|D)uY3l`~qpdLDl(G8?O++}p1EAd_m$@T9{ z{6BcE-(GC%yKgXPp|qY(AfVB8WQ>lPnIw>STQ)EsW8yYyu_AuLxjC4l)z$n55AP@W zbvPKdbKdcvzf)G6Jo1|&6#>^ABq%k)x*!`f+FEf{RpDV}Ed zT6DXx^*V3SeF&zy7_;7Y(H(-rvp7F;z*YA<1G?=PGEh=R$f&MMlVxb8?sH4rV8>e>g;st=x=-Q%fKGC`N9&bI9`gwI;*W-`n|`K-p_K;7tnsN^TKDFh~17q38MWi!@P(j-Lp5|!J8 zqi#^x1`Ua(g%$(wI0l~h?B)c~5#&;s?id|rOt@JGHa61rcY;bP`7TN~Muzr#Z7E~b zfmzWy#ccyll2fJZWFUKEbls_j^9;Qpwikw(TCH>n_t8T@qDNv|>uOMFc`mO?QmYG7 z+9;M4K~ixt757cR^g{FB&`ziLTn`0ww0#*M>z9)Gy8)dkr*y=!8;OcAVWnVzjF!0H zQt^vs9drs$UdZgju`5WnSx4Pj$>H++M?&XLx_Z!}ldii{iXPlqS6^04lk;E+(s{s! zuDVuEkvh^%C-0Qzwf2%WCf&d{PWQSqr07m0>Dxnxx6n#l<{p7lz3|jRUT>5p{-n5H zY|%%TNp8HR8!D@O`Ze%dg?ef^M5lwby-}b@SxLN+e3&57d-UK=-n_f`6>7b7u8=ke z%S7LJMCo%3x9l?d=^~Z#e<@y!|hT$to61(ZqT+EjE^&VUJ;z} zL!NX@(G|&*f2|3YbX_eNe$HsbBS@$s?{r05DKb6FQB_Uk@vyhFb-gDCPl&vkqf=^F zfIc8Vg9{b`P7TEkn>Yqh`_#jKq?hDiu5LAz(ZpI`LYOH?D*yA&G4Hbx;qFOsk*M^o9lPnLxFCTXis^u%HlvgC!IS%qS?V>ScP+ zWDzeAZLhE=xCBNOKc{6;Qt7C5$JpR~KHFiN0cy(v2saau;k$soeAs z)H0Pmbpel4)W8eE1tldF#Uj=e{A4NvTT9hcZHWp#RNNW=*{~2Nh||23L~MdY7gP71 zgkPqUaS%roLL4g7Tvt#y#SDf4Q9@7P>Ipu~dr+^QPy|=@8#+N=9buppmnW@hDxWBr z;4chPAUkTzl=RX7A%F>i^|dhpUJej~r5%~-U@`|YSnN7D@{SSYbG?(!PJxUjg2LX&L1k7`p^prxbQv6Y z6MG|kE>vM}~w!NAOoip$5D;3dfv2odj?4#Y=+xJjG-eEW-~W(}y?7 z4z94ebI7n+7oh=F$7Ij(kkVDLfx)_0g;&U&Zi0Nie{$eG`Q-fL?t%q2x#RBnV>~op z947=S6(kalhesZUn$V@GK_Ff|1a}!|_%?{?=_JrTFAKwDDorQJKucc{1}cO`5ZagY zDUiwC^Y?=JD8>o%duIB?vGP<2eOTTyGYgGZ@(z8VN9M-s52>C5{~8S1R~CNc;w`XDu{j0j7QEFC@KIb`ge*k zS4;73@|-sE8C3*nf{cZTzU4we!I+I8y?ZjL`K_g?k&-8mD3)7q3L|9#OYxS-jyPT4 zumpnwJ|{22#q}sZe5vGMA0_(s+d`r2(;w`BM#}|-$2fx_?LDC<>F^E)J1NCX{`S+o z(Bm%7l1twewDLtMWp#)KZuSxAyaS(iepjfaK&>?B<4PA~{%_rf?kh2cRJ~Q8xrag> zy9%vtp=^BBFThqWv5&WY*$lultBLNKgxl!%ib_J{nn=st8W8-G%A zG@7y+yv`A?r)WmWs@}96cZ3hG7Zgq;9MH~f5I&dpVfC zN-)n!nw}EWNjeRNdlHfmXRpFqmQtqA?)Wh#pp4ZAYA z+VZ_6m-F#R|AgDP5qm6CzPCh#WkG_HnAYlZEXN1!5qinY4AV*5nV#Tt5QQB#o8je! z=>0JG)R~flph$TFd9V*t1r<|fJy?7|XeiNB5ZHj?Tk?@Gm_~ppN%_wtNVAr-jK? zmk>cfP3b6a%AQhuG<-Q=cW~-+!3EZz#@j>i>Kq)!oDq~fSBexTz?m^jJyI^#M z*!lQKR_Pg`CbT>&G?ccEhn^Ld{`*B8QLtl|(F}o}q7igM&?5G|$+PgrIbj~G+hz2U ze-ZVSkWCK@(K|-=ekH7@ws<8UGE0Mqk(g%{oG9VFBB zX^(WzYxPR+)2sk|i_`DtCEJ;9s1MyY;qLNfvwncnFtslF8T8VI>CMKKghG!^X1}6! z(@iqkjRAP@_3P?-r5BS{p#9xle}$LSHGOfU^k%rZl=xG6 z@j-f{3^#8*ZZ~uZ(syuzJVEPPp{A4@oi7QahI%1PKgtDU6rCE57Qym#PE4?G6Dv8BHE3!n@m7wY`TpRxLyGWpq;Vc!GPPiSkW^kag8 zc997HL4Zt;;z|wa5QYw}; z^&r!Z3F^)6DD@5P^(_<-?vbM(4_+5^?&QKtdR~^p2@@O`s<+~4Q9O-c>ZpHJDZK#~ zalqcMlYS$G_xU?G#nX>dN+hX^{yhEs*@uuh-{KFcT@{%oC_U+9XPh7;@H zAfuqWevncuN8|KoD3;6b!Kt-)t^1f>DC$!^^sN+9BH#DaHZh*< zUf-f~;l&Vo*z|>g1GDrX@$F&@3%3TMaCgTm@-@0nvI>uS{xA^f92=sGpMxf8)E^CFSn5m5R4917zmwt~D zEVb#~6zY~yOZNOr=sNst#F0uuQ0Wijzc6-b~h8sg=y~oG%5SF$xI)h8+{c z-^8Hx)=#)27oUdOYmuT~L6P}%hRkA&BIZ=(Vr-G7KP8QeX8D!ufYWOkH)xQq@2n6W z>6)RhCi7Q+I&3bs)CR*ZDD+GDqDv)*Cz+T`l}Qf7yE<<;ouz-DavJ0ho3r(GU}h%j z8qem|l+?^)ldr@?393ZyN@j)b0^3M@wsChZ7OIMnd6Nml^`5kYoz?ynl)j;NhcDi6 zGP$076SwI5&ek^}KTgwo%7T0~S<0|hxV5w_x%Ql)4^RNIBCnQ{hb}YqkEkH~@DMjk zpY1d`f@ni!paXKCaE?A+0V$~*DxR;$J70_SP01&7_5EZ@x%K55D7HXR@O+Y7YN7rW zncUd1aQa;;Y+T?JO@bVcpd%_@F7#M#@r0pEF@NJ}0-^X#eYgU??<~PUCA_6K%j_<@ z13i|Yt06h+YWPTji$Mn|OOzySf<(K?^xo6K=C|~9;lyV+No=Xb6hl+lXK!J3@YYf# z{tFUP`1%BQf$C+I2v^tY`zqiR{oe~lZ`HpJZ*S6Bi1&KEypuZX!vN^9L7(ajDKdMb zK9G*xX6+xoPii>uLd8vJii)C&42%4=SzjPa?ch}?+@i=&CFTe+cUcB=B5DV;%EKc+ z#$$>@9Auo($CJ?G4i(N0y$6>57;`fUuzCyLqqE2XK6I%?gx92(8@eh@vfk1fW8u6N z%Yyr^_|L$-x`wbd%=Epa+u70YN%7vRINP9sW~cP8DU&889uN1820i4Q*1Ixa$~WA; zd0HO`KIggVa4gc4CsmTOTa@5;H*Dq&I9_`VtE{`9D>W#`T6NCoeVI%+{Te>!@!A=E zAaQGK+M}bq%(cVjHI_P%atVhmimbvxd%>T}Bq>^~3I&D#N=}9|F6E z;0>myYU2YzR3lNJ={rc7eRlDOJHhXv=mx?Seb=h5Og3N9ub@^qdsVU&3u;1K8@&7n z(=Lq#0?eL-r@8annDExvC`F1#%HzqgkMIN*75=(g`1KF8jCc7CCp=Y`jYJ1JT-V>F z0{*}Zt#05TL*eIVea-zsKTm>S<`0TOF%2Yd-_-Xa8-K(OlS=!OSN1^RH9Q*@a8U9H z74B&)zJ^c3sBY@(DS$@Z7)i^c{Mkp&;u+RBY=i@D>Eo1=`S}*Mg_Ok;cOmQmJ|wsP zC?4Cy4G{}0yrYj$K#!?uXoOc#>U+bhM|9rg)Gw%aO8MeuupHF|%9NM=ij$0jyLz;f zUlm36a`FTx@c}aBtDPbCLyI?D{#|dD$>VGh&uIOwZ=(=6LE!JoL~pc#%zJ3jiT7}# zQFVhst$4%n1cN)=eyHz4rr+21r6u6(2M6WmPrn5#Ipag6abG4%kZ661Zw^y}r!{d? zB<(R4`t2Sool{f-2~xYaV1j`*`E%GG;J|S_lzD_VbWqASMrwE1w9R6Gy+%Vb2>o1F zjr^rEgv*GleJv*kE5U*s$vdk5{nBZL33@~Q|F~NI88o*y4F-d}nx};(1~?)b6lQ)J zOl3X@@{uLe^L+_!@38p7c^3puH_2MuLdoZkG#TNKFR=nwnA)%=je;9r>AVOI`{eR= zPGGh)6`80&5am>)kzoKV4mRQFq?&>Dy>mk6!<}8&Y0*P4RyRXi1%%Ph=8`Ve%XHUH zB{{DbUae~wrjUxXWu_;1j7Dx-=5!n@d25i2YLgeHicn818O(7w3)t67NtPf8GELS_ zmn4YoE>sZhrVM00T=zCymr~7~?y>l#cz3E9{9sui=J`iH1_jervf0-lpL>|ocT4ei z$X2KyPI8fm5pV}v59XPoNq%pSzd^waluWE;*eaDYLc1kV}f4+D2wB4xmoGF3Pg zuQQYvHZ;5}iz1@|+zB)!E6_C!&)Ao{!_T1xGko8~5KE$i4f0WmIZNWDX;V!Yy%$5+ z$q+@N{U^%mFoV2LJZDoB+}V$*fcQ@FSik@bO(ANzeAm$z>ht+Wg zc`7ugG)wC2Yr)w27)pbh>Rn)2A5@U=s&cWEuR-)L8&=A2f7mGHp4t%j5XqlBCt{1z z!@&PH@=*T~W*pyM2CeK(x5rlM5EM??<(xxMGM~_LVb0@qQZL{I)%!Y`zK~Q$(xIP0 zp25u3&IQY-7>^e9N4Hd7&LogM0}OU5%eh`4S2B6SFg{#jFl@KbVoQO|KjxkxI02Y2 zP`T2uWJ(}oY#3~%VsUQm7E*On4}4M$3O8VAVUq~y-*P^xlH+na=c*Q31M?j>1i}|{ z6Qv@2Zi804SJae+H%hb>0fH{8&I)XXwO z$o#~#lw?*HMr9imHvEo4t(+*V6Y!ydrVkOTwFVy1yCmQ_kNbiU42|2F##7<7m`6)P z?1=?9k?WKIE4UZ{V}kHl)TKkXV9gu&Pty??v$~Ej^o7qN9SgQO1-7XMA9!V|K|%Wn zg_jL=iS-S`a=O_(H;KXPsC#U|NyO4kxWv@?isJ9`w+)-fw+jpN~QlI!w8LJCHc{x;R#6z(XAzh*Q@R}1j$UMew^QarM%HqFi&J5Z#jC$y(L&c z4qR?fGD4SN(c+Hmd&j`g_@3V<1;mwxCdDfiB|u6kdzB%I=?!aE8NMO2RvX@}E-_o+ ze|Wddtm#WE(03d_n7Gl?vg&M0S;-5gd}N3t3HuFlb5_vd9uyuhDBJ+`B1ol)n!@V4 z+X1WOQ>DJ+1=Wrqn7aqdz+|oizr)JGAeHI#WJtm6UvVZ&En>%KN(_tOto?IpnFVjY zCY92dfDWU3rkye<$rMOsqFV=;P z3F2UqXcJq?M7J)GL3SI269A-#^@`N7)0f5sQ9$QkzOe>gHYX}* zg2|ns;sTk#*UO}O!wXiYhzi;VKmwzsvO-TvQ$=~#xZvtQu&G@;{R*KnL`C?y~cn(csz&YGXz4g11 zuk@}jIeEs>(-!LYLD*TtoENzS!G+W4H$)V=iE!W=mbERuMt(fMRvI9@A$^IcW9irE zKWrsNIuHh}5YOmj_FJlG<-ZHq8 z6F;H$rTV9Ea4V^e!;9W8;iiD`3U0=A|5;HjA?2~>ElP0F{xruI4*wYre1mhA@9r3s z#9e9`SofB*5q1SFdFF4ZsR8#Zn3LWmrn`n7GILXY0_H~x-hK8fc9OUvjm%1_E(Oa1 zF3Zw<1G|1TSje^C3_D~Lv$jcoS66y4S#dpE$r+aaX$Y$1ZGf+9kl+6_tdUn)VUb)e zSX#vhCtHfX(Ct3{Wco{aW&XTH4G#?Na!4W5C6}wYU<`UA9w5f=BCz6B5Cy$(*k}Dl z!!C#wT^Gz$lmRRI%EWIiK3JV&Nm!|(AHmF~6~>p$tpOL#F9 zCZv={CBQel$e+B}L3XU$8)RF*Er z2Tde+R}&Q;h4VHxdQyEo+{6F~c0*g9y{|m~6MXkiD$aRz-iFYdmgdq@MwrzT$Dhq^ zTEbvJHAUVdNw-QX1FjrQ{_qfQ(|&SZ>`XlSM@yb&-iXo5iYOjU!p>51W5D;K6l7Gt zYZV#w!cE)0Qz@ zNR&^;%v-UrBH)$=if}XyMt<-B9@Mf0E zVN`mTY>O0&W$BiD0X?F`!vD9Wpw}Y71Z$$u_`V;DNt*uT9W6#m-?aj<^L}YhD}7AA8hG;$ zi%{H5R8o0VHi;|0p-KF`A_nPQ64P9Kg&KU3rj1!wYCyjT$NTLN*+0= z;?n9?Vq>bWB4G=}wicD_vq{ZfnQ4c$5&gmX3s>gEfN!{x(QQQe;pn1zCh%*AfqOt} zY{0vL39sAhjWllEc=Cn>S0!}pNhRm@jviD6IXozVMu zNG83fSk3qkzaY1|i6OEISDuCCabgTC?TShp)%zjmF^XKX3|k6w2JX0Gpnj8e(Sgf2 zv93C#0nVGpiK8`w&>)2D94B6-nw=jN0VnfBD}0nED)B_R5+0f1N&ZA}nvA^tcDQp4 z59QzX!9`;yE0?N750G9rGHi<2fKFTHzfuo3ktd2SwP4vvqZUd|;mu+dX)R+uhLkyP zp;6M`K6pcszey7qh+T=-VwcVody_}gM0pT6KW#nTaV|Z8)V-IMQKxH{wGJH>ctH6& z1lKuC$Di}xo>Dgcw7!MWW5_&Q1rG@+IapAx1L$9jGP_lPQ!Q#jduGccN1T*fB+3el zeJ`MjphWYFM0po}{%2o8#sV>20o&#H@cU=PIWn{_>&P~uU#K);S4P!xkr+;AA@je- zGs2<^J{J9!s9;xtZu$~zWLaut3)DIIl%ij*=q+j6RU&2td`!_3$}GSYQqJJh8VV1l zpaAGtY%uw8nb?);eL=lOXwP))UHTptvtw7|QWf?bw*p(mr7IL$F+nSqzb9%z(@E5J zPnmGgiPV+M#LMi|M)tn%=sXs*ZwGgN!zUF^uT^fFyW3+*^w}szlVj_!K9u$#7TDJ8 z0n1K|5)B6doo{;%#Apkh89uAgD^e=&+3ScjRSz$k7v9uj=)hv#t0KWq|^m( zKKMSI*ISa)5>j##?ecdm;`hS{uyV6F6e2zl!x^FY6&!KJN*`GC0Zs^S)G->=_zfp; zd5zEtZZ$UMNnW*Jwq5$BLJzpQMbY$F@&dAKtEi>%cERyC<#YE3w<{WFQ(rEL$)r$-U3J~{c)vZ9L~wD<ceXGsfaiG+5E5C zdV3q#hcd{v!!W&Uox{!{75m$j&_aGl-ajihkNkZ!PLl7xoIj7w>XHLJ$-@2lUC5RD z!}uox{~YEck39Zbey(@!EBO_^fLrnr=ZEGk=@iQ*PrMq+d(<3kWc{DX>KsO)h}$hkm-s!r%rQdbtst1>ksLS% zhhL9F)}Fl#Y`Lp&AiZpDewKGdlyM`p>jW)A(uPbqnJFVxy^(K!rN;rR6B?5 z+*vV%4GXNQc(~S$t4}Y4=s<>p?G?abz~k0X!}xK zlcsiK7beU}fga~bbyub?a)`Xyl`+ZRrnD<2D|Y5&lS>N_se57uR^H9sm=dz(+jhf9 z-2r6w<+?Ldsazu8{XWp)d<|qJo`x7eQ^#in4u@O2GtvAz{exd+{fz3@v#udR_ja8~ z#pAekTGAc8e$$mXEglp+@v8)(aI~KD;nVwr^ZHYE~JNF zF`ca;Ywm;bdGBsiE4lqDWInlRV|H8buAWTiHe~Pk>};=pZ>A`Nlz)z!A(x!MxO8|+ z%O4;goWO)tOg(H8JAG-f)UoLGp{`_QztAg@0LoBuXiK}CSlzVQwGBs*CbK`;u_`C- zz1p7O-Iu+k%w^=wA;_L}QDzJ#*)ry2dRAR} z)t08EeVxXHQI^4UCFC)k>EbQZnU%iCS-Mgt+Xph#_5%TdaL+Izu^Ao#yrFbqv*fLT zOb74vlbCE@cV7C~2rALqlbc3k(rQPCq9dZE`;c*`GiQ+{W0*t!lzzyO%S&Rt$(pl( zt$%T4*H|V@I6^Z_Z{Ij98VdB*$S`vG1W?8Y+H@BIm6OLOG1rDj?XmW$NTK)idCX3K7rk|930Y_` zSGOF1H^XGAd`sx9&wK|H$-dbTr*%>+kNn_ZX|+6g4G<~tUUr!$f{}c?l?Y0#l;jrV zq9oIW%$N|MW(;pz=xw}+dCp&@%ewZUW9mkB*MKJgk0E|KmAwXXE8&?E2C@k@c(|5{ zkw>#|DQnf2Ot$wxEpzZV$|uWycRxWww&EaV%L}uau^}M)!@qS7v#2dSp)A|YAxi2B zTt2V46$XcKmjTw9El#q+J;n4S)30aF^JdItUi0a>eEwHt{uNAb^5NoOVc?qo6--5| zfUfu*^G~0$%U4`OUbvd+OST%=?_ax`8Qv;*pZ}hz36R|WJF@mV?6N+RsLz>2?!1l} z6%we2kq7y1mcMcCf&OIvGmw|nH(|1UuzsGRNjE_iYYjo?EM$V*+snUwmps0hxx7_S zIxJzn^+&v-=Q(7^GN=pB+=@VEWRlDxr!8a3Ljv`FSjJ57wYnAk%CQD9VywXx(2K$i z(Hpap85zJ4Mk9%i4`=McI7)=Bf?y5@jEw1nh-|VFSJb{FC-FX{>Pco|%OQDKx>J45Soz0iDHez;+yiOzli6|m zGhyHnDhj+CpJlG_gCSNP&Lk6Vjf>63r7SXKPk7M+c$avqpJ&?my6MV)J$Rs$^2+ff z@iJzQ+ZUKfjg}AFN0azqOJ8JybeXH#c1M+KW}oc$2v~7`t>X8L~6piPXK4kw?ycn>jngezfCLrhpv& z18irL4?;6Ldtg?al--E4GJc*FfIrzIGX|kf`kr@~Fj?9F+3^njm6;wuv2P{sJPHHS zW$)p5(Qs&~@mdUv*IhnbC(WAUAw~Gfm|OI3k4t<$7~JWUdQ9%^-`S8#<96 z-^El9JQNxdxiEvx@vM)Th5+20w|sD8H^E-?!zYk2Ek?}47(Wbv%#D+S?Qs>mY64=H z_I!qeX^Wu{pHg4^y$PQy&n2G^2dF=N0lCus4=|n~0d&@q2UwOq(!&8R@TPys1WuAw zOM4#>$o(vAd7E#GcPB4=#as{q*ut-w2O@3ADc>+BlJVVP3!K=I?L|KPhAAQwj%P)( z^`Fc#f2KFC3AnEA+pt{Mm%RBMbCP$%znCB@dey!}z@Z2M-w9SMG(7=o}A zx(Db%y!NWkfB1vJ`8KO8YnrLWk07JzFL2UvL!OW-+;7T z^Ebt_$uqfZKKV3p)Uy>FTh#i_=0+Pk8`LKd2dg*5V`No~ozfbZ9;i|jOxDm6N|0jm zQv0y;RN!su!2Z$S3s;}97-}qJNk?*TCveiWo!Br(Nib@GSJj#A?4MFr*E~-?+Z^Gk zL}JL@W5Ax@Y>pHY?rSCt0U@9Yy&Jo+>jR+IEegcYm>yu$P{Oz`N%Uq<@-FPj2ALpN zuR1*tL-_^RA`T{63Ge#?mI5zGXhg%v)*aJQbo<_GBA_tzu#vP3b)?Dv60ZXJXD4bOy-$OnCJec2!{^y-Js zAUE}6=Z1q)K<<;+(cb?4>{K7qH3bio9d}^S`HOp12?&wk@z=Z(_RLm6#&!N6VsuUM zmE`j>_U2YV8RLx-*dR({P3cRdU^W9)WdkPad65mX-}-9=<6RyMRcT8mD6K?jv&t6b zP|3CC(tkmLjd$vJfm7qmG#Y$Q=d9^9^_9NemmFNo_Wq@J1w%rKGrAgk6g0*W{X%#9 z79pEj)v)}w^Zo;sQkbAO)ELv9hmPI$NNcPLQ?uVu;@IC7)5@hzC51L15nO3#{9zk- zWz;)u=x?%c7pAISLXMP+%d+$4!M7Wb<=5N$;QCUlH#K|LI}M2or`23&1kK9>dpLb# z*B<$z)Tpb2iM+Vz2>cr=ixP7a6ybRR#`sl4{n2!mifI?9&>UFTe*xI9y>CRY5hOL& z2Q4Um7;*wH64PoD7D-&6-L|y;zjv0vABr$-G&fO9?!PFj{k*L|-LFwF2Y@GbWr3v~xQCu{+Cg{>{aY>@O_JZP|#Q>1ott~%u<}9ag;ipsUYJcu2QgH@5Kco=z zPCSzh0?OAM;sW_KejL)g$pjGUhyXVn}#M>&m|F zi^8?tM*AA_nkf*ftO0osb-p9ccL39ZgW2p z&!v4-g~T=h%A4%d0m>y`1sl~1mojb0o!jDZ($8ki5J0IoC6^6@HJfwT;7Gmpq&9SR z$^x~?H^yEz5gGvcKrZW6=uY=sz@F?o3f9`SFc?woF5X~VFs<{^+2(Ww)P!g)uJ zrLZ!9R+Ol3xB#zz_7+3Olg1GpiC*DRZ-N~;0krYFX|tgFMg!f4{Jq=Xg&-F@QdtWL z+>j_JZ+vrJi7g19PPQFEI8^9^?LRMu zEZzA;em8G&HM=&C3iowoiv!!C4>@sh=yRb5pm+O6rFDalhNtm7n?ufjGTx5tzclP2 zr@*`CGWHJtaJcUD>kdd{$4(p<{=N%`;~+fp>74A&OT%%^$Q( zNAy+9>5cjV20!y+pWo}9YR78uH-4+O#xfd;{r`t*bx9%BS_=mz3X29L8Xs2I&T(c^ zMF%Qjpm;XFDk>b1D5NW`;o>^ls%StC8PYW?UN&c{Qv;QQHl(jB>HEHk>S-4_iK0FY z)22HRgVXE!6eSwyhehP_F1cO#qNW}biDS1fPZTvc|I_eOs}8xHrnjV(SzBA}7&T1| z3mbnI7Bvp>zjRnLYr5&oY-&j+^vvxnw4_V7y4Ls!(;>&_cD$e^%|I=usWVDhrx{0R zhXb0X2?}hEJF|9r0*WZ5FFjNEQv-djltjB^#j_iwY7UtZXFAUV`fa$V{gm!8!G4K66%0rO$1} z{@;BQ))*S(vhJGSpxjdQ5Io(JCS>LP(%L`blmFWl{|mz4;N>V_O%XiiVs8WQ@1LRV z&=3BfUhHB^7DIi*Oelj*%Yj^u<$h61+R^3R)GFj!cVe&R2!`V+GYvM26U;|Mef@bFD6gS#*+W! zGX%c!gpHE9rz1*y{4%y{Nbp|grEHKecD=ooj6X9+AZ?eiPDm&OP)=VmG3SJg%sO)U zSBPLdabnKz$+yed$#HrTNR*d19;i#{Pp@GG%lRgo^~+b%WSG>szjk$~ZVNWE7kRta zz|l@T#WQ{%H>_uaxRmveA(;(z+rTXnhPwf! z+8cB`J2b#_=gAaGX@DPGJ{?KLbBLu0k6N|&#>OVpcJB*N1FMBV%>!z81X#Uzx^J9B z97s0#^e*G*rt(|lL>`U8_54JP#Rd)aeBfbmz*9b4Ez-p%*1G5^>c z^Lg*{`E=oQB40nq&I>VM-|_qTL+k=yqHjQ2ZbUsL$nAd$>jmtKS{HEq{%I?_BmkwZ zp@xxuWZt&0=8(P~K%MJf!rw6WDxW2or(v%?w37`P`BXr#V`Y2KJ34D7u8>I2x@Z?__CvXoNBbV+8KY;)>lq`9kJxnKX!!!RTJNANJ zfaKSv&LS(`gJAVHoW#j_$B_^5HpI;Otn7EO_XXB3DY4rk_X-=78IwNkyTdYV~QcX7ki+8X>O`#N(c zdt4?rCE^1b@VArzWwzyF0ia&TrvhlOoYWja6iq#;i@dG!uAyp@opg20G*wA*6iG}f zI-Z!WD)O#vIEpRFk|>*^?ursQSios*-uO+Y?d0>*aJYY5#8sVbL$i8%b{6-3CaH>Y z#pGZvDyh6O2{mp%%jaVB=kY!b&fby=>fWL}?z(^m4L7wG(EUBR;e!>I7bQUxRNl5h zi=?XxreLe4Yx9O;yMk-zjw<6n#jtcuR}CJ2>$)s}MvAPHcM7;9>CbXs`lE6uv=$l4 zA{CM;CS}7kMFBlpNmEfY$JH#!7LtykE4(b(y3DJZ?IaB$$!nS_+PaxEcqQp*vSLwe zbW#%K9`&&q_DD+DXtu;#nxVU@e!NLsFox+0XF}Paewx)8T)=p*cguE$Vo|)fP!o5ydbNlCab#2YpNl*x^8QRq-csM z8=A)JN!8_5Su+e1$hw;9(9Wd;!l@DKebU#*$rAC3mjq=VBxQi&lT`TYUJ_SG{y-JCz^8r;&e6`hp zuH{A#(hXID+z=#1;&nwxszOpwRNk;O!LdbE7A(U6lRB1bYqGA$24*5D$+l$3x|$^S zU(A(}>BG2Ol6z7%RAYsEkq)ow{F$xBO5sLUn1-wvwl2x8tD1r?St8{Y-Y^VXmXfxk z=t;>^HH&uy)6osxmLc#QAt@(C#R7km=wzw?C+mTtRAOA>8UmKDWNEY(s?$JBTqoye`Ea&~qX(&j{NN(Qc} ztkt*<-n}PsCkOL5?q|z86laaBfE*KKTg0l-EW?Gkab?StlSy4y9AGbrnjp&}CJspI za?&y_-BNgk*IdW64AV!ECqI^R5BmhGoz!ZAUCWIcr0c4xV}s#kSJiESmjpfuZc>tp zV?y#JHN)04N0oThHYGkO+eT8w*5&F+Frr2x6Twx3C!@^$TZ6eZK0?mVdn7K8oOf+DLlzF_-ldeP{A+Pacu81R8kQJ3HZ(<4 zL{T(!-V_}}HC)jI0-7tSrmTp9YYM!>Tlk}!iex#Gjjb$LdUH?ZP@|Qib6{O6=y*Fv zaDxIs&u>ft(5S&!vbqL|p<)BEG+ENXjDn>}Ny)||#}XVPX{ZjAC__?J4H8kML)Kjl z+or0~VZjtKnmg=|>ci9oiUG13prj~Uf-O2w*`S=Ms$$zNWSk<&rXjk(Kv#8M5pBzb zjDwD*IhqRboWyEf%9VN9V>v0H%~#K-K%0>jih>RdLof|faV2PxhG@8w?6`sei2{Ym zlq_hINyCzL3w$VJD-bno*u2PtKvF=Q!zEk}*)%6Rw&XorXRjU4ZShHUcy>y-Niq-V zAWI4~6YK{`*U+4#BC3*Y$dV=TQ0pAq)h$)E6*UQ6K{S(!m2|+MHbjjRkZQo`T#-+z zs@`@g=nPImJ2G9&gCQysX2{h=bOOdV4FPJmj(;3MRhW3%9)5Q052WL1Na!AmywoG2OTr5x# z=ZHo{VmXPFqI5&y`J6>6CbsM5?LVJ8HxLBN3tEdGWdUz@6*o2jbjQ!mJ|Xwp2Tks> z0MOc(T8j}_V5IlF&5aKLU2{cBfVR3^&j8S6t)>yhs6tRR9ULSGyoHS#`-Kgi%jV6b zB|F$%=>AFdLd!CfNkPQXPO+f%7+TWB7HL}Q5$oi$soV-*M&8^pm9bSQP@*I#Tbkqw z&;uRF9MLjF4eBaY*THIA(B~Xklx;-{l()zVQulOr53+3;cY@b{IhPe76IO5!`4nR-T8$r_#|J4( zkPFZ+p%&Y=uG*G@!>njSB0zD4)HLAY@Bq280GausOVH#>*Fd`&xyU{V3NZ zY(wwiZQPj9jaF>u&I#SGabY_PO$4{95o8KHQe_Nay&s%##bU`FF7z8jh@0A5n zHB~^-*Q2`k$AwWXRX`M@3I$58W9cvosJiA@HjIl&-htIh#<@|&KZ<55I3nUu0~-uZ z$TBPkssjzwweYV%_ASDY+LIX$((d$L9Q~Uo-4Z<~BUNJUiRwgL8oinDZ%5mciuJzzG?iELVf>WWv>l^Oi{MESf6g7-qrjf*-aCBc=(%w`rsB z@xrL$4cL_W(h&|}>9o5mIzJ7QrFmudM4hw%8hBrNFd|i3qHjb>k6@qs9)ueD;nHAc zg*42iH|L?~`Kb=tpN2~xj!sGykS|j&-5TATvb>?K~MlWkE~wMxGaL7 zZ!CZ}F{RBU*a&K$if&5B=qnUWfO!?BOw+RAfJjn5nrXqRrz@629qJYw!y+7UNgQHe z9~U+F*ORiPD@j<#EQegaD|!l9Fa@PV$2}8G67ED80jnd(6rT5NbU_-1I#_`t#4>rs zg$oXTEE#?x37!)h#ugK{GFZ+G)ii-5JR_FI3%sk_sw>EFEosbSjCy z+q4&yU5zSC!{0>(tRJ3>Dyd?*C;D9Ev|!a-m&-+wp*gQN`R5DK*{K5dH&~pk;4n9F zh{U|e*j6=cuO`llIN0Opr6A%#)nqsoaMnVwgYCfEp}-sCD3FMzME0$M^tq&yX+{hey0H?P%Juj~RA)aJ?U#L^@lI7xSM|mNsqWq$NRSyJ zFXqNN99iM?w7*3AWo-|xZv{0^Pq{Q@spyYw{2S3{BT0WHHjU0NK6>0KT>q@zjXnBL zP8gSRk96}OQ{IZc)TnSZ^*HM7=t)@*H+Ht*?PyV|(@*=Ed@#Bd34y3$*VGTnat_Jb z*4U3NkGG&X3c-{;pp_xaP)i8T|b*OzewfSzeRtVH9V2h zLC8t(W5Sf92uW)`(&6>bDr}^t|0G>3Qu86?)6r8m_M;=Fj+SO5_k5J=94obj;j?hok!; z=Z{MBqFmt^cJM*8UVdm%|nLPjZ=nFq%Ouv{Pw)USG6Hn5@nD2h^AB>4AdZ#w? zq+e+7q<^Gk;wmJB{kbs38q}W-JrAB<$v{X1LaGq5qo|1c5G@{#UmXE=vh3o_E(kWxqXIbN+vuZ_@}szqr&Zv-{}#N^udzow(bK`| z?7yRLNBa1kksC8(b{b$-h%%;G=XJq=OHxBPk!V@)a3kD9fkzq> zElCKE5<6>~2rKlKDK+k5U3DA={v9)QzC?`MW zrUg((HkP{b2pUzWj;p(poW=O-Tusdu=p!dpc(9kyxxpI_Oh@kZyz*s&PoGd zZ(Y|IpALF?|IUP1urc z8f2s*XdSUKhHb!ODkHv%mt{nz`$B1RB8JeF)MZHpY>SG5kTXe1B4QN=M9Z}hbxdPD z5dA12K*vPPK4Q)6BrFfQjMz*|L5z-W$cW!D+<>9pIuwl&zr-Rc-{g~Iuh{Z5AU7DX zcb4tq{0|OSVe3>>L5EQk!O|`wq)o(rSTM*yfLm_Tp>dk@ss~7mRc*isPu}SoQ^}{j z@z;c+7)b+0bsJaB1?;uK(M_9Chn^KM`!=P-5mWXgaT$zw99%0goipXp$iR($S z0F4=HvLhhSlqdYg80rHLM}@1p`58UQ;pMU4rVBYQZ)FUDb!i%^_wcG1lQw9C@10RW zHm!;6Nf&+44+8)DOB^Z7e~T2n%yCeh?Exhc&8`g1H-oTx);W)!!{x#Hh>uC^p3v~c5qMi ziGOr{*hb}7#pkpMSK_7%nR|1*z&q{Qc&Ch3wfyq>__#=`TE22){PfnfeDtR9eR>$@ z?^@U0EsNtfwXWr#mc%EuuH_v|<1dG8=^b7czdmfEVE&nv@$Qih(?1#i_|FxT7VC+` zxHDev?Ozp-rv=cWHSsUg0BDdWu8)_e0Z@4byxWK!<`oT*#5jE`)FdVF8ZIWAD(*kx zK0j_$IgaGwW`&M#QDD^+VU@;_*OWzDBQw^=Po$UTk!9ny_}X+(`@`Ggxf!Ve@-S^L zr-MG;!OijBX#h0HyYKF}oCZMU-hzAMiL?NkbbowDS^z!$$M|`X2+GC1fQn~{1JSlo zBoS=R2=8aOCOh)E(oS2CT^fNH8C;jtCfr}A6{aN7`;zpcXHv#Z>m)9k+NxzEKrQLe z+r2O^(Hldygz!n*ruVRU$;K6P6Sr$|*PgudYJ5WHVHN z=@NER0c6EJJzTHHwLQ&2b_7R(lS{^R76TqpP3IA6hBzvubWo791*uPL1(%)a4CtAQ zj-8b|w<*bE?UBiSkI39hYbSI%X3ok3e6WnC&PU>P>ZK=7J{d1f1KGV5PsN9(WB$Br zo{ndvxc>#>FiEqz=s26>-Ya%@jYj~lfUDAQ*}#78%J4km(i8%DHDo-H={0;@oEC6! zP4a?dX_h|+VJ#pN1O?{zwU+%?`GaZ1o?~B71k_L<(ektB1 zEr2fFAOCGy0IhvBj+_T+7}~r8aU}AXRdS*|>WibVbkM8LoqN?=3wt{e~DKCT5;R{TfRyK+F-cileixT zHxrWW$hbv;Fm?f-sX8`$7B^?~1qL zy?~86Hly2?6tEeAs;Tii0H|Nq+0P$nB_Iz(g6cb~U*4V9BwGoC5_*L9-Fxxt=%|Lh za-dTxfM8ElMN72>8M%BUBZ(kcnMN}sdKeMKk|`iB8uAX|xM4by!Mhrgrb$Wc7_xz2 zXyiokKxAa?nboh|mmf?|1rzV$kK#4}DR(?_PEIO-DjXyp!uF;ivyO?RC9pv|kf8|U z&|tqt9ttEYl0_J@k!M6hh5=;Hp!vphB#4vXQ8g^eHyU~C(^xOB?34JH{UYnUd7osi z%Oqbs9UDpJz0;wlx!?RvH1FR;n)naRP?-RE6<|U}z7V*1 zT^ET)aGyj+Xbg^>ifi35tKOOEcYsW2B6csQ#8EAwM8?Uq1c`C@5>>>#Cxb`c46HxW z(7tA{DxuQ*rMJS#m^!7h#>I23Vw2QIU57S$44b;W8|;2*7&))dc2hT%3Y| z+dFwy`$*(`9UgH_)hVVx-GpNw8?tKTQWkQ^5hIiCbDKa)JpWa#g@Yj3frG zsUsPUfHYUgVSpG5xHynO0A^<1>o%u-G@}C9fDnIfB4?ZfQX(k}cnlF22-erJi)*;@ zB_T{hKu!(B5+Pw0gq(;pS%xJcCl8K4r269aA6Fm~91m2G@J-PjBqrqH%GO*39u}K- zWE(bYUBP8CD8@h;(hu4Fpu{1%T|~$V{NZHAN15HomfyDTe69m?Hf|i_Hh@C&hM6`} zBZ!9OBESvmpQ=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 \ No newline at end of file +dbt-snowflake>=1.0.0,<2.0.0 +dbt-bigquery>=1.0.0,<2.0.0 +dbt-redshift>=1.0.0,<2.0.0 +dbt-postgres>=1.0.0,<2.0.0 +dbt-spark>=1.0.0,<2.0.0 +dbt-spark[PyHive]>=1.0.0,<2.0.0 \ No newline at end of file From 7830653ed6969e96a867988c62ad423811d78ec5 Mon Sep 17 00:00:00 2001 From: Jamie Rodriguez <65564846+fivetran-jamie@users.noreply.github.com> Date: Thu, 13 Oct 2022 16:22:13 -0700 Subject: [PATCH 12/13] final docs --- docs/catalog.json | 2 +- docs/graph.gpickle | Bin 383143 -> 380947 bytes docs/manifest.json | 2 +- docs/partial_parse.msgpack | Bin 1343656 -> 1341335 bytes docs/run_results.json | 2 +- 5 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/catalog.json b/docs/catalog.json index 33a7a22..4d0a15a 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.2.0", "generated_at": "2022-10-13T23:10:16.707559Z", "invocation_id": "995a6e9b-ac7c-4344-a33a-82df97529d6b", "env": {}}, "nodes": {}, "sources": {"source.klaviyo_source.klaviyo.integration": {"metadata": {"type": "table", "schema": "klaviyo", "name": "integration", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "STRING", "index": 1, "name": "id", "comment": null}, "_fivetran_deleted": {"type": "BOOL", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 3, "name": "_fivetran_synced", "comment": null}, "category": {"type": "STRING", "index": 4, "name": "category", "comment": null}, "name": {"type": "STRING", "index": 5, "name": "name", "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": 63.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.klaviyo_source.klaviyo.integration"}, "source.klaviyo_source.klaviyo.campaign": {"metadata": {"type": "table", "schema": "klaviyo", "name": "campaign", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "STRING", "index": 1, "name": "id", "comment": null}, "_fivetran_deleted": {"type": "BOOL", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 3, "name": "_fivetran_synced", "comment": null}, "campaign_type": {"type": "STRING", "index": 4, "name": "campaign_type", "comment": null}, "created": {"type": "TIMESTAMP", "index": 5, "name": "created", "comment": null}, "email_template_id": {"type": "STRING", "index": 6, "name": "email_template_id", "comment": null}, "from_email": {"type": "STRING", "index": 7, "name": "from_email", "comment": null}, "from_name": {"type": "STRING", "index": 8, "name": "from_name", "comment": null}, "is_segmented": {"type": "BOOL", "index": 9, "name": "is_segmented", "comment": null}, "name": {"type": "STRING", "index": 10, "name": "name", "comment": null}, "send_time": {"type": "TIMESTAMP", "index": 11, "name": "send_time", "comment": null}, "sent_at": {"type": "TIMESTAMP", "index": 12, "name": "sent_at", "comment": null}, "status": {"type": "STRING", "index": 13, "name": "status", "comment": null}, "status_id": {"type": "STRING", "index": 14, "name": "status_id", "comment": null}, "status_label": {"type": "STRING", "index": 15, "name": "status_label", "comment": null}, "subject": {"type": "STRING", "index": 16, "name": "subject", "comment": null}, "updated": {"type": "TIMESTAMP", "index": 17, "name": "updated", "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": 630.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.klaviyo_source.klaviyo.campaign"}, "source.klaviyo_source.klaviyo.event": {"metadata": {"type": "table", "schema": "klaviyo", "name": "event", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "STRING", "index": 1, "name": "id", "comment": null}, "_fivetran_deleted": {"type": "BOOL", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 3, "name": "_fivetran_synced", "comment": null}, "_variation": {"type": "STRING", "index": 4, "name": "_variation", "comment": null}, "campaign_id": {"type": "STRING", "index": 5, "name": "campaign_id", "comment": null}, "datetime": {"type": "TIMESTAMP", "index": 6, "name": "datetime", "comment": null}, "flow_id": {"type": "STRING", "index": 7, "name": "flow_id", "comment": null}, "flow_message_id": {"type": "STRING", "index": 8, "name": "flow_message_id", "comment": null}, "metric_id": {"type": "STRING", "index": 9, "name": "metric_id", "comment": null}, "person_id": {"type": "STRING", "index": 10, "name": "person_id", "comment": null}, "property_attribution": {"type": "STRING", "index": 11, "name": "property_attribution", "comment": null}, "property_campaign_name": {"type": "STRING", "index": 12, "name": "property_campaign_name", "comment": null}, "property_client_name": {"type": "STRING", "index": 13, "name": "property_client_name", "comment": null}, "property_client_os": {"type": "STRING", "index": 14, "name": "property_client_os", "comment": null}, "property_client_os_family": {"type": "STRING", "index": 15, "name": "property_client_os_family", "comment": null}, "property_client_type": {"type": "STRING", "index": 16, "name": "property_client_type", "comment": null}, "property_cohort_message_send_cohort": {"type": "STRING", "index": 17, "name": "property_cohort_message_send_cohort", "comment": null}, "property_email_domain": {"type": "STRING", "index": 18, "name": "property_email_domain", "comment": null}, "property_event_id": {"type": "STRING", "index": 19, "name": "property_event_id", "comment": null}, "property_message_interaction": {"type": "STRING", "index": 20, "name": "property_message_interaction", "comment": null}, "property_subject": {"type": "STRING", "index": 21, "name": "property_subject", "comment": null}, "timestamp": {"type": "TIMESTAMP", "index": 22, "name": "timestamp", "comment": null}, "type": {"type": "STRING", "index": 23, "name": "type", "comment": null}, "uuid": {"type": "STRING", "index": 24, "name": "uuid", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 11.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 3485.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.klaviyo_source.klaviyo.event"}, "source.klaviyo_source.klaviyo.person": {"metadata": {"type": "table", "schema": "klaviyo", "name": "person", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "STRING", "index": 1, "name": "id", "comment": null}, "_fivetran_deleted": {"type": "BOOL", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 3, "name": "_fivetran_synced", "comment": null}, "address_1": {"type": "STRING", "index": 4, "name": "address_1", "comment": null}, "address_2": {"type": "STRING", "index": 5, "name": "address_2", "comment": null}, "city": {"type": "STRING", "index": 6, "name": "city", "comment": null}, "country": {"type": "STRING", "index": 7, "name": "country", "comment": null}, "created": {"type": "TIMESTAMP", "index": 8, "name": "created", "comment": null}, "custom_email": {"type": "STRING", "index": 9, "name": "custom_email", "comment": null}, "custom_object": {"type": "STRING", "index": 10, "name": "custom_object", "comment": null}, "email": {"type": "STRING", "index": 11, "name": "email", "comment": null}, "first_name": {"type": "STRING", "index": 12, "name": "first_name", "comment": null}, "last_name": {"type": "STRING", "index": 13, "name": "last_name", "comment": null}, "latitude": {"type": "FLOAT64", "index": 14, "name": "latitude", "comment": null}, "longitude": {"type": "FLOAT64", "index": 15, "name": "longitude", "comment": null}, "organization": {"type": "STRING", "index": 16, "name": "organization", "comment": null}, "phone_number": {"type": "STRING", "index": 17, "name": "phone_number", "comment": null}, "region": {"type": "STRING", "index": 18, "name": "region", "comment": null}, "timezone": {"type": "STRING", "index": 19, "name": "timezone", "comment": null}, "title": {"type": "STRING", "index": 20, "name": "title", "comment": null}, "updated": {"type": "TIMESTAMP", "index": 21, "name": "updated", "comment": null}, "zip": {"type": "STRING", "index": 22, "name": "zip", "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": 147.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.klaviyo_source.klaviyo.person"}, "source.klaviyo_source.klaviyo.flow": {"metadata": {"type": "table", "schema": "klaviyo", "name": "flow", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "STRING", "index": 1, "name": "id", "comment": null}, "_fivetran_deleted": {"type": "BOOL", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 3, "name": "_fivetran_synced", "comment": null}, "created": {"type": "TIMESTAMP", "index": 4, "name": "created", "comment": null}, "customer_filter": {"type": "STRING", "index": 5, "name": "customer_filter", "comment": null}, "name": {"type": "STRING", "index": 6, "name": "name", "comment": null}, "status": {"type": "STRING", "index": 7, "name": "status", "comment": null}, "trigger": {"type": "STRING", "index": 8, "name": "trigger", "comment": null}, "updated": {"type": "TIMESTAMP", "index": 9, "name": "updated", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 6.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 1022.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.klaviyo_source.klaviyo.flow"}, "source.klaviyo_source.klaviyo.metric": {"metadata": {"type": "table", "schema": "klaviyo", "name": "metric", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "STRING", "index": 1, "name": "id", "comment": null}, "_fivetran_deleted": {"type": "BOOL", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 3, "name": "_fivetran_synced", "comment": null}, "created": {"type": "TIMESTAMP", "index": 4, "name": "created", "comment": null}, "integration_id": {"type": "STRING", "index": 5, "name": "integration_id", "comment": null}, "name": {"type": "STRING", "index": 6, "name": "name", "comment": null}, "updated": {"type": "TIMESTAMP", "index": 7, "name": "updated", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 8.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 455.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.klaviyo_source.klaviyo.metric"}}, "errors": null} \ No newline at end of file +{"metadata": {"dbt_schema_version": "https://schemas.getdbt.com/dbt/catalog/v1.json", "dbt_version": "1.2.0", "generated_at": "2022-10-13T23:21:15.659758Z", "invocation_id": "09cf5607-4d3b-4819-bd09-baa959605110", "env": {}}, "nodes": {"model.klaviyo_source.stg_klaviyo__event_tmp": {"metadata": {"type": "view", "schema": "dbt_test_stg_klaviyo", "name": "stg_klaviyo__event_tmp", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "STRING", "index": 1, "name": "id", "comment": null}, "person_id": {"type": "STRING", "index": 2, "name": "person_id", "comment": null}, "campaign_id": {"type": "STRING", "index": 3, "name": "campaign_id", "comment": null}, "flow_id": {"type": "STRING", "index": 4, "name": "flow_id", "comment": null}, "flow_message_id": {"type": "INT64", "index": 5, "name": "flow_message_id", "comment": null}, "uuid": {"type": "STRING", "index": 6, "name": "uuid", "comment": null}, "datetime": {"type": "STRING", "index": 7, "name": "datetime", "comment": null}, "timestamp": {"type": "STRING", "index": 8, "name": "timestamp", "comment": null}, "_fivetran_deleted": {"type": "BOOL", "index": 9, "name": "_fivetran_deleted", "comment": null}, "metric_id": {"type": "STRING", "index": 10, "name": "metric_id", "comment": null}, "type": {"type": "STRING", "index": 11, "name": "type", "comment": null}, "_variation": {"type": "STRING", "index": 12, "name": "_variation", "comment": null}, "property_value": {"type": "INT64", "index": 13, "name": "property_value", "comment": null}, "property_source_name": {"type": "INT64", "index": 14, "name": "property_source_name", "comment": null}, "property_extra": {"type": "INT64", "index": 15, "name": "property_extra", "comment": null}, "property_shipping_rate": {"type": "INT64", "index": 16, "name": "property_shipping_rate", "comment": null}, "property_items": {"type": "INT64", "index": 17, "name": "property_items", "comment": null}, "property_tags": {"type": "INT64", "index": 18, "name": "property_tags", "comment": null}, "property_item_count": {"type": "INT64", "index": 19, "name": "property_item_count", "comment": null}, "property_collections": {"type": "INT64", "index": 20, "name": "property_collections", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 21, "name": "_fivetran_synced", "comment": null}, "property_currency_code": {"type": "INT64", "index": 22, "name": "property_currency_code", "comment": null}, "property_product_id": {"type": "INT64", "index": 23, "name": "property_product_id", "comment": null}, "property_quantity": {"type": "INT64", "index": 24, "name": "property_quantity", "comment": null}, "property_name": {"type": "INT64", "index": 25, "name": "property_name", "comment": null}, "property_variant_option_title": {"type": "INT64", "index": 26, "name": "property_variant_option_title", "comment": null}, "property_sku": {"type": "INT64", "index": 27, "name": "property_sku", "comment": null}, "property_variant_name": {"type": "INT64", "index": 28, "name": "property_variant_name", "comment": null}, "property_vendor": {"type": "INT64", "index": 29, "name": "property_vendor", "comment": null}, "property_event_id": {"type": "STRING", "index": 30, "name": "property_event_id", "comment": null}, "property_total_discounts": {"type": "INT64", "index": 31, "name": "property_total_discounts", "comment": null}, "property_attribution": {"type": "INT64", "index": 32, "name": "property_attribution", "comment": null}, "property_discount_codes": {"type": "INT64", "index": 33, "name": "property_discount_codes", "comment": null}, "property_fulfillment_hours": {"type": "INT64", "index": 34, "name": "property_fulfillment_hours", "comment": null}, "property_fulfillment_status": {"type": "INT64", "index": 35, "name": "property_fulfillment_status", "comment": null}, "property_subject": {"type": "STRING", "index": 36, "name": "property_subject", "comment": null}, "property_title": {"type": "INT64", "index": 37, "name": "property_title", "comment": null}, "property_message_interaction": {"type": "INT64", "index": 38, "name": "property_message_interaction", "comment": null}, "property_url": {"type": "INT64", "index": 39, "name": "property_url", "comment": null}, "property_shipment_type": {"type": "INT64", "index": 40, "name": "property_shipment_type", "comment": null}, "property_courier_name": {"type": "INT64", "index": 41, "name": "property_courier_name", "comment": null}, "property_current_status": {"type": "INT64", "index": 42, "name": "property_current_status", "comment": null}, "property_tracking_ship_date": {"type": "INT64", "index": 43, "name": "property_tracking_ship_date", "comment": null}, "property_tracking_postal_code": {"type": "INT64", "index": 44, "name": "property_tracking_postal_code", "comment": null}, "property_shipment_package_count": {"type": "INT64", "index": 45, "name": "property_shipment_package_count", "comment": null}, "property_campaign_name": {"type": "STRING", "index": 46, "name": "property_campaign_name", "comment": null}, "property_cohort_message_send_cohort": {"type": "STRING", "index": 47, "name": "property_cohort_message_send_cohort", "comment": null}, "property_email_domain": {"type": "STRING", "index": 48, "name": "property_email_domain", "comment": null}, "property_bounce_type": {"type": "INT64", "index": 49, "name": "property_bounce_type", "comment": null}, "property_client_type": {"type": "INT64", "index": 50, "name": "property_client_type", "comment": null}, "property_client_os": {"type": "INT64", "index": 51, "name": "property_client_os", "comment": null}, "property_client_name": {"type": "INT64", "index": 52, "name": "property_client_name", "comment": null}, "property_client_os_family": {"type": "INT64", "index": 53, "name": "property_client_os_family", "comment": null}, "property_client_canonical": {"type": "INT64", "index": 54, "name": "property_client_canonical", "comment": null}, "property_page": {"type": "INT64", "index": 55, "name": "property_page", "comment": null}, "property_is_session_activity": {"type": "INT64", "index": 56, "name": "property_is_session_activity", "comment": null}, "property_os": {"type": "INT64", "index": 57, "name": "property_os", "comment": null}, "property_session_end": {"type": "INT64", "index": 58, "name": "property_session_end", "comment": null}, "property_browser": {"type": "INT64", "index": 59, "name": "property_browser", "comment": null}, "property_list": {"type": "INT64", "index": 60, "name": "property_list", "comment": null}, "property_compare_at_price": {"type": "INT64", "index": 61, "name": "property_compare_at_price", "comment": null}, "property_price": {"type": "INT64", "index": 62, "name": "property_price", "comment": null}, "property_image_url": {"type": "INT64", "index": 63, "name": "property_image_url", "comment": null}, "property_brand": {"type": "INT64", "index": 64, "name": "property_brand", "comment": null}, "property_categories": {"type": "INT64", "index": 65, "name": "property_categories", "comment": null}, "property_variant_option_size": {"type": "INT64", "index": 66, "name": "property_variant_option_size", "comment": null}, "property_attribute_workout": {"type": "INT64", "index": 67, "name": "property_attribute_workout", "comment": null}, "property_attribute_age": {"type": "INT64", "index": 68, "name": "property_attribute_age", "comment": null}, "property_attribute_fitness_goal": {"type": "INT64", "index": 69, "name": "property_attribute_fitness_goal", "comment": null}, "property_attribute_breakfast": {"type": "INT64", "index": 70, "name": "property_attribute_breakfast", "comment": null}, "property_variant_option_type": {"type": "INT64", "index": 71, "name": "property_variant_option_type", "comment": null}, "property_cohort_variation_send_cohort": {"type": "STRING", "index": 72, "name": "property_cohort_variation_send_cohort", "comment": null}, "property_method": {"type": "INT64", "index": 73, "name": "property_method", "comment": null}, "property_to_number": {"type": "INT64", "index": 74, "name": "property_to_number", "comment": null}, "property_message_type": {"type": "INT64", "index": 75, "name": "property_message_type", "comment": null}, "property_from_number": {"type": "INT64", "index": 76, "name": "property_from_number", "comment": null}, "property_message_format": {"type": "INT64", "index": 77, "name": "property_message_format", "comment": null}, "property_message_name": {"type": "INT64", "index": 78, "name": "property_message_name", "comment": null}, "property_carrier_delivery_status": {"type": "INT64", "index": 79, "name": "property_carrier_delivery_status", "comment": null}, "property_failure_type": {"type": "INT64", "index": 80, "name": "property_failure_type", "comment": null}, "property_failure_source": {"type": "INT64", "index": 81, "name": "property_failure_source", "comment": null}, "property_message_body": {"type": "INT64", "index": 82, "name": "property_message_body", "comment": null}, "property_email": {"type": "INT64", "index": 83, "name": "property_email", "comment": null}, "property_attribute_kit": {"type": "INT64", "index": 84, "name": "property_attribute_kit", "comment": null}, "property_vendor_error_code": {"type": "INT64", "index": 85, "name": "property_vendor_error_code", "comment": null}, "property_ordr_details": {"type": "INT64", "index": 86, "name": "property_ordr_details", "comment": null}, "property_date_to_send_gift": {"type": "INT64", "index": 87, "name": "property_date_to_send_gift", "comment": null}, "property_recipient_name": {"type": "INT64", "index": 88, "name": "property_recipient_name", "comment": null}, "property_attribute_facebook_order_retailer_id": {"type": "INT64", "index": 89, "name": "property_attribute_facebook_order_retailer_id", "comment": null}, "property_sender_s_name": {"type": "INT64", "index": 90, "name": "property_sender_s_name", "comment": null}, "property_attribute_kitid": {"type": "INT64", "index": 91, "name": "property_attribute_kitid", "comment": null}, "property_conversation_id": {"type": "INT64", "index": 92, "name": "property_conversation_id", "comment": null}, "property_conversation_link": {"type": "INT64", "index": 93, "name": "property_conversation_link", "comment": null}, "property_conversation_channel": {"type": "INT64", "index": 94, "name": "property_conversation_channel", "comment": null}, "property_rating": {"type": "INT64", "index": 95, "name": "property_rating", "comment": null}, "property_score": {"type": "INT64", "index": 96, "name": "property_score", "comment": null}, "property_from_phone_region": {"type": "INT64", "index": 97, "name": "property_from_phone_region", "comment": null}, "property_shipment_carrier": {"type": "INT64", "index": 98, "name": "property_shipment_carrier", "comment": null}, "property_shipment_status": {"type": "INT64", "index": 99, "name": "property_shipment_status", "comment": null}, "property_to_phone_region": {"type": "INT64", "index": 100, "name": "property_to_phone_region", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.klaviyo_source.stg_klaviyo__event_tmp"}, "model.klaviyo_source.stg_klaviyo__person": {"metadata": {"type": "table", "schema": "dbt_test_stg_klaviyo", "name": "stg_klaviyo__person", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"person_id": {"type": "STRING", "index": 1, "name": "person_id", "comment": null}, "address_1": {"type": "STRING", "index": 2, "name": "address_1", "comment": null}, "address_2": {"type": "INT64", "index": 3, "name": "address_2", "comment": null}, "city": {"type": "STRING", "index": 4, "name": "city", "comment": null}, "country": {"type": "STRING", "index": 5, "name": "country", "comment": null}, "zip": {"type": "INT64", "index": 6, "name": "zip", "comment": null}, "created_at": {"type": "STRING", "index": 7, "name": "created_at", "comment": null}, "email": {"type": "STRING", "index": 8, "name": "email", "comment": null}, "full_name": {"type": "STRING", "index": 9, "name": "full_name", "comment": null}, "latitude": {"type": "FLOAT64", "index": 10, "name": "latitude", "comment": null}, "longitude": {"type": "FLOAT64", "index": 11, "name": "longitude", "comment": null}, "organization": {"type": "INT64", "index": 12, "name": "organization", "comment": null}, "phone_number": {"type": "STRING", "index": 13, "name": "phone_number", "comment": null}, "region": {"type": "STRING", "index": 14, "name": "region", "comment": null}, "timezone": {"type": "STRING", "index": 15, "name": "timezone", "comment": null}, "title": {"type": "INT64", "index": 16, "name": "title", "comment": null}, "updated_at": {"type": "STRING", "index": 17, "name": "updated_at", "comment": null}, "source_relation": {"type": "STRING", "index": 18, "name": "source_relation", "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": 385.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.klaviyo_source.stg_klaviyo__person"}, "model.klaviyo_source.stg_klaviyo__event": {"metadata": {"type": "table", "schema": "dbt_test_stg_klaviyo", "name": "stg_klaviyo__event", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"variation_id": {"type": "STRING", "index": 1, "name": "variation_id", "comment": null}, "campaign_id": {"type": "STRING", "index": 2, "name": "campaign_id", "comment": null}, "occurred_at": {"type": "TIMESTAMP", "index": 3, "name": "occurred_at", "comment": null}, "flow_id": {"type": "STRING", "index": 4, "name": "flow_id", "comment": null}, "flow_message_id": {"type": "INT64", "index": 5, "name": "flow_message_id", "comment": null}, "event_id": {"type": "STRING", "index": 6, "name": "event_id", "comment": null}, "metric_id": {"type": "STRING", "index": 7, "name": "metric_id", "comment": null}, "person_id": {"type": "STRING", "index": 8, "name": "person_id", "comment": null}, "type": {"type": "STRING", "index": 9, "name": "type", "comment": null}, "uuid": {"type": "STRING", "index": 10, "name": "uuid", "comment": null}, "numeric_value": {"type": "INT64", "index": 11, "name": "numeric_value", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 12, "name": "_fivetran_synced", "comment": null}, "source_relation": {"type": "STRING", "index": 13, "name": "source_relation", "comment": null}, "occurred_on": {"type": "DATE", "index": 14, "name": "occurred_on", "comment": null}, "unique_event_id": {"type": "STRING", "index": 15, "name": "unique_event_id", "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": 312.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.klaviyo_source.stg_klaviyo__event"}, "model.klaviyo_source.stg_klaviyo__metric_tmp": {"metadata": {"type": "view", "schema": "dbt_test_stg_klaviyo", "name": "stg_klaviyo__metric_tmp", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "STRING", "index": 1, "name": "id", "comment": null}, "name": {"type": "STRING", "index": 2, "name": "name", "comment": null}, "integration_id": {"type": "STRING", "index": 3, "name": "integration_id", "comment": null}, "created": {"type": "STRING", "index": 4, "name": "created", "comment": null}, "updated": {"type": "STRING", "index": 5, "name": "updated", "comment": null}, "_fivetran_deleted": {"type": "BOOL", "index": 6, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 7, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.klaviyo_source.stg_klaviyo__metric_tmp"}, "model.klaviyo_source.stg_klaviyo__campaign": {"metadata": {"type": "table", "schema": "dbt_test_stg_klaviyo", "name": "stg_klaviyo__campaign", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"campaign_type": {"type": "STRING", "index": 1, "name": "campaign_type", "comment": null}, "created_at": {"type": "STRING", "index": 2, "name": "created_at", "comment": null}, "email_template_id": {"type": "STRING", "index": 3, "name": "email_template_id", "comment": null}, "from_email": {"type": "STRING", "index": 4, "name": "from_email", "comment": null}, "from_name": {"type": "STRING", "index": 5, "name": "from_name", "comment": null}, "campaign_id": {"type": "STRING", "index": 6, "name": "campaign_id", "comment": null}, "is_segmented": {"type": "BOOL", "index": 7, "name": "is_segmented", "comment": null}, "campaign_name": {"type": "STRING", "index": 8, "name": "campaign_name", "comment": null}, "scheduled_to_send_at": {"type": "STRING", "index": 9, "name": "scheduled_to_send_at", "comment": null}, "sent_at": {"type": "STRING", "index": 10, "name": "sent_at", "comment": null}, "status": {"type": "STRING", "index": 11, "name": "status", "comment": null}, "status_id": {"type": "INT64", "index": 12, "name": "status_id", "comment": null}, "subject": {"type": "STRING", "index": 13, "name": "subject", "comment": null}, "updated_at": {"type": "STRING", "index": 14, "name": "updated_at", "comment": null}, "source_relation": {"type": "STRING", "index": 15, "name": "source_relation", "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": 335.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.klaviyo_source.stg_klaviyo__campaign"}, "model.klaviyo_source.stg_klaviyo__campaign_tmp": {"metadata": {"type": "view", "schema": "dbt_test_stg_klaviyo", "name": "stg_klaviyo__campaign_tmp", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "STRING", "index": 1, "name": "id", "comment": null}, "from_name": {"type": "STRING", "index": 2, "name": "from_name", "comment": null}, "status_id": {"type": "INT64", "index": 3, "name": "status_id", "comment": null}, "is_segmented": {"type": "BOOL", "index": 4, "name": "is_segmented", "comment": null}, "campaign_type": {"type": "STRING", "index": 5, "name": "campaign_type", "comment": null}, "status_label": {"type": "STRING", "index": 6, "name": "status_label", "comment": null}, "from_email": {"type": "STRING", "index": 7, "name": "from_email", "comment": null}, "subject": {"type": "STRING", "index": 8, "name": "subject", "comment": null}, "name": {"type": "STRING", "index": 9, "name": "name", "comment": null}, "status": {"type": "STRING", "index": 10, "name": "status", "comment": null}, "created": {"type": "STRING", "index": 11, "name": "created", "comment": null}, "updated": {"type": "STRING", "index": 12, "name": "updated", "comment": null}, "send_time": {"type": "STRING", "index": 13, "name": "send_time", "comment": null}, "sent_at": {"type": "STRING", "index": 14, "name": "sent_at", "comment": null}, "_fivetran_deleted": {"type": "BOOL", "index": 15, "name": "_fivetran_deleted", "comment": null}, "email_template_id": {"type": "STRING", "index": 16, "name": "email_template_id", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 17, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.klaviyo_source.stg_klaviyo__campaign_tmp"}, "model.klaviyo_source.stg_klaviyo__flow": {"metadata": {"type": "table", "schema": "dbt_test_stg_klaviyo", "name": "stg_klaviyo__flow", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"created_at": {"type": "STRING", "index": 1, "name": "created_at", "comment": null}, "flow_id": {"type": "STRING", "index": 2, "name": "flow_id", "comment": null}, "flow_name": {"type": "STRING", "index": 3, "name": "flow_name", "comment": null}, "status": {"type": "STRING", "index": 4, "name": "status", "comment": null}, "flow_trigger": {"type": "STRING", "index": 5, "name": "flow_trigger", "comment": null}, "updated_at": {"type": "STRING", "index": 6, "name": "updated_at", "comment": null}, "person_filter": {"type": "STRING", "index": 7, "name": "person_filter", "comment": null}, "source_relation": {"type": "STRING", "index": 8, "name": "source_relation", "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": 592.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.klaviyo_source.stg_klaviyo__flow"}, "model.klaviyo_source.stg_klaviyo__integration": {"metadata": {"type": "table", "schema": "dbt_test_stg_klaviyo", "name": "stg_klaviyo__integration", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"category": {"type": "STRING", "index": 1, "name": "category", "comment": null}, "integration_id": {"type": "STRING", "index": 2, "name": "integration_id", "comment": null}, "integration_name": {"type": "STRING", "index": 3, "name": "integration_name", "comment": null}, "source_relation": {"type": "STRING", "index": 4, "name": "source_relation", "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": 58.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.klaviyo_source.stg_klaviyo__integration"}, "model.klaviyo_source.stg_klaviyo__flow_tmp": {"metadata": {"type": "view", "schema": "dbt_test_stg_klaviyo", "name": "stg_klaviyo__flow_tmp", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "STRING", "index": 1, "name": "id", "comment": null}, "name": {"type": "STRING", "index": 2, "name": "name", "comment": null}, "status": {"type": "STRING", "index": 3, "name": "status", "comment": null}, "created": {"type": "STRING", "index": 4, "name": "created", "comment": null}, "updated": {"type": "STRING", "index": 5, "name": "updated", "comment": null}, "customer_filter": {"type": "STRING", "index": 6, "name": "customer_filter", "comment": null}, "trigger": {"type": "STRING", "index": 7, "name": "trigger", "comment": null}, "_fivetran_deleted": {"type": "BOOL", "index": 8, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 9, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.klaviyo_source.stg_klaviyo__flow_tmp"}, "model.klaviyo_source.stg_klaviyo__metric": {"metadata": {"type": "table", "schema": "dbt_test_stg_klaviyo", "name": "stg_klaviyo__metric", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"created_at": {"type": "STRING", "index": 1, "name": "created_at", "comment": null}, "metric_id": {"type": "STRING", "index": 2, "name": "metric_id", "comment": null}, "integration_id": {"type": "STRING", "index": 3, "name": "integration_id", "comment": null}, "metric_name": {"type": "STRING", "index": 4, "name": "metric_name", "comment": null}, "updated_at": {"type": "STRING", "index": 5, "name": "updated_at", "comment": null}, "source_relation": {"type": "STRING", "index": 6, "name": "source_relation", "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": 167.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.klaviyo_source.stg_klaviyo__metric"}, "model.klaviyo_source.stg_klaviyo__person_tmp": {"metadata": {"type": "view", "schema": "dbt_test_stg_klaviyo", "name": "stg_klaviyo__person_tmp", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "STRING", "index": 1, "name": "id", "comment": null}, "updated": {"type": "STRING", "index": 2, "name": "updated", "comment": null}, "created": {"type": "STRING", "index": 3, "name": "created", "comment": null}, "_fivetran_deleted": {"type": "BOOL", "index": 4, "name": "_fivetran_deleted", "comment": null}, "first_name": {"type": "STRING", "index": 5, "name": "first_name", "comment": null}, "last_name": {"type": "STRING", "index": 6, "name": "last_name", "comment": null}, "address_1": {"type": "STRING", "index": 7, "name": "address_1", "comment": null}, "address_2": {"type": "INT64", "index": 8, "name": "address_2", "comment": null}, "title": {"type": "INT64", "index": 9, "name": "title", "comment": null}, "timezone": {"type": "STRING", "index": 10, "name": "timezone", "comment": null}, "organization": {"type": "INT64", "index": 11, "name": "organization", "comment": null}, "region": {"type": "STRING", "index": 12, "name": "region", "comment": null}, "longitude": {"type": "FLOAT64", "index": 13, "name": "longitude", "comment": null}, "latitude": {"type": "FLOAT64", "index": 14, "name": "latitude", "comment": null}, "phone_number": {"type": "STRING", "index": 15, "name": "phone_number", "comment": null}, "country": {"type": "STRING", "index": 16, "name": "country", "comment": null}, "zip": {"type": "INT64", "index": 17, "name": "zip", "comment": null}, "city": {"type": "STRING", "index": 18, "name": "city", "comment": null}, "email": {"type": "STRING", "index": 19, "name": "email", "comment": null}, "custom_object": {"type": "STRING", "index": 20, "name": "custom_object", "comment": null}, "custom_email": {"type": "STRING", "index": 21, "name": "custom_email", "comment": null}, "custom_accepts_marketing": {"type": "BOOL", "index": 22, "name": "custom_accepts_marketing", "comment": null}, "custom_shopify_tags": {"type": "STRING", "index": 23, "name": "custom_shopify_tags", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 24, "name": "_fivetran_synced", "comment": null}, "custom_consent_form_id": {"type": "STRING", "index": 25, "name": "custom_consent_form_id", "comment": null}, "custom_source": {"type": "STRING", "index": 26, "name": "custom_source", "comment": null}, "custom_consent_method": {"type": "STRING", "index": 27, "name": "custom_consent_method", "comment": null}, "custom_consent": {"type": "INT64", "index": 28, "name": "custom_consent", "comment": null}, "custom_gift_giver_name": {"type": "INT64", "index": 29, "name": "custom_gift_giver_name", "comment": null}, "custom_state": {"type": "INT64", "index": 30, "name": "custom_state", "comment": null}, "custom_flow": {"type": "INT64", "index": 31, "name": "custom_flow", "comment": null}, "custom_gift_recipient_name": {"type": "INT64", "index": 32, "name": "custom_gift_recipient_name", "comment": null}, "custom_last_sign_in": {"type": "INT64", "index": 33, "name": "custom_last_sign_in", "comment": null}, "custom_consent_form_version": {"type": "INT64", "index": 34, "name": "custom_consent_form_version", "comment": null}, "custom_consent_timestamp": {"type": "INT64", "index": 35, "name": "custom_consent_timestamp", "comment": null}, "custom_mail_chimp_rating": {"type": "INT64", "index": 36, "name": "custom_mail_chimp_rating", "comment": null}, "custom_gift_recipient_email": {"type": "INT64", "index": 37, "name": "custom_gift_recipient_email", "comment": null}, "custom_gift_options": {"type": "INT64", "index": 38, "name": "custom_gift_options", "comment": null}, "custom_address": {"type": "INT64", "index": 39, "name": "custom_address", "comment": null}, "custom_subscription_expiration": {"type": "INT64", "index": 40, "name": "custom_subscription_expiration", "comment": null}, "custom_city": {"type": "INT64", "index": 41, "name": "custom_city", "comment": null}, "custom_address_line_2": {"type": "INT64", "index": 42, "name": "custom_address_line_2", "comment": null}, "custom_zipcode": {"type": "INT64", "index": 43, "name": "custom_zipcode", "comment": null}, "custom_expected_date_of_next_order": {"type": "STRING", "index": 44, "name": "custom_expected_date_of_next_order", "comment": null}, "custom_sms_attentive_signup": {"type": "INT64", "index": 45, "name": "custom_sms_attentive_signup", "comment": null}, "custom_phone": {"type": "INT64", "index": 46, "name": "custom_phone", "comment": null}, "custom_afterpay_order": {"type": "INT64", "index": 47, "name": "custom_afterpay_order", "comment": null}, "custom_phone_number_region": {"type": "STRING", "index": 48, "name": "custom_phone_number_region", "comment": null}, "custom_name": {"type": "INT64", "index": 49, "name": "custom_name", "comment": null}, "custom_referrer_name": {"type": "INT64", "index": 50, "name": "custom_referrer_name", "comment": null}, "custom_referrer_email": {"type": "INT64", "index": 51, "name": "custom_referrer_email", "comment": null}, "custom_birthday": {"type": "INT64", "index": 52, "name": "custom_birthday", "comment": null}, "custom_first_purchase_date_": {"type": "DATE", "index": 53, "name": "custom_first_purchase_date_", "comment": null}, "custom_unengaged": {"type": "INT64", "index": 54, "name": "custom_unengaged", "comment": null}, "custom_landing_page_tag": {"type": "INT64", "index": 55, "name": "custom_landing_page_tag", "comment": null}, "custom_fitness_goal": {"type": "INT64", "index": 56, "name": "custom_fitness_goal", "comment": null}, "custom_age": {"type": "INT64", "index": 57, "name": "custom_age", "comment": null}, "custom_workout": {"type": "INT64", "index": 58, "name": "custom_workout", "comment": null}, "custom_quiz": {"type": "INT64", "index": 59, "name": "custom_quiz", "comment": null}, "custom_breakfast": {"type": "INT64", "index": 60, "name": "custom_breakfast", "comment": null}, "custom_quiz_data": {"type": "INT64", "index": 61, "name": "custom_quiz_data", "comment": null}, "custom_raf_subscribe": {"type": "INT64", "index": 62, "name": "custom_raf_subscribe", "comment": null}, "custom_suppress": {"type": "INT64", "index": 63, "name": "custom_suppress", "comment": null}, "custom_sms_consent": {"type": "INT64", "index": 64, "name": "custom_sms_consent", "comment": null}, "custom_gift_option_dreambelt": {"type": "INT64", "index": 65, "name": "custom_gift_option_dreambelt", "comment": null}, "custom_gift_option_starter": {"type": "INT64", "index": 66, "name": "custom_gift_option_starter", "comment": null}, "custom_gift_option_machine": {"type": "INT64", "index": 67, "name": "custom_gift_option_machine", "comment": null}, "custom_landingpage_tag": {"type": "INT64", "index": 68, "name": "custom_landingpage_tag", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.klaviyo_source.stg_klaviyo__person_tmp"}, "model.klaviyo_source.stg_klaviyo__integration_tmp": {"metadata": {"type": "view", "schema": "dbt_test_stg_klaviyo", "name": "stg_klaviyo__integration_tmp", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "STRING", "index": 1, "name": "id", "comment": null}, "category": {"type": "STRING", "index": 2, "name": "category", "comment": null}, "name": {"type": "STRING", "index": 3, "name": "name", "comment": null}, "_fivetran_deleted": {"type": "BOOL", "index": 4, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 5, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.klaviyo_source.stg_klaviyo__integration_tmp"}, "model.shopify_source.stg_shopify__customer_tmp": {"metadata": {"type": "view", "schema": "dbt_test_stg_shopify", "name": "stg_shopify__customer_tmp", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "first_name": {"type": "STRING", "index": 2, "name": "first_name", "comment": null}, "last_name": {"type": "STRING", "index": 3, "name": "last_name", "comment": null}, "email": {"type": "STRING", "index": 4, "name": "email", "comment": null}, "phone": {"type": "INT64", "index": 5, "name": "phone", "comment": null}, "state": {"type": "STRING", "index": 6, "name": "state", "comment": null}, "orders_count": {"type": "INT64", "index": 7, "name": "orders_count", "comment": null}, "total_spent": {"type": "FLOAT64", "index": 8, "name": "total_spent", "comment": null}, "created_at": {"type": "TIMESTAMP", "index": 9, "name": "created_at", "comment": null}, "updated_at": {"type": "TIMESTAMP", "index": 10, "name": "updated_at", "comment": null}, "accepts_marketing": {"type": "BOOL", "index": 11, "name": "accepts_marketing", "comment": null}, "tax_exempt": {"type": "BOOL", "index": 12, "name": "tax_exempt", "comment": null}, "verified_email": {"type": "BOOL", "index": 13, "name": "verified_email", "comment": null}, "default_address_id": {"type": "INT64", "index": 14, "name": "default_address_id", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 15, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.shopify_source.stg_shopify__customer_tmp"}, "model.shopify_source.stg_shopify__customer": {"metadata": {"type": "table", "schema": "dbt_test_stg_shopify", "name": "stg_shopify__customer", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"_fivetran_synced": {"type": "TIMESTAMP", "index": 1, "name": "_fivetran_synced", "comment": null}, "has_accepted_marketing": {"type": "BOOL", "index": 2, "name": "has_accepted_marketing", "comment": null}, "created_timestamp": {"type": "TIMESTAMP", "index": 3, "name": "created_timestamp", "comment": null}, "default_address_id": {"type": "INT64", "index": 4, "name": "default_address_id", "comment": null}, "email": {"type": "STRING", "index": 5, "name": "email", "comment": null}, "first_name": {"type": "STRING", "index": 6, "name": "first_name", "comment": null}, "customer_id": {"type": "INT64", "index": 7, "name": "customer_id", "comment": null}, "last_name": {"type": "STRING", "index": 8, "name": "last_name", "comment": null}, "orders_count": {"type": "INT64", "index": 9, "name": "orders_count", "comment": null}, "phone": {"type": "INT64", "index": 10, "name": "phone", "comment": null}, "account_state": {"type": "STRING", "index": 11, "name": "account_state", "comment": null}, "is_tax_exempt": {"type": "BOOL", "index": 12, "name": "is_tax_exempt", "comment": null}, "total_spent": {"type": "FLOAT64", "index": 13, "name": "total_spent", "comment": null}, "updated_timestamp": {"type": "TIMESTAMP", "index": 14, "name": "updated_timestamp", "comment": null}, "is_verified_email": {"type": "BOOL", "index": 15, "name": "is_verified_email", "comment": null}, "source_relation": {"type": "STRING", "index": 16, "name": "source_relation", "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": 518.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.shopify_source.stg_shopify__customer"}, "model.shopify_source.stg_shopify__order_line": {"metadata": {"type": "table", "schema": "dbt_test_stg_shopify", "name": "stg_shopify__order_line", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"_fivetran_synced": {"type": "TIMESTAMP", "index": 1, "name": "_fivetran_synced", "comment": null}, "fulfillable_quantity": {"type": "INT64", "index": 2, "name": "fulfillable_quantity", "comment": null}, "fulfillment_service": {"type": "STRING", "index": 3, "name": "fulfillment_service", "comment": null}, "fulfillment_status": {"type": "STRING", "index": 4, "name": "fulfillment_status", "comment": null}, "is_gift_card": {"type": "BOOL", "index": 5, "name": "is_gift_card", "comment": null}, "grams": {"type": "INT64", "index": 6, "name": "grams", "comment": null}, "order_line_id": {"type": "INT64", "index": 7, "name": "order_line_id", "comment": null}, "index": {"type": "INT64", "index": 8, "name": "index", "comment": null}, "name": {"type": "STRING", "index": 9, "name": "name", "comment": null}, "order_id": {"type": "INT64", "index": 10, "name": "order_id", "comment": null}, "pre_tax_price": {"type": "INT64", "index": 11, "name": "pre_tax_price", "comment": null}, "price": {"type": "FLOAT64", "index": 12, "name": "price", "comment": null}, "product_id": {"type": "INT64", "index": 13, "name": "product_id", "comment": null}, "property_charge_interval_frequency": {"type": "NUMERIC", "index": 14, "name": "property_charge_interval_frequency", "comment": null}, "property_for_shipping_jan_3_rd_2020": {"type": "STRING", "index": 15, "name": "property_for_shipping_jan_3_rd_2020", "comment": null}, "property_shipping_interval_frequency": {"type": "NUMERIC", "index": 16, "name": "property_shipping_interval_frequency", "comment": null}, "property_shipping_interval_unit_type": {"type": "STRING", "index": 17, "name": "property_shipping_interval_unit_type", "comment": null}, "property_subscription_id": {"type": "NUMERIC", "index": 18, "name": "property_subscription_id", "comment": null}, "quantity": {"type": "INT64", "index": 19, "name": "quantity", "comment": null}, "is_requiring_shipping": {"type": "BOOL", "index": 20, "name": "is_requiring_shipping", "comment": null}, "sku": {"type": "STRING", "index": 21, "name": "sku", "comment": null}, "is_taxable": {"type": "BOOL", "index": 22, "name": "is_taxable", "comment": null}, "title": {"type": "STRING", "index": 23, "name": "title", "comment": null}, "total_discount": {"type": "INT64", "index": 24, "name": "total_discount", "comment": null}, "variant_id": {"type": "INT64", "index": 25, "name": "variant_id", "comment": null}, "vendor": {"type": "STRING", "index": 26, "name": "vendor", "comment": null}, "source_relation": {"type": "STRING", "index": 27, "name": "source_relation", "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": 733.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.shopify_source.stg_shopify__order_line"}, "model.shopify_source.stg_shopify__order_line_refund_tmp": {"metadata": {"type": "view", "schema": "dbt_test_stg_shopify", "name": "stg_shopify__order_line_refund_tmp", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "location_id": {"type": "INT64", "index": 2, "name": "location_id", "comment": null}, "refund_id": {"type": "INT64", "index": 3, "name": "refund_id", "comment": null}, "restock_type": {"type": "INT64", "index": 4, "name": "restock_type", "comment": null}, "quantity": {"type": "INT64", "index": 5, "name": "quantity", "comment": null}, "order_line_id": {"type": "INT64", "index": 6, "name": "order_line_id", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 7, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.shopify_source.stg_shopify__order_line_refund_tmp"}, "model.shopify_source.stg_shopify__order_line_tmp": {"metadata": {"type": "view", "schema": "dbt_test_stg_shopify", "name": "stg_shopify__order_line_tmp", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"order_id": {"type": "INT64", "index": 1, "name": "order_id", "comment": null}, "id": {"type": "INT64", "index": 2, "name": "id", "comment": null}, "product_id": {"type": "INT64", "index": 3, "name": "product_id", "comment": null}, "variant_id": {"type": "INT64", "index": 4, "name": "variant_id", "comment": null}, "name": {"type": "STRING", "index": 5, "name": "name", "comment": null}, "title": {"type": "STRING", "index": 6, "name": "title", "comment": null}, "vendor": {"type": "STRING", "index": 7, "name": "vendor", "comment": null}, "price": {"type": "FLOAT64", "index": 8, "name": "price", "comment": null}, "quantity": {"type": "INT64", "index": 9, "name": "quantity", "comment": null}, "grams": {"type": "INT64", "index": 10, "name": "grams", "comment": null}, "sku": {"type": "STRING", "index": 11, "name": "sku", "comment": null}, "fulfillable_quantity": {"type": "INT64", "index": 12, "name": "fulfillable_quantity", "comment": null}, "fulfillment_service": {"type": "STRING", "index": 13, "name": "fulfillment_service", "comment": null}, "gift_card": {"type": "BOOL", "index": 14, "name": "gift_card", "comment": null}, "requires_shipping": {"type": "BOOL", "index": 15, "name": "requires_shipping", "comment": null}, "taxable": {"type": "BOOL", "index": 16, "name": "taxable", "comment": null}, "index": {"type": "INT64", "index": 17, "name": "index", "comment": null}, "total_discount": {"type": "INT64", "index": 18, "name": "total_discount", "comment": null}, "pre_tax_price": {"type": "INT64", "index": 19, "name": "pre_tax_price", "comment": null}, "fulfillment_status": {"type": "STRING", "index": 20, "name": "fulfillment_status", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 21, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.shopify_source.stg_shopify__order_line_tmp"}, "model.shopify_source.stg_shopify__product_variant_tmp": {"metadata": {"type": "view", "schema": "dbt_test_stg_shopify", "name": "stg_shopify__product_variant_tmp", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "product_id": {"type": "INT64", "index": 2, "name": "product_id", "comment": null}, "inventory_item_id": {"type": "INT64", "index": 3, "name": "inventory_item_id", "comment": null}, "title": {"type": "STRING", "index": 4, "name": "title", "comment": null}, "price": {"type": "INT64", "index": 5, "name": "price", "comment": null}, "sku": {"type": "INT64", "index": 6, "name": "sku", "comment": null}, "position": {"type": "INT64", "index": 7, "name": "position", "comment": null}, "inventory_policy": {"type": "STRING", "index": 8, "name": "inventory_policy", "comment": null}, "compare_at_price": {"type": "INT64", "index": 9, "name": "compare_at_price", "comment": null}, "fulfillment_service": {"type": "STRING", "index": 10, "name": "fulfillment_service", "comment": null}, "inventory_management": {"type": "STRING", "index": 11, "name": "inventory_management", "comment": null}, "created_at": {"type": "STRING", "index": 12, "name": "created_at", "comment": null}, "updated_at": {"type": "STRING", "index": 13, "name": "updated_at", "comment": null}, "taxable": {"type": "BOOL", "index": 14, "name": "taxable", "comment": null}, "barcode": {"type": "INT64", "index": 15, "name": "barcode", "comment": null}, "grams": {"type": "INT64", "index": 16, "name": "grams", "comment": null}, "image_id": {"type": "INT64", "index": 17, "name": "image_id", "comment": null}, "inventory_quantity": {"type": "INT64", "index": 18, "name": "inventory_quantity", "comment": null}, "weight": {"type": "INT64", "index": 19, "name": "weight", "comment": null}, "weight_unit": {"type": "STRING", "index": 20, "name": "weight_unit", "comment": null}, "old_inventory_quantity": {"type": "INT64", "index": 21, "name": "old_inventory_quantity", "comment": null}, "requires_shipping": {"type": "BOOL", "index": 22, "name": "requires_shipping", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 23, "name": "_fivetran_synced", "comment": null}, "option_2": {"type": "INT64", "index": 24, "name": "option_2", "comment": null}, "tax_code": {"type": "STRING", "index": 25, "name": "tax_code", "comment": null}, "option_3": {"type": "INT64", "index": 26, "name": "option_3", "comment": null}, "option_1": {"type": "STRING", "index": 27, "name": "option_1", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.shopify_source.stg_shopify__product_variant_tmp"}, "model.shopify_source.stg_shopify__product_variant": {"metadata": {"type": "table", "schema": "dbt_test_stg_shopify", "name": "stg_shopify__product_variant", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"variant_id": {"type": "INT64", "index": 1, "name": "variant_id", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 2, "name": "_fivetran_synced", "comment": null}, "created_timestamp": {"type": "STRING", "index": 3, "name": "created_timestamp", "comment": null}, "updated_timestamp": {"type": "STRING", "index": 4, "name": "updated_timestamp", "comment": null}, "product_id": {"type": "INT64", "index": 5, "name": "product_id", "comment": null}, "inventory_item_id": {"type": "INT64", "index": 6, "name": "inventory_item_id", "comment": null}, "image_id": {"type": "INT64", "index": 7, "name": "image_id", "comment": null}, "title": {"type": "STRING", "index": 8, "name": "title", "comment": null}, "price": {"type": "INT64", "index": 9, "name": "price", "comment": null}, "sku": {"type": "INT64", "index": 10, "name": "sku", "comment": null}, "position": {"type": "INT64", "index": 11, "name": "position", "comment": null}, "inventory_policy": {"type": "STRING", "index": 12, "name": "inventory_policy", "comment": null}, "compare_at_price": {"type": "INT64", "index": 13, "name": "compare_at_price", "comment": null}, "fulfillment_service": {"type": "STRING", "index": 14, "name": "fulfillment_service", "comment": null}, "inventory_management": {"type": "STRING", "index": 15, "name": "inventory_management", "comment": null}, "is_taxable": {"type": "BOOL", "index": 16, "name": "is_taxable", "comment": null}, "barcode": {"type": "INT64", "index": 17, "name": "barcode", "comment": null}, "grams": {"type": "INT64", "index": 18, "name": "grams", "comment": null}, "inventory_quantity": {"type": "INT64", "index": 19, "name": "inventory_quantity", "comment": null}, "weight": {"type": "INT64", "index": 20, "name": "weight", "comment": null}, "weight_unit": {"type": "STRING", "index": 21, "name": "weight_unit", "comment": null}, "option_1": {"type": "STRING", "index": 22, "name": "option_1", "comment": null}, "option_2": {"type": "INT64", "index": 23, "name": "option_2", "comment": null}, "option_3": {"type": "INT64", "index": 24, "name": "option_3", "comment": null}, "tax_code": {"type": "STRING", "index": 25, "name": "tax_code", "comment": null}, "old_inventory_quantity": {"type": "INT64", "index": 26, "name": "old_inventory_quantity", "comment": null}, "is_requiring_shipping": {"type": "BOOL", "index": 27, "name": "is_requiring_shipping", "comment": null}, "source_relation": {"type": "STRING", "index": 28, "name": "source_relation", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 5.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 958.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.shopify_source.stg_shopify__product_variant"}, "model.shopify_source.stg_shopify__transaction": {"metadata": {"type": "table", "schema": "dbt_test_stg_shopify", "name": "stg_shopify__transaction", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"transaction_id": {"type": "INT64", "index": 1, "name": "transaction_id", "comment": null}, "order_id": {"type": "INT64", "index": 2, "name": "order_id", "comment": null}, "refund_id": {"type": "INT64", "index": 3, "name": "refund_id", "comment": null}, "amount": {"type": "FLOAT64", "index": 4, "name": "amount", "comment": null}, "created_timestamp": {"type": "STRING", "index": 5, "name": "created_timestamp", "comment": null}, "processed_timestamp": {"type": "STRING", "index": 6, "name": "processed_timestamp", "comment": null}, "device_id": {"type": "INT64", "index": 7, "name": "device_id", "comment": null}, "gateway": {"type": "STRING", "index": 8, "name": "gateway", "comment": null}, "source_name": {"type": "STRING", "index": 9, "name": "source_name", "comment": null}, "message": {"type": "STRING", "index": 10, "name": "message", "comment": null}, "currency": {"type": "STRING", "index": 11, "name": "currency", "comment": null}, "location_id": {"type": "INT64", "index": 12, "name": "location_id", "comment": null}, "parent_id": {"type": "INT64", "index": 13, "name": "parent_id", "comment": null}, "payment_avs_result_code": {"type": "STRING", "index": 14, "name": "payment_avs_result_code", "comment": null}, "payment_credit_card_bin": {"type": "INT64", "index": 15, "name": "payment_credit_card_bin", "comment": null}, "payment_cvv_result_code": {"type": "INT64", "index": 16, "name": "payment_cvv_result_code", "comment": null}, "payment_credit_card_number": {"type": "INT64", "index": 17, "name": "payment_credit_card_number", "comment": null}, "payment_credit_card_company": {"type": "INT64", "index": 18, "name": "payment_credit_card_company", "comment": null}, "kind": {"type": "STRING", "index": 19, "name": "kind", "comment": null}, "receipt": {"type": "STRING", "index": 20, "name": "receipt", "comment": null}, "currency_exchange_id": {"type": "INT64", "index": 21, "name": "currency_exchange_id", "comment": null}, "currency_exchange_adjustment": {"type": "INT64", "index": 22, "name": "currency_exchange_adjustment", "comment": null}, "currency_exchange_original_amount": {"type": "INT64", "index": 23, "name": "currency_exchange_original_amount", "comment": null}, "currency_exchange_final_amount": {"type": "INT64", "index": 24, "name": "currency_exchange_final_amount", "comment": null}, "currency_exchange_currency": {"type": "INT64", "index": 25, "name": "currency_exchange_currency", "comment": null}, "error_code": {"type": "INT64", "index": 26, "name": "error_code", "comment": null}, "status": {"type": "STRING", "index": 27, "name": "status", "comment": null}, "test": {"type": "BOOL", "index": 28, "name": "test", "comment": null}, "user_id": {"type": "INT64", "index": 29, "name": "user_id", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 30, "name": "_fivetran_synced", "comment": null}, "source_relation": {"type": "STRING", "index": 31, "name": "source_relation", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 5.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 999.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.shopify_source.stg_shopify__transaction"}, "model.shopify_source.stg_shopify__order_tmp": {"metadata": {"type": "view", "schema": "dbt_test_stg_shopify", "name": "stg_shopify__order_tmp", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "note": {"type": "STRING", "index": 2, "name": "note", "comment": null}, "email": {"type": "STRING", "index": 3, "name": "email", "comment": null}, "taxes_included": {"type": "BOOL", "index": 4, "name": "taxes_included", "comment": null}, "currency": {"type": "STRING", "index": 5, "name": "currency", "comment": null}, "subtotal_price": {"type": "FLOAT64", "index": 6, "name": "subtotal_price", "comment": null}, "total_tax": {"type": "INT64", "index": 7, "name": "total_tax", "comment": null}, "total_price": {"type": "FLOAT64", "index": 8, "name": "total_price", "comment": null}, "created_at": {"type": "TIMESTAMP", "index": 9, "name": "created_at", "comment": null}, "updated_at": {"type": "TIMESTAMP", "index": 10, "name": "updated_at", "comment": null}, "name": {"type": "STRING", "index": 11, "name": "name", "comment": null}, "shipping_address_name": {"type": "STRING", "index": 12, "name": "shipping_address_name", "comment": null}, "shipping_address_first_name": {"type": "STRING", "index": 13, "name": "shipping_address_first_name", "comment": null}, "shipping_address_last_name": {"type": "STRING", "index": 14, "name": "shipping_address_last_name", "comment": null}, "shipping_address_company": {"type": "STRING", "index": 15, "name": "shipping_address_company", "comment": null}, "shipping_address_phone": {"type": "STRING", "index": 16, "name": "shipping_address_phone", "comment": null}, "shipping_address_address_1": {"type": "STRING", "index": 17, "name": "shipping_address_address_1", "comment": null}, "shipping_address_address_2": {"type": "STRING", "index": 18, "name": "shipping_address_address_2", "comment": null}, "shipping_address_city": {"type": "STRING", "index": 19, "name": "shipping_address_city", "comment": null}, "shipping_address_country": {"type": "STRING", "index": 20, "name": "shipping_address_country", "comment": null}, "shipping_address_country_code": {"type": "STRING", "index": 21, "name": "shipping_address_country_code", "comment": null}, "shipping_address_province": {"type": "STRING", "index": 22, "name": "shipping_address_province", "comment": null}, "shipping_address_province_code": {"type": "INT64", "index": 23, "name": "shipping_address_province_code", "comment": null}, "shipping_address_zip": {"type": "STRING", "index": 24, "name": "shipping_address_zip", "comment": null}, "shipping_address_latitude": {"type": "STRING", "index": 25, "name": "shipping_address_latitude", "comment": null}, "shipping_address_longitude": {"type": "STRING", "index": 26, "name": "shipping_address_longitude", "comment": null}, "billing_address_name": {"type": "STRING", "index": 27, "name": "billing_address_name", "comment": null}, "billing_address_first_name": {"type": "STRING", "index": 28, "name": "billing_address_first_name", "comment": null}, "billing_address_last_name": {"type": "STRING", "index": 29, "name": "billing_address_last_name", "comment": null}, "billing_address_company": {"type": "STRING", "index": 30, "name": "billing_address_company", "comment": null}, "billing_address_phone": {"type": "STRING", "index": 31, "name": "billing_address_phone", "comment": null}, "billing_address_address_1": {"type": "STRING", "index": 32, "name": "billing_address_address_1", "comment": null}, "billing_address_address_2": {"type": "STRING", "index": 33, "name": "billing_address_address_2", "comment": null}, "billing_address_city": {"type": "STRING", "index": 34, "name": "billing_address_city", "comment": null}, "billing_address_country": {"type": "STRING", "index": 35, "name": "billing_address_country", "comment": null}, "billing_address_country_code": {"type": "STRING", "index": 36, "name": "billing_address_country_code", "comment": null}, "billing_address_province": {"type": "STRING", "index": 37, "name": "billing_address_province", "comment": null}, "billing_address_province_code": {"type": "INT64", "index": 38, "name": "billing_address_province_code", "comment": null}, "billing_address_zip": {"type": "STRING", "index": 39, "name": "billing_address_zip", "comment": null}, "billing_address_latitude": {"type": "STRING", "index": 40, "name": "billing_address_latitude", "comment": null}, "billing_address_longitude": {"type": "STRING", "index": 41, "name": "billing_address_longitude", "comment": null}, "customer_id": {"type": "INT64", "index": 42, "name": "customer_id", "comment": null}, "location_id": {"type": "INT64", "index": 43, "name": "location_id", "comment": null}, "user_id": {"type": "INT64", "index": 44, "name": "user_id", "comment": null}, "number": {"type": "INT64", "index": 45, "name": "number", "comment": null}, "order_number": {"type": "INT64", "index": 46, "name": "order_number", "comment": null}, "financial_status": {"type": "STRING", "index": 47, "name": "financial_status", "comment": null}, "fulfillment_status": {"type": "STRING", "index": 48, "name": "fulfillment_status", "comment": null}, "processed_at": {"type": "TIMESTAMP", "index": 49, "name": "processed_at", "comment": null}, "processing_method": {"type": "STRING", "index": 50, "name": "processing_method", "comment": null}, "referring_site": {"type": "STRING", "index": 51, "name": "referring_site", "comment": null}, "cancel_reason": {"type": "INT64", "index": 52, "name": "cancel_reason", "comment": null}, "cancelled_at": {"type": "TIMESTAMP", "index": 53, "name": "cancelled_at", "comment": null}, "closed_at": {"type": "STRING", "index": 54, "name": "closed_at", "comment": null}, "total_discounts": {"type": "FLOAT64", "index": 55, "name": "total_discounts", "comment": null}, "total_line_items_price": {"type": "FLOAT64", "index": 56, "name": "total_line_items_price", "comment": null}, "total_weight": {"type": "INT64", "index": 57, "name": "total_weight", "comment": null}, "source_name": {"type": "STRING", "index": 58, "name": "source_name", "comment": null}, "browser_ip": {"type": "STRING", "index": 59, "name": "browser_ip", "comment": null}, "buyer_accepts_marketing": {"type": "BOOL", "index": 60, "name": "buyer_accepts_marketing", "comment": null}, "token": {"type": "STRING", "index": 61, "name": "token", "comment": null}, "cart_token": {"type": "STRING", "index": 62, "name": "cart_token", "comment": null}, "checkout_token": {"type": "STRING", "index": 63, "name": "checkout_token", "comment": null}, "test": {"type": "BOOL", "index": 64, "name": "test", "comment": null}, "landing_site_base_url": {"type": "STRING", "index": 65, "name": "landing_site_base_url", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 66, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.shopify_source.stg_shopify__order_tmp"}, "model.shopify_source.stg_shopify__order": {"metadata": {"type": "table", "schema": "dbt_test_stg_shopify", "name": "stg_shopify__order", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"order_id": {"type": "INT64", "index": 1, "name": "order_id", "comment": null}, "processed_timestamp": {"type": "TIMESTAMP", "index": 2, "name": "processed_timestamp", "comment": null}, "updated_timestamp": {"type": "TIMESTAMP", "index": 3, "name": "updated_timestamp", "comment": null}, "user_id": {"type": "INT64", "index": 4, "name": "user_id", "comment": null}, "total_discounts": {"type": "FLOAT64", "index": 5, "name": "total_discounts", "comment": null}, "total_line_items_price": {"type": "FLOAT64", "index": 6, "name": "total_line_items_price", "comment": null}, "total_price": {"type": "FLOAT64", "index": 7, "name": "total_price", "comment": null}, "total_tax": {"type": "INT64", "index": 8, "name": "total_tax", "comment": null}, "source_name": {"type": "STRING", "index": 9, "name": "source_name", "comment": null}, "subtotal_price": {"type": "FLOAT64", "index": 10, "name": "subtotal_price", "comment": null}, "has_taxes_included": {"type": "BOOL", "index": 11, "name": "has_taxes_included", "comment": null}, "total_weight": {"type": "INT64", "index": 12, "name": "total_weight", "comment": null}, "landing_site_base_url": {"type": "STRING", "index": 13, "name": "landing_site_base_url", "comment": null}, "location_id": {"type": "INT64", "index": 14, "name": "location_id", "comment": null}, "name": {"type": "STRING", "index": 15, "name": "name", "comment": null}, "note": {"type": "STRING", "index": 16, "name": "note", "comment": null}, "number": {"type": "INT64", "index": 17, "name": "number", "comment": null}, "order_number": {"type": "INT64", "index": 18, "name": "order_number", "comment": null}, "cancel_reason": {"type": "INT64", "index": 19, "name": "cancel_reason", "comment": null}, "cancelled_timestamp": {"type": "TIMESTAMP", "index": 20, "name": "cancelled_timestamp", "comment": null}, "cart_token": {"type": "STRING", "index": 21, "name": "cart_token", "comment": null}, "checkout_token": {"type": "STRING", "index": 22, "name": "checkout_token", "comment": null}, "closed_timestamp": {"type": "STRING", "index": 23, "name": "closed_timestamp", "comment": null}, "created_timestamp": {"type": "TIMESTAMP", "index": 24, "name": "created_timestamp", "comment": null}, "currency": {"type": "STRING", "index": 25, "name": "currency", "comment": null}, "customer_id": {"type": "INT64", "index": 26, "name": "customer_id", "comment": null}, "email": {"type": "STRING", "index": 27, "name": "email", "comment": null}, "financial_status": {"type": "STRING", "index": 28, "name": "financial_status", "comment": null}, "fulfillment_status": {"type": "STRING", "index": 29, "name": "fulfillment_status", "comment": null}, "processing_method": {"type": "STRING", "index": 30, "name": "processing_method", "comment": null}, "referring_site": {"type": "STRING", "index": 31, "name": "referring_site", "comment": null}, "billing_address_address_1": {"type": "STRING", "index": 32, "name": "billing_address_address_1", "comment": null}, "billing_address_address_2": {"type": "STRING", "index": 33, "name": "billing_address_address_2", "comment": null}, "billing_address_city": {"type": "STRING", "index": 34, "name": "billing_address_city", "comment": null}, "billing_address_company": {"type": "STRING", "index": 35, "name": "billing_address_company", "comment": null}, "billing_address_country": {"type": "STRING", "index": 36, "name": "billing_address_country", "comment": null}, "billing_address_country_code": {"type": "STRING", "index": 37, "name": "billing_address_country_code", "comment": null}, "billing_address_first_name": {"type": "STRING", "index": 38, "name": "billing_address_first_name", "comment": null}, "billing_address_last_name": {"type": "STRING", "index": 39, "name": "billing_address_last_name", "comment": null}, "billing_address_latitude": {"type": "STRING", "index": 40, "name": "billing_address_latitude", "comment": null}, "billing_address_longitude": {"type": "STRING", "index": 41, "name": "billing_address_longitude", "comment": null}, "billing_address_name": {"type": "STRING", "index": 42, "name": "billing_address_name", "comment": null}, "billing_address_phone": {"type": "STRING", "index": 43, "name": "billing_address_phone", "comment": null}, "billing_address_province": {"type": "STRING", "index": 44, "name": "billing_address_province", "comment": null}, "billing_address_province_code": {"type": "INT64", "index": 45, "name": "billing_address_province_code", "comment": null}, "billing_address_zip": {"type": "STRING", "index": 46, "name": "billing_address_zip", "comment": null}, "browser_ip": {"type": "STRING", "index": 47, "name": "browser_ip", "comment": null}, "has_buyer_accepted_marketing": {"type": "BOOL", "index": 48, "name": "has_buyer_accepted_marketing", "comment": null}, "total_shipping_price_set": {"type": "STRING", "index": 49, "name": "total_shipping_price_set", "comment": null}, "shipping_address_address_1": {"type": "STRING", "index": 50, "name": "shipping_address_address_1", "comment": null}, "shipping_address_address_2": {"type": "STRING", "index": 51, "name": "shipping_address_address_2", "comment": null}, "shipping_address_city": {"type": "STRING", "index": 52, "name": "shipping_address_city", "comment": null}, "shipping_address_company": {"type": "STRING", "index": 53, "name": "shipping_address_company", "comment": null}, "shipping_address_country": {"type": "STRING", "index": 54, "name": "shipping_address_country", "comment": null}, "shipping_address_country_code": {"type": "STRING", "index": 55, "name": "shipping_address_country_code", "comment": null}, "shipping_address_first_name": {"type": "STRING", "index": 56, "name": "shipping_address_first_name", "comment": null}, "shipping_address_last_name": {"type": "STRING", "index": 57, "name": "shipping_address_last_name", "comment": null}, "shipping_address_latitude": {"type": "STRING", "index": 58, "name": "shipping_address_latitude", "comment": null}, "shipping_address_longitude": {"type": "STRING", "index": 59, "name": "shipping_address_longitude", "comment": null}, "shipping_address_name": {"type": "STRING", "index": 60, "name": "shipping_address_name", "comment": null}, "shipping_address_phone": {"type": "STRING", "index": 61, "name": "shipping_address_phone", "comment": null}, "shipping_address_province": {"type": "STRING", "index": 62, "name": "shipping_address_province", "comment": null}, "shipping_address_province_code": {"type": "INT64", "index": 63, "name": "shipping_address_province_code", "comment": null}, "shipping_address_zip": {"type": "STRING", "index": 64, "name": "shipping_address_zip", "comment": null}, "is_test_order": {"type": "BOOL", "index": 65, "name": "is_test_order", "comment": null}, "token": {"type": "STRING", "index": 66, "name": "token", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 67, "name": "_fivetran_synced", "comment": null}, "source_relation": {"type": "STRING", "index": 68, "name": "source_relation", "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": 3856.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.shopify_source.stg_shopify__order"}, "model.shopify_source.stg_shopify__refund": {"metadata": {"type": "table", "schema": "dbt_test_stg_shopify", "name": "stg_shopify__refund", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"_fivetran_synced": {"type": "TIMESTAMP", "index": 1, "name": "_fivetran_synced", "comment": null}, "created_at": {"type": "STRING", "index": 2, "name": "created_at", "comment": null}, "refund_id": {"type": "INT64", "index": 3, "name": "refund_id", "comment": null}, "note": {"type": "STRING", "index": 4, "name": "note", "comment": null}, "order_id": {"type": "INT64", "index": 5, "name": "order_id", "comment": null}, "processed_at": {"type": "STRING", "index": 6, "name": "processed_at", "comment": null}, "restock": {"type": "BOOL", "index": 7, "name": "restock", "comment": null}, "user_id": {"type": "INT64", "index": 8, "name": "user_id", "comment": null}, "source_relation": {"type": "STRING", "index": 9, "name": "source_relation", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 5.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 441.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.shopify_source.stg_shopify__refund"}, "model.shopify_source.stg_shopify__product_tmp": {"metadata": {"type": "view", "schema": "dbt_test_stg_shopify", "name": "stg_shopify__product_tmp", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "title": {"type": "STRING", "index": 2, "name": "title", "comment": null}, "handle": {"type": "STRING", "index": 3, "name": "handle", "comment": null}, "product_type": {"type": "STRING", "index": 4, "name": "product_type", "comment": null}, "vendor": {"type": "STRING", "index": 5, "name": "vendor", "comment": null}, "created_at": {"type": "TIMESTAMP", "index": 6, "name": "created_at", "comment": null}, "updated_at": {"type": "TIMESTAMP", "index": 7, "name": "updated_at", "comment": null}, "published_at": {"type": "TIMESTAMP", "index": 8, "name": "published_at", "comment": null}, "published_scope": {"type": "STRING", "index": 9, "name": "published_scope", "comment": null}, "_fivetran_deleted": {"type": "BOOL", "index": 10, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 11, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.shopify_source.stg_shopify__product_tmp"}, "model.shopify_source.stg_shopify__transaction_tmp": {"metadata": {"type": "view", "schema": "dbt_test_stg_shopify", "name": "stg_shopify__transaction_tmp", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "order_id": {"type": "INT64", "index": 2, "name": "order_id", "comment": null}, "refund_id": {"type": "INT64", "index": 3, "name": "refund_id", "comment": null}, "amount": {"type": "FLOAT64", "index": 4, "name": "amount", "comment": null}, "authorization": {"type": "STRING", "index": 5, "name": "authorization", "comment": null}, "created_at": {"type": "STRING", "index": 6, "name": "created_at", "comment": null}, "processed_at": {"type": "STRING", "index": 7, "name": "processed_at", "comment": null}, "device_id": {"type": "INT64", "index": 8, "name": "device_id", "comment": null}, "gateway": {"type": "STRING", "index": 9, "name": "gateway", "comment": null}, "source_name": {"type": "STRING", "index": 10, "name": "source_name", "comment": null}, "message": {"type": "STRING", "index": 11, "name": "message", "comment": null}, "currency": {"type": "STRING", "index": 12, "name": "currency", "comment": null}, "location_id": {"type": "INT64", "index": 13, "name": "location_id", "comment": null}, "parent_id": {"type": "INT64", "index": 14, "name": "parent_id", "comment": null}, "payment_avs_result_code": {"type": "STRING", "index": 15, "name": "payment_avs_result_code", "comment": null}, "kind": {"type": "STRING", "index": 16, "name": "kind", "comment": null}, "currency_exchange_id": {"type": "INT64", "index": 17, "name": "currency_exchange_id", "comment": null}, "currency_exchange_adjustment": {"type": "INT64", "index": 18, "name": "currency_exchange_adjustment", "comment": null}, "currency_exchange_original_amount": {"type": "INT64", "index": 19, "name": "currency_exchange_original_amount", "comment": null}, "currency_exchange_final_amount": {"type": "INT64", "index": 20, "name": "currency_exchange_final_amount", "comment": null}, "currency_exchange_currency": {"type": "INT64", "index": 21, "name": "currency_exchange_currency", "comment": null}, "error_code": {"type": "INT64", "index": 22, "name": "error_code", "comment": null}, "status": {"type": "STRING", "index": 23, "name": "status", "comment": null}, "test": {"type": "BOOL", "index": 24, "name": "test", "comment": null}, "user_id": {"type": "INT64", "index": 25, "name": "user_id", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 26, "name": "_fivetran_synced", "comment": null}, "payment_credit_card_bin": {"type": "INT64", "index": 27, "name": "payment_credit_card_bin", "comment": null}, "payment_cvv_result_code": {"type": "INT64", "index": 28, "name": "payment_cvv_result_code", "comment": null}, "payment_credit_card_number": {"type": "INT64", "index": 29, "name": "payment_credit_card_number", "comment": null}, "payment_credit_card_company": {"type": "INT64", "index": 30, "name": "payment_credit_card_company", "comment": null}, "receipt": {"type": "STRING", "index": 31, "name": "receipt", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.shopify_source.stg_shopify__transaction_tmp"}, "model.shopify_source.stg_shopify__order_line_refund": {"metadata": {"type": "table", "schema": "dbt_test_stg_shopify", "name": "stg_shopify__order_line_refund", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"_fivetran_synced": {"type": "TIMESTAMP", "index": 1, "name": "_fivetran_synced", "comment": null}, "order_line_refund_id": {"type": "INT64", "index": 2, "name": "order_line_refund_id", "comment": null}, "location_id": {"type": "INT64", "index": 3, "name": "location_id", "comment": null}, "order_line_id": {"type": "INT64", "index": 4, "name": "order_line_id", "comment": null}, "subtotal": {"type": "NUMERIC", "index": 5, "name": "subtotal", "comment": null}, "total_tax": {"type": "NUMERIC", "index": 6, "name": "total_tax", "comment": null}, "quantity": {"type": "INT64", "index": 7, "name": "quantity", "comment": null}, "refund_id": {"type": "INT64", "index": 8, "name": "refund_id", "comment": null}, "restock_type": {"type": "INT64", "index": 9, "name": "restock_type", "comment": null}, "source_relation": {"type": "STRING", "index": 10, "name": "source_relation", "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.shopify_source.stg_shopify__order_line_refund"}, "model.shopify_source.stg_shopify__order_adjustment": {"metadata": {"type": "table", "schema": "dbt_test_stg_shopify", "name": "stg_shopify__order_adjustment", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"order_adjustment_id": {"type": "INT64", "index": 1, "name": "order_adjustment_id", "comment": null}, "order_id": {"type": "INT64", "index": 2, "name": "order_id", "comment": null}, "refund_id": {"type": "INT64", "index": 3, "name": "refund_id", "comment": null}, "amount": {"type": "INT64", "index": 4, "name": "amount", "comment": null}, "tax_amount": {"type": "FLOAT64", "index": 5, "name": "tax_amount", "comment": null}, "kind": {"type": "STRING", "index": 6, "name": "kind", "comment": null}, "reason": {"type": "STRING", "index": 7, "name": "reason", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 8, "name": "_fivetran_synced", "comment": null}, "source_relation": {"type": "STRING", "index": 9, "name": "source_relation", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 5.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 426.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.shopify_source.stg_shopify__order_adjustment"}, "model.shopify_source.stg_shopify__order_adjustment_tmp": {"metadata": {"type": "view", "schema": "dbt_test_stg_shopify", "name": "stg_shopify__order_adjustment_tmp", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "order_id": {"type": "INT64", "index": 2, "name": "order_id", "comment": null}, "refund_id": {"type": "INT64", "index": 3, "name": "refund_id", "comment": null}, "amount": {"type": "INT64", "index": 4, "name": "amount", "comment": null}, "tax_amount": {"type": "FLOAT64", "index": 5, "name": "tax_amount", "comment": null}, "kind": {"type": "STRING", "index": 6, "name": "kind", "comment": null}, "reason": {"type": "STRING", "index": 7, "name": "reason", "comment": null}, "amount_set": {"type": "INT64", "index": 8, "name": "amount_set", "comment": null}, "tax_amount_set": {"type": "INT64", "index": 9, "name": "tax_amount_set", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 10, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.shopify_source.stg_shopify__order_adjustment_tmp"}, "model.shopify_source.stg_shopify__product": {"metadata": {"type": "table", "schema": "dbt_test_stg_shopify", "name": "stg_shopify__product", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"_fivetran_deleted": {"type": "BOOL", "index": 1, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 2, "name": "_fivetran_synced", "comment": null}, "created_timestamp": {"type": "TIMESTAMP", "index": 3, "name": "created_timestamp", "comment": null}, "handle": {"type": "STRING", "index": 4, "name": "handle", "comment": null}, "product_id": {"type": "INT64", "index": 5, "name": "product_id", "comment": null}, "product_type": {"type": "STRING", "index": 6, "name": "product_type", "comment": null}, "published_timestamp": {"type": "TIMESTAMP", "index": 7, "name": "published_timestamp", "comment": null}, "published_scope": {"type": "STRING", "index": 8, "name": "published_scope", "comment": null}, "title": {"type": "STRING", "index": 9, "name": "title", "comment": null}, "updated_timestamp": {"type": "TIMESTAMP", "index": 10, "name": "updated_timestamp", "comment": null}, "vendor": {"type": "STRING", "index": 11, "name": "vendor", "comment": null}, "source_relation": {"type": "STRING", "index": 12, "name": "source_relation", "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": 555.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.shopify_source.stg_shopify__product"}, "model.shopify_source.stg_shopify__refund_tmp": {"metadata": {"type": "view", "schema": "dbt_test_stg_shopify", "name": "stg_shopify__refund_tmp", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "created_at": {"type": "STRING", "index": 2, "name": "created_at", "comment": null}, "processed_at": {"type": "STRING", "index": 3, "name": "processed_at", "comment": null}, "note": {"type": "STRING", "index": 4, "name": "note", "comment": null}, "restock": {"type": "BOOL", "index": 5, "name": "restock", "comment": null}, "user_id": {"type": "INT64", "index": 6, "name": "user_id", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 7, "name": "_fivetran_synced", "comment": null}, "total_duties_set": {"type": "INT64", "index": 8, "name": "total_duties_set", "comment": null}, "order_id": {"type": "INT64", "index": 9, "name": "order_id", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.shopify_source.stg_shopify__refund_tmp"}, "model.klaviyo.klaviyo__flows": {"metadata": {"type": "table", "schema": "dbt_test_klaviyo", "name": "klaviyo__flows", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"created_at": {"type": "STRING", "index": 1, "name": "created_at", "comment": null}, "flow_id": {"type": "STRING", "index": 2, "name": "flow_id", "comment": null}, "flow_name": {"type": "STRING", "index": 3, "name": "flow_name", "comment": null}, "status": {"type": "STRING", "index": 4, "name": "status", "comment": null}, "flow_trigger": {"type": "STRING", "index": 5, "name": "flow_trigger", "comment": null}, "updated_at": {"type": "STRING", "index": 6, "name": "updated_at", "comment": null}, "person_filter": {"type": "STRING", "index": 7, "name": "person_filter", "comment": null}, "source_relation": {"type": "STRING", "index": 8, "name": "source_relation", "comment": null}, "variation_id": {"type": "STRING", "index": 9, "name": "variation_id", "comment": null}, "total_count_unique_people": {"type": "INT64", "index": 10, "name": "total_count_unique_people", "comment": null}, "first_event_at": {"type": "TIMESTAMP", "index": 11, "name": "first_event_at", "comment": null}, "last_event_at": {"type": "TIMESTAMP", "index": 12, "name": "last_event_at", "comment": null}, "sum_revenue_refunded_order": {"type": "NUMERIC", "index": 13, "name": "sum_revenue_refunded_order", "comment": null}, "sum_revenue_placed_order": {"type": "NUMERIC", "index": 14, "name": "sum_revenue_placed_order", "comment": null}, "sum_revenue_ordered_product": {"type": "NUMERIC", "index": 15, "name": "sum_revenue_ordered_product", "comment": null}, "sum_revenue_checkout_started": {"type": "NUMERIC", "index": 16, "name": "sum_revenue_checkout_started", "comment": null}, "sum_revenue_cancelled_order": {"type": "NUMERIC", "index": 17, "name": "sum_revenue_cancelled_order", "comment": null}, "count_active_on_site": {"type": "INT64", "index": 18, "name": "count_active_on_site", "comment": null}, "unique_count_active_on_site": {"type": "INT64", "index": 19, "name": "unique_count_active_on_site", "comment": null}, "count_viewed_product": {"type": "INT64", "index": 20, "name": "count_viewed_product", "comment": null}, "unique_count_viewed_product": {"type": "INT64", "index": 21, "name": "unique_count_viewed_product", "comment": null}, "count_ordered_product": {"type": "INT64", "index": 22, "name": "count_ordered_product", "comment": null}, "unique_count_ordered_product": {"type": "INT64", "index": 23, "name": "unique_count_ordered_product", "comment": null}, "count_placed_order": {"type": "INT64", "index": 24, "name": "count_placed_order", "comment": null}, "unique_count_placed_order": {"type": "INT64", "index": 25, "name": "unique_count_placed_order", "comment": null}, "count_refunded_order": {"type": "INT64", "index": 26, "name": "count_refunded_order", "comment": null}, "unique_count_refunded_order": {"type": "INT64", "index": 27, "name": "unique_count_refunded_order", "comment": null}, "count_cancelled_order": {"type": "INT64", "index": 28, "name": "count_cancelled_order", "comment": null}, "unique_count_cancelled_order": {"type": "INT64", "index": 29, "name": "unique_count_cancelled_order", "comment": null}, "count_fulfilled_order": {"type": "INT64", "index": 30, "name": "count_fulfilled_order", "comment": null}, "unique_count_fulfilled_order": {"type": "INT64", "index": 31, "name": "unique_count_fulfilled_order", "comment": null}, "count_received_email": {"type": "INT64", "index": 32, "name": "count_received_email", "comment": null}, "unique_count_received_email": {"type": "INT64", "index": 33, "name": "unique_count_received_email", "comment": null}, "count_clicked_email": {"type": "INT64", "index": 34, "name": "count_clicked_email", "comment": null}, "unique_count_clicked_email": {"type": "INT64", "index": 35, "name": "unique_count_clicked_email", "comment": null}, "count_opened_email": {"type": "INT64", "index": 36, "name": "count_opened_email", "comment": null}, "unique_count_opened_email": {"type": "INT64", "index": 37, "name": "unique_count_opened_email", "comment": null}, "count_bounced_email": {"type": "INT64", "index": 38, "name": "count_bounced_email", "comment": null}, "unique_count_bounced_email": {"type": "INT64", "index": 39, "name": "unique_count_bounced_email", "comment": null}, "count_marked_email_as_spam": {"type": "INT64", "index": 40, "name": "count_marked_email_as_spam", "comment": null}, "unique_count_marked_email_as_spam": {"type": "INT64", "index": 41, "name": "unique_count_marked_email_as_spam", "comment": null}, "count_dropped_email": {"type": "INT64", "index": 42, "name": "count_dropped_email", "comment": null}, "unique_count_dropped_email": {"type": "INT64", "index": 43, "name": "unique_count_dropped_email", "comment": null}, "count_subscribed_to_list": {"type": "INT64", "index": 44, "name": "count_subscribed_to_list", "comment": null}, "unique_count_subscribed_to_list": {"type": "INT64", "index": 45, "name": "unique_count_subscribed_to_list", "comment": null}, "count_unsubscribed_to_list": {"type": "INT64", "index": 46, "name": "count_unsubscribed_to_list", "comment": null}, "unique_count_unsubscribed_to_list": {"type": "INT64", "index": 47, "name": "unique_count_unsubscribed_to_list", "comment": null}, "count_unsubscribed": {"type": "INT64", "index": 48, "name": "count_unsubscribed", "comment": null}, "unique_count_unsubscribed": {"type": "INT64", "index": 49, "name": "unique_count_unsubscribed", "comment": null}, "count_updated_email_preferences": {"type": "INT64", "index": 50, "name": "count_updated_email_preferences", "comment": null}, "unique_count_updated_email_preferences": {"type": "INT64", "index": 51, "name": "unique_count_updated_email_preferences", "comment": null}, "count_subscribed_to_back_in_stock": {"type": "INT64", "index": 52, "name": "count_subscribed_to_back_in_stock", "comment": null}, "unique_count_subscribed_to_back_in_stock": {"type": "INT64", "index": 53, "name": "unique_count_subscribed_to_back_in_stock", "comment": null}, "count_merged_profile": {"type": "INT64", "index": 54, "name": "count_merged_profile", "comment": null}, "unique_count_merged_profile": {"type": "INT64", "index": 55, "name": "unique_count_merged_profile", "comment": null}, "count_received_sms": {"type": "INT64", "index": 56, "name": "count_received_sms", "comment": null}, "unique_count_received_sms": {"type": "INT64", "index": 57, "name": "unique_count_received_sms", "comment": null}, "count_clicked_sms": {"type": "INT64", "index": 58, "name": "count_clicked_sms", "comment": null}, "unique_count_clicked_sms": {"type": "INT64", "index": 59, "name": "unique_count_clicked_sms", "comment": null}, "count_consented_to_receive_sms": {"type": "INT64", "index": 60, "name": "count_consented_to_receive_sms", "comment": null}, "unique_count_consented_to_receive_sms": {"type": "INT64", "index": 61, "name": "unique_count_consented_to_receive_sms", "comment": null}, "count_sent_sms": {"type": "INT64", "index": 62, "name": "count_sent_sms", "comment": null}, "unique_count_sent_sms": {"type": "INT64", "index": 63, "name": "unique_count_sent_sms", "comment": null}, "count_unsubscribed_from_sms": {"type": "INT64", "index": 64, "name": "count_unsubscribed_from_sms", "comment": null}, "unique_count_unsubscribed_from_sms": {"type": "INT64", "index": 65, "name": "unique_count_unsubscribed_from_sms", "comment": null}, "count_failed_to_deliver_sms": {"type": "INT64", "index": 66, "name": "count_failed_to_deliver_sms", "comment": null}, "unique_count_failed_to_deliver_sms": {"type": "INT64", "index": 67, "name": "unique_count_failed_to_deliver_sms", "comment": null}, "flow_variation_key": {"type": "STRING", "index": 68, "name": "flow_variation_key", "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": 660.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.klaviyo.klaviyo__flows"}, "model.klaviyo.klaviyo__person_campaign_flow": {"metadata": {"type": "table", "schema": "dbt_test_klaviyo", "name": "klaviyo__person_campaign_flow", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"person_id": {"type": "STRING", "index": 1, "name": "person_id", "comment": null}, "last_touch_campaign_id": {"type": "STRING", "index": 2, "name": "last_touch_campaign_id", "comment": null}, "last_touch_flow_id": {"type": "STRING", "index": 3, "name": "last_touch_flow_id", "comment": null}, "campaign_name": {"type": "STRING", "index": 4, "name": "campaign_name", "comment": null}, "flow_name": {"type": "STRING", "index": 5, "name": "flow_name", "comment": null}, "variation_id": {"type": "STRING", "index": 6, "name": "variation_id", "comment": null}, "source_relation": {"type": "STRING", "index": 7, "name": "source_relation", "comment": null}, "first_event_at": {"type": "TIMESTAMP", "index": 8, "name": "first_event_at", "comment": null}, "last_event_at": {"type": "TIMESTAMP", "index": 9, "name": "last_event_at", "comment": null}, "sum_revenue_refunded_order": {"type": "NUMERIC", "index": 10, "name": "sum_revenue_refunded_order", "comment": null}, "sum_revenue_placed_order": {"type": "NUMERIC", "index": 11, "name": "sum_revenue_placed_order", "comment": null}, "sum_revenue_ordered_product": {"type": "NUMERIC", "index": 12, "name": "sum_revenue_ordered_product", "comment": null}, "sum_revenue_checkout_started": {"type": "NUMERIC", "index": 13, "name": "sum_revenue_checkout_started", "comment": null}, "sum_revenue_cancelled_order": {"type": "NUMERIC", "index": 14, "name": "sum_revenue_cancelled_order", "comment": null}, "count_active_on_site": {"type": "INT64", "index": 15, "name": "count_active_on_site", "comment": null}, "count_viewed_product": {"type": "INT64", "index": 16, "name": "count_viewed_product", "comment": null}, "count_ordered_product": {"type": "INT64", "index": 17, "name": "count_ordered_product", "comment": null}, "count_placed_order": {"type": "INT64", "index": 18, "name": "count_placed_order", "comment": null}, "count_refunded_order": {"type": "INT64", "index": 19, "name": "count_refunded_order", "comment": null}, "count_cancelled_order": {"type": "INT64", "index": 20, "name": "count_cancelled_order", "comment": null}, "count_fulfilled_order": {"type": "INT64", "index": 21, "name": "count_fulfilled_order", "comment": null}, "count_received_email": {"type": "INT64", "index": 22, "name": "count_received_email", "comment": null}, "count_clicked_email": {"type": "INT64", "index": 23, "name": "count_clicked_email", "comment": null}, "count_opened_email": {"type": "INT64", "index": 24, "name": "count_opened_email", "comment": null}, "count_bounced_email": {"type": "INT64", "index": 25, "name": "count_bounced_email", "comment": null}, "count_marked_email_as_spam": {"type": "INT64", "index": 26, "name": "count_marked_email_as_spam", "comment": null}, "count_dropped_email": {"type": "INT64", "index": 27, "name": "count_dropped_email", "comment": null}, "count_subscribed_to_list": {"type": "INT64", "index": 28, "name": "count_subscribed_to_list", "comment": null}, "count_unsubscribed_to_list": {"type": "INT64", "index": 29, "name": "count_unsubscribed_to_list", "comment": null}, "count_unsubscribed": {"type": "INT64", "index": 30, "name": "count_unsubscribed", "comment": null}, "count_updated_email_preferences": {"type": "INT64", "index": 31, "name": "count_updated_email_preferences", "comment": null}, "count_subscribed_to_back_in_stock": {"type": "INT64", "index": 32, "name": "count_subscribed_to_back_in_stock", "comment": null}, "count_merged_profile": {"type": "INT64", "index": 33, "name": "count_merged_profile", "comment": null}, "count_received_sms": {"type": "INT64", "index": 34, "name": "count_received_sms", "comment": null}, "count_clicked_sms": {"type": "INT64", "index": 35, "name": "count_clicked_sms", "comment": null}, "count_consented_to_receive_sms": {"type": "INT64", "index": 36, "name": "count_consented_to_receive_sms", "comment": null}, "count_sent_sms": {"type": "INT64", "index": 37, "name": "count_sent_sms", "comment": null}, "count_unsubscribed_from_sms": {"type": "INT64", "index": 38, "name": "count_unsubscribed_from_sms", "comment": null}, "count_failed_to_deliver_sms": {"type": "INT64", "index": 39, "name": "count_failed_to_deliver_sms", "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": 644.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.klaviyo.klaviyo__person_campaign_flow"}, "model.klaviyo.klaviyo__events": {"metadata": {"type": "table", "schema": "dbt_test_klaviyo", "name": "klaviyo__events", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"variation_id": {"type": "STRING", "index": 1, "name": "variation_id", "comment": null}, "campaign_id": {"type": "STRING", "index": 2, "name": "campaign_id", "comment": null}, "occurred_at": {"type": "TIMESTAMP", "index": 3, "name": "occurred_at", "comment": null}, "flow_id": {"type": "STRING", "index": 4, "name": "flow_id", "comment": null}, "flow_message_id": {"type": "INT64", "index": 5, "name": "flow_message_id", "comment": null}, "event_id": {"type": "STRING", "index": 6, "name": "event_id", "comment": null}, "metric_id": {"type": "STRING", "index": 7, "name": "metric_id", "comment": null}, "person_id": {"type": "STRING", "index": 8, "name": "person_id", "comment": null}, "uuid": {"type": "STRING", "index": 9, "name": "uuid", "comment": null}, "numeric_value": {"type": "INT64", "index": 10, "name": "numeric_value", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 11, "name": "_fivetran_synced", "comment": null}, "source_relation": {"type": "STRING", "index": 12, "name": "source_relation", "comment": null}, "occurred_on": {"type": "DATE", "index": 13, "name": "occurred_on", "comment": null}, "unique_event_id": {"type": "STRING", "index": 14, "name": "unique_event_id", "comment": null}, "touch_id": {"type": "STRING", "index": 15, "name": "touch_id", "comment": null}, "touch_type": {"type": "STRING", "index": 16, "name": "touch_type", "comment": null}, "type": {"type": "STRING", "index": 17, "name": "type", "comment": null}, "last_touch_campaign_id": {"type": "STRING", "index": 18, "name": "last_touch_campaign_id", "comment": null}, "last_touch_flow_id": {"type": "STRING", "index": 19, "name": "last_touch_flow_id", "comment": null}, "last_touch_at": {"type": "TIMESTAMP", "index": 20, "name": "last_touch_at", "comment": null}, "last_touch_event_type": {"type": "STRING", "index": 21, "name": "last_touch_event_type", "comment": null}, "last_touch_type": {"type": "STRING", "index": 22, "name": "last_touch_type", "comment": null}, "campaign_name": {"type": "STRING", "index": 23, "name": "campaign_name", "comment": null}, "campaign_type": {"type": "STRING", "index": 24, "name": "campaign_type", "comment": null}, "campaign_subject_line": {"type": "STRING", "index": 25, "name": "campaign_subject_line", "comment": null}, "flow_name": {"type": "STRING", "index": 26, "name": "flow_name", "comment": null}, "person_city": {"type": "STRING", "index": 27, "name": "person_city", "comment": null}, "person_country": {"type": "STRING", "index": 28, "name": "person_country", "comment": null}, "person_region": {"type": "STRING", "index": 29, "name": "person_region", "comment": null}, "person_email": {"type": "STRING", "index": 30, "name": "person_email", "comment": null}, "person_timezone": {"type": "STRING", "index": 31, "name": "person_timezone", "comment": null}, "integration_name": {"type": "STRING", "index": 32, "name": "integration_name", "comment": null}, "integration_category": {"type": "STRING", "index": 33, "name": "integration_category", "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": 432.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "partitioning_type": {"id": "partitioning_type", "label": "Partitioned By", "value": "occurred_on", "include": true, "description": "The partitioning column for this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.klaviyo.klaviyo__events"}, "model.klaviyo.klaviyo__campaigns": {"metadata": {"type": "table", "schema": "dbt_test_klaviyo", "name": "klaviyo__campaigns", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"campaign_type": {"type": "STRING", "index": 1, "name": "campaign_type", "comment": null}, "created_at": {"type": "STRING", "index": 2, "name": "created_at", "comment": null}, "email_template_id": {"type": "STRING", "index": 3, "name": "email_template_id", "comment": null}, "from_email": {"type": "STRING", "index": 4, "name": "from_email", "comment": null}, "from_name": {"type": "STRING", "index": 5, "name": "from_name", "comment": null}, "campaign_id": {"type": "STRING", "index": 6, "name": "campaign_id", "comment": null}, "is_segmented": {"type": "BOOL", "index": 7, "name": "is_segmented", "comment": null}, "campaign_name": {"type": "STRING", "index": 8, "name": "campaign_name", "comment": null}, "scheduled_to_send_at": {"type": "STRING", "index": 9, "name": "scheduled_to_send_at", "comment": null}, "sent_at": {"type": "STRING", "index": 10, "name": "sent_at", "comment": null}, "status": {"type": "STRING", "index": 11, "name": "status", "comment": null}, "status_id": {"type": "INT64", "index": 12, "name": "status_id", "comment": null}, "subject": {"type": "STRING", "index": 13, "name": "subject", "comment": null}, "updated_at": {"type": "STRING", "index": 14, "name": "updated_at", "comment": null}, "source_relation": {"type": "STRING", "index": 15, "name": "source_relation", "comment": null}, "variation_id": {"type": "STRING", "index": 16, "name": "variation_id", "comment": null}, "total_count_unique_people": {"type": "INT64", "index": 17, "name": "total_count_unique_people", "comment": null}, "first_event_at": {"type": "TIMESTAMP", "index": 18, "name": "first_event_at", "comment": null}, "last_event_at": {"type": "TIMESTAMP", "index": 19, "name": "last_event_at", "comment": null}, "sum_revenue_refunded_order": {"type": "NUMERIC", "index": 20, "name": "sum_revenue_refunded_order", "comment": null}, "sum_revenue_placed_order": {"type": "NUMERIC", "index": 21, "name": "sum_revenue_placed_order", "comment": null}, "sum_revenue_ordered_product": {"type": "NUMERIC", "index": 22, "name": "sum_revenue_ordered_product", "comment": null}, "sum_revenue_checkout_started": {"type": "NUMERIC", "index": 23, "name": "sum_revenue_checkout_started", "comment": null}, "sum_revenue_cancelled_order": {"type": "NUMERIC", "index": 24, "name": "sum_revenue_cancelled_order", "comment": null}, "count_active_on_site": {"type": "INT64", "index": 25, "name": "count_active_on_site", "comment": null}, "unique_count_active_on_site": {"type": "INT64", "index": 26, "name": "unique_count_active_on_site", "comment": null}, "count_viewed_product": {"type": "INT64", "index": 27, "name": "count_viewed_product", "comment": null}, "unique_count_viewed_product": {"type": "INT64", "index": 28, "name": "unique_count_viewed_product", "comment": null}, "count_ordered_product": {"type": "INT64", "index": 29, "name": "count_ordered_product", "comment": null}, "unique_count_ordered_product": {"type": "INT64", "index": 30, "name": "unique_count_ordered_product", "comment": null}, "count_placed_order": {"type": "INT64", "index": 31, "name": "count_placed_order", "comment": null}, "unique_count_placed_order": {"type": "INT64", "index": 32, "name": "unique_count_placed_order", "comment": null}, "count_refunded_order": {"type": "INT64", "index": 33, "name": "count_refunded_order", "comment": null}, "unique_count_refunded_order": {"type": "INT64", "index": 34, "name": "unique_count_refunded_order", "comment": null}, "count_cancelled_order": {"type": "INT64", "index": 35, "name": "count_cancelled_order", "comment": null}, "unique_count_cancelled_order": {"type": "INT64", "index": 36, "name": "unique_count_cancelled_order", "comment": null}, "count_fulfilled_order": {"type": "INT64", "index": 37, "name": "count_fulfilled_order", "comment": null}, "unique_count_fulfilled_order": {"type": "INT64", "index": 38, "name": "unique_count_fulfilled_order", "comment": null}, "count_received_email": {"type": "INT64", "index": 39, "name": "count_received_email", "comment": null}, "unique_count_received_email": {"type": "INT64", "index": 40, "name": "unique_count_received_email", "comment": null}, "count_clicked_email": {"type": "INT64", "index": 41, "name": "count_clicked_email", "comment": null}, "unique_count_clicked_email": {"type": "INT64", "index": 42, "name": "unique_count_clicked_email", "comment": null}, "count_opened_email": {"type": "INT64", "index": 43, "name": "count_opened_email", "comment": null}, "unique_count_opened_email": {"type": "INT64", "index": 44, "name": "unique_count_opened_email", "comment": null}, "count_bounced_email": {"type": "INT64", "index": 45, "name": "count_bounced_email", "comment": null}, "unique_count_bounced_email": {"type": "INT64", "index": 46, "name": "unique_count_bounced_email", "comment": null}, "count_marked_email_as_spam": {"type": "INT64", "index": 47, "name": "count_marked_email_as_spam", "comment": null}, "unique_count_marked_email_as_spam": {"type": "INT64", "index": 48, "name": "unique_count_marked_email_as_spam", "comment": null}, "count_dropped_email": {"type": "INT64", "index": 49, "name": "count_dropped_email", "comment": null}, "unique_count_dropped_email": {"type": "INT64", "index": 50, "name": "unique_count_dropped_email", "comment": null}, "count_subscribed_to_list": {"type": "INT64", "index": 51, "name": "count_subscribed_to_list", "comment": null}, "unique_count_subscribed_to_list": {"type": "INT64", "index": 52, "name": "unique_count_subscribed_to_list", "comment": null}, "count_unsubscribed_to_list": {"type": "INT64", "index": 53, "name": "count_unsubscribed_to_list", "comment": null}, "unique_count_unsubscribed_to_list": {"type": "INT64", "index": 54, "name": "unique_count_unsubscribed_to_list", "comment": null}, "count_unsubscribed": {"type": "INT64", "index": 55, "name": "count_unsubscribed", "comment": null}, "unique_count_unsubscribed": {"type": "INT64", "index": 56, "name": "unique_count_unsubscribed", "comment": null}, "count_updated_email_preferences": {"type": "INT64", "index": 57, "name": "count_updated_email_preferences", "comment": null}, "unique_count_updated_email_preferences": {"type": "INT64", "index": 58, "name": "unique_count_updated_email_preferences", "comment": null}, "count_subscribed_to_back_in_stock": {"type": "INT64", "index": 59, "name": "count_subscribed_to_back_in_stock", "comment": null}, "unique_count_subscribed_to_back_in_stock": {"type": "INT64", "index": 60, "name": "unique_count_subscribed_to_back_in_stock", "comment": null}, "count_merged_profile": {"type": "INT64", "index": 61, "name": "count_merged_profile", "comment": null}, "unique_count_merged_profile": {"type": "INT64", "index": 62, "name": "unique_count_merged_profile", "comment": null}, "count_received_sms": {"type": "INT64", "index": 63, "name": "count_received_sms", "comment": null}, "unique_count_received_sms": {"type": "INT64", "index": 64, "name": "unique_count_received_sms", "comment": null}, "count_clicked_sms": {"type": "INT64", "index": 65, "name": "count_clicked_sms", "comment": null}, "unique_count_clicked_sms": {"type": "INT64", "index": 66, "name": "unique_count_clicked_sms", "comment": null}, "count_consented_to_receive_sms": {"type": "INT64", "index": 67, "name": "count_consented_to_receive_sms", "comment": null}, "unique_count_consented_to_receive_sms": {"type": "INT64", "index": 68, "name": "unique_count_consented_to_receive_sms", "comment": null}, "count_sent_sms": {"type": "INT64", "index": 69, "name": "count_sent_sms", "comment": null}, "unique_count_sent_sms": {"type": "INT64", "index": 70, "name": "unique_count_sent_sms", "comment": null}, "count_unsubscribed_from_sms": {"type": "INT64", "index": 71, "name": "count_unsubscribed_from_sms", "comment": null}, "unique_count_unsubscribed_from_sms": {"type": "INT64", "index": 72, "name": "unique_count_unsubscribed_from_sms", "comment": null}, "count_failed_to_deliver_sms": {"type": "INT64", "index": 73, "name": "count_failed_to_deliver_sms", "comment": null}, "unique_count_failed_to_deliver_sms": {"type": "INT64", "index": 74, "name": "unique_count_failed_to_deliver_sms", "comment": null}, "campaign_variation_key": {"type": "STRING", "index": 75, "name": "campaign_variation_key", "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": 403.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.klaviyo.klaviyo__campaigns"}, "model.klaviyo.klaviyo__persons": {"metadata": {"type": "table", "schema": "dbt_test_klaviyo", "name": "klaviyo__persons", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"person_id": {"type": "STRING", "index": 1, "name": "person_id", "comment": null}, "address_1": {"type": "STRING", "index": 2, "name": "address_1", "comment": null}, "address_2": {"type": "INT64", "index": 3, "name": "address_2", "comment": null}, "city": {"type": "STRING", "index": 4, "name": "city", "comment": null}, "country": {"type": "STRING", "index": 5, "name": "country", "comment": null}, "zip": {"type": "INT64", "index": 6, "name": "zip", "comment": null}, "created_at": {"type": "STRING", "index": 7, "name": "created_at", "comment": null}, "email": {"type": "STRING", "index": 8, "name": "email", "comment": null}, "full_name": {"type": "STRING", "index": 9, "name": "full_name", "comment": null}, "latitude": {"type": "FLOAT64", "index": 10, "name": "latitude", "comment": null}, "longitude": {"type": "FLOAT64", "index": 11, "name": "longitude", "comment": null}, "organization": {"type": "INT64", "index": 12, "name": "organization", "comment": null}, "phone_number": {"type": "STRING", "index": 13, "name": "phone_number", "comment": null}, "region": {"type": "STRING", "index": 14, "name": "region", "comment": null}, "timezone": {"type": "STRING", "index": 15, "name": "timezone", "comment": null}, "title": {"type": "INT64", "index": 16, "name": "title", "comment": null}, "updated_at": {"type": "STRING", "index": 17, "name": "updated_at", "comment": null}, "source_relation": {"type": "STRING", "index": 18, "name": "source_relation", "comment": null}, "count_total_campaigns": {"type": "INT64", "index": 19, "name": "count_total_campaigns", "comment": null}, "count_total_flows": {"type": "INT64", "index": 20, "name": "count_total_flows", "comment": null}, "first_event_at": {"type": "TIMESTAMP", "index": 21, "name": "first_event_at", "comment": null}, "last_event_at": {"type": "TIMESTAMP", "index": 22, "name": "last_event_at", "comment": null}, "first_campaign_touch_at": {"type": "TIMESTAMP", "index": 23, "name": "first_campaign_touch_at", "comment": null}, "last_campaign_touch_at": {"type": "TIMESTAMP", "index": 24, "name": "last_campaign_touch_at", "comment": null}, "first_flow_touch_at": {"type": "TIMESTAMP", "index": 25, "name": "first_flow_touch_at", "comment": null}, "last_flow_touch_at": {"type": "TIMESTAMP", "index": 26, "name": "last_flow_touch_at", "comment": null}, "total_sum_revenue_refunded_order": {"type": "NUMERIC", "index": 27, "name": "total_sum_revenue_refunded_order", "comment": null}, "organic_sum_revenue_refunded_order": {"type": "NUMERIC", "index": 28, "name": "organic_sum_revenue_refunded_order", "comment": null}, "total_sum_revenue_placed_order": {"type": "NUMERIC", "index": 29, "name": "total_sum_revenue_placed_order", "comment": null}, "organic_sum_revenue_placed_order": {"type": "NUMERIC", "index": 30, "name": "organic_sum_revenue_placed_order", "comment": null}, "total_sum_revenue_ordered_product": {"type": "NUMERIC", "index": 31, "name": "total_sum_revenue_ordered_product", "comment": null}, "organic_sum_revenue_ordered_product": {"type": "NUMERIC", "index": 32, "name": "organic_sum_revenue_ordered_product", "comment": null}, "total_sum_revenue_checkout_started": {"type": "NUMERIC", "index": 33, "name": "total_sum_revenue_checkout_started", "comment": null}, "organic_sum_revenue_checkout_started": {"type": "NUMERIC", "index": 34, "name": "organic_sum_revenue_checkout_started", "comment": null}, "total_sum_revenue_cancelled_order": {"type": "NUMERIC", "index": 35, "name": "total_sum_revenue_cancelled_order", "comment": null}, "organic_sum_revenue_cancelled_order": {"type": "NUMERIC", "index": 36, "name": "organic_sum_revenue_cancelled_order", "comment": null}, "total_count_active_on_site": {"type": "INT64", "index": 37, "name": "total_count_active_on_site", "comment": null}, "total_count_viewed_product": {"type": "INT64", "index": 38, "name": "total_count_viewed_product", "comment": null}, "total_count_ordered_product": {"type": "INT64", "index": 39, "name": "total_count_ordered_product", "comment": null}, "total_count_placed_order": {"type": "INT64", "index": 40, "name": "total_count_placed_order", "comment": null}, "total_count_refunded_order": {"type": "INT64", "index": 41, "name": "total_count_refunded_order", "comment": null}, "total_count_cancelled_order": {"type": "INT64", "index": 42, "name": "total_count_cancelled_order", "comment": null}, "total_count_fulfilled_order": {"type": "INT64", "index": 43, "name": "total_count_fulfilled_order", "comment": null}, "total_count_received_email": {"type": "INT64", "index": 44, "name": "total_count_received_email", "comment": null}, "total_count_clicked_email": {"type": "INT64", "index": 45, "name": "total_count_clicked_email", "comment": null}, "total_count_opened_email": {"type": "INT64", "index": 46, "name": "total_count_opened_email", "comment": null}, "total_count_bounced_email": {"type": "INT64", "index": 47, "name": "total_count_bounced_email", "comment": null}, "total_count_marked_email_as_spam": {"type": "INT64", "index": 48, "name": "total_count_marked_email_as_spam", "comment": null}, "total_count_dropped_email": {"type": "INT64", "index": 49, "name": "total_count_dropped_email", "comment": null}, "total_count_subscribed_to_list": {"type": "INT64", "index": 50, "name": "total_count_subscribed_to_list", "comment": null}, "total_count_unsubscribed_to_list": {"type": "INT64", "index": 51, "name": "total_count_unsubscribed_to_list", "comment": null}, "total_count_unsubscribed": {"type": "INT64", "index": 52, "name": "total_count_unsubscribed", "comment": null}, "total_count_updated_email_preferences": {"type": "INT64", "index": 53, "name": "total_count_updated_email_preferences", "comment": null}, "total_count_subscribed_to_back_in_stock": {"type": "INT64", "index": 54, "name": "total_count_subscribed_to_back_in_stock", "comment": null}, "total_count_merged_profile": {"type": "INT64", "index": 55, "name": "total_count_merged_profile", "comment": null}, "total_count_received_sms": {"type": "INT64", "index": 56, "name": "total_count_received_sms", "comment": null}, "total_count_clicked_sms": {"type": "INT64", "index": 57, "name": "total_count_clicked_sms", "comment": null}, "total_count_consented_to_receive_sms": {"type": "INT64", "index": 58, "name": "total_count_consented_to_receive_sms", "comment": null}, "total_count_sent_sms": {"type": "INT64", "index": 59, "name": "total_count_sent_sms", "comment": null}, "total_count_unsubscribed_from_sms": {"type": "INT64", "index": 60, "name": "total_count_unsubscribed_from_sms", "comment": null}, "total_count_failed_to_deliver_sms": {"type": "INT64", "index": 61, "name": "total_count_failed_to_deliver_sms", "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": 385.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.klaviyo.klaviyo__persons"}, "seed.shopify_holistic_reporting_integration_tests.person": {"metadata": {"type": "table", "schema": "dbt_test", "name": "person", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "STRING", "index": 1, "name": "id", "comment": null}, "updated": {"type": "STRING", "index": 2, "name": "updated", "comment": null}, "created": {"type": "STRING", "index": 3, "name": "created", "comment": null}, "_fivetran_deleted": {"type": "BOOL", "index": 4, "name": "_fivetran_deleted", "comment": null}, "first_name": {"type": "STRING", "index": 5, "name": "first_name", "comment": null}, "last_name": {"type": "STRING", "index": 6, "name": "last_name", "comment": null}, "address_1": {"type": "STRING", "index": 7, "name": "address_1", "comment": null}, "address_2": {"type": "INT64", "index": 8, "name": "address_2", "comment": null}, "title": {"type": "INT64", "index": 9, "name": "title", "comment": null}, "timezone": {"type": "STRING", "index": 10, "name": "timezone", "comment": null}, "organization": {"type": "INT64", "index": 11, "name": "organization", "comment": null}, "region": {"type": "STRING", "index": 12, "name": "region", "comment": null}, "longitude": {"type": "FLOAT64", "index": 13, "name": "longitude", "comment": null}, "latitude": {"type": "FLOAT64", "index": 14, "name": "latitude", "comment": null}, "phone_number": {"type": "STRING", "index": 15, "name": "phone_number", "comment": null}, "country": {"type": "STRING", "index": 16, "name": "country", "comment": null}, "zip": {"type": "INT64", "index": 17, "name": "zip", "comment": null}, "city": {"type": "STRING", "index": 18, "name": "city", "comment": null}, "email": {"type": "STRING", "index": 19, "name": "email", "comment": null}, "custom_object": {"type": "STRING", "index": 20, "name": "custom_object", "comment": null}, "custom_email": {"type": "STRING", "index": 21, "name": "custom_email", "comment": null}, "custom_accepts_marketing": {"type": "BOOL", "index": 22, "name": "custom_accepts_marketing", "comment": null}, "custom_shopify_tags": {"type": "STRING", "index": 23, "name": "custom_shopify_tags", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 24, "name": "_fivetran_synced", "comment": null}, "custom_consent_form_id": {"type": "STRING", "index": 25, "name": "custom_consent_form_id", "comment": null}, "custom_source": {"type": "STRING", "index": 26, "name": "custom_source", "comment": null}, "custom_consent_method": {"type": "STRING", "index": 27, "name": "custom_consent_method", "comment": null}, "custom_consent": {"type": "INT64", "index": 28, "name": "custom_consent", "comment": null}, "custom_gift_giver_name": {"type": "INT64", "index": 29, "name": "custom_gift_giver_name", "comment": null}, "custom_state": {"type": "INT64", "index": 30, "name": "custom_state", "comment": null}, "custom_flow": {"type": "INT64", "index": 31, "name": "custom_flow", "comment": null}, "custom_gift_recipient_name": {"type": "INT64", "index": 32, "name": "custom_gift_recipient_name", "comment": null}, "custom_last_sign_in": {"type": "INT64", "index": 33, "name": "custom_last_sign_in", "comment": null}, "custom_consent_form_version": {"type": "INT64", "index": 34, "name": "custom_consent_form_version", "comment": null}, "custom_consent_timestamp": {"type": "INT64", "index": 35, "name": "custom_consent_timestamp", "comment": null}, "custom_mail_chimp_rating": {"type": "INT64", "index": 36, "name": "custom_mail_chimp_rating", "comment": null}, "custom_gift_recipient_email": {"type": "INT64", "index": 37, "name": "custom_gift_recipient_email", "comment": null}, "custom_gift_options": {"type": "INT64", "index": 38, "name": "custom_gift_options", "comment": null}, "custom_address": {"type": "INT64", "index": 39, "name": "custom_address", "comment": null}, "custom_subscription_expiration": {"type": "INT64", "index": 40, "name": "custom_subscription_expiration", "comment": null}, "custom_city": {"type": "INT64", "index": 41, "name": "custom_city", "comment": null}, "custom_address_line_2": {"type": "INT64", "index": 42, "name": "custom_address_line_2", "comment": null}, "custom_zipcode": {"type": "INT64", "index": 43, "name": "custom_zipcode", "comment": null}, "custom_expected_date_of_next_order": {"type": "STRING", "index": 44, "name": "custom_expected_date_of_next_order", "comment": null}, "custom_sms_attentive_signup": {"type": "INT64", "index": 45, "name": "custom_sms_attentive_signup", "comment": null}, "custom_phone": {"type": "INT64", "index": 46, "name": "custom_phone", "comment": null}, "custom_afterpay_order": {"type": "INT64", "index": 47, "name": "custom_afterpay_order", "comment": null}, "custom_phone_number_region": {"type": "STRING", "index": 48, "name": "custom_phone_number_region", "comment": null}, "custom_name": {"type": "INT64", "index": 49, "name": "custom_name", "comment": null}, "custom_referrer_name": {"type": "INT64", "index": 50, "name": "custom_referrer_name", "comment": null}, "custom_referrer_email": {"type": "INT64", "index": 51, "name": "custom_referrer_email", "comment": null}, "custom_birthday": {"type": "INT64", "index": 52, "name": "custom_birthday", "comment": null}, "custom_first_purchase_date_": {"type": "DATE", "index": 53, "name": "custom_first_purchase_date_", "comment": null}, "custom_unengaged": {"type": "INT64", "index": 54, "name": "custom_unengaged", "comment": null}, "custom_landing_page_tag": {"type": "INT64", "index": 55, "name": "custom_landing_page_tag", "comment": null}, "custom_fitness_goal": {"type": "INT64", "index": 56, "name": "custom_fitness_goal", "comment": null}, "custom_age": {"type": "INT64", "index": 57, "name": "custom_age", "comment": null}, "custom_workout": {"type": "INT64", "index": 58, "name": "custom_workout", "comment": null}, "custom_quiz": {"type": "INT64", "index": 59, "name": "custom_quiz", "comment": null}, "custom_breakfast": {"type": "INT64", "index": 60, "name": "custom_breakfast", "comment": null}, "custom_quiz_data": {"type": "INT64", "index": 61, "name": "custom_quiz_data", "comment": null}, "custom_raf_subscribe": {"type": "INT64", "index": 62, "name": "custom_raf_subscribe", "comment": null}, "custom_suppress": {"type": "INT64", "index": 63, "name": "custom_suppress", "comment": null}, "custom_sms_consent": {"type": "INT64", "index": 64, "name": "custom_sms_consent", "comment": null}, "custom_gift_option_dreambelt": {"type": "INT64", "index": 65, "name": "custom_gift_option_dreambelt", "comment": null}, "custom_gift_option_starter": {"type": "INT64", "index": 66, "name": "custom_gift_option_starter", "comment": null}, "custom_gift_option_machine": {"type": "INT64", "index": 67, "name": "custom_gift_option_machine", "comment": null}, "custom_landingpage_tag": {"type": "INT64", "index": 68, "name": "custom_landingpage_tag", "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": 546.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.shopify_holistic_reporting_integration_tests.person"}, "seed.shopify_holistic_reporting_integration_tests.campaign": {"metadata": {"type": "table", "schema": "dbt_test", "name": "campaign", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "STRING", "index": 1, "name": "id", "comment": null}, "from_name": {"type": "STRING", "index": 2, "name": "from_name", "comment": null}, "status_id": {"type": "INT64", "index": 3, "name": "status_id", "comment": null}, "is_segmented": {"type": "BOOL", "index": 4, "name": "is_segmented", "comment": null}, "campaign_type": {"type": "STRING", "index": 5, "name": "campaign_type", "comment": null}, "status_label": {"type": "STRING", "index": 6, "name": "status_label", "comment": null}, "from_email": {"type": "STRING", "index": 7, "name": "from_email", "comment": null}, "subject": {"type": "STRING", "index": 8, "name": "subject", "comment": null}, "name": {"type": "STRING", "index": 9, "name": "name", "comment": null}, "status": {"type": "STRING", "index": 10, "name": "status", "comment": null}, "created": {"type": "STRING", "index": 11, "name": "created", "comment": null}, "updated": {"type": "STRING", "index": 12, "name": "updated", "comment": null}, "send_time": {"type": "STRING", "index": 13, "name": "send_time", "comment": null}, "sent_at": {"type": "STRING", "index": 14, "name": "sent_at", "comment": null}, "_fivetran_deleted": {"type": "BOOL", "index": 15, "name": "_fivetran_deleted", "comment": null}, "email_template_id": {"type": "STRING", "index": 16, "name": "email_template_id", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 17, "name": "_fivetran_synced", "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": 362.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.shopify_holistic_reporting_integration_tests.campaign"}, "seed.shopify_holistic_reporting_integration_tests.shopify_product_variant_data": {"metadata": {"type": "table", "schema": "dbt_test", "name": "shopify_product_variant_data", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "product_id": {"type": "INT64", "index": 2, "name": "product_id", "comment": null}, "inventory_item_id": {"type": "INT64", "index": 3, "name": "inventory_item_id", "comment": null}, "title": {"type": "STRING", "index": 4, "name": "title", "comment": null}, "price": {"type": "INT64", "index": 5, "name": "price", "comment": null}, "sku": {"type": "INT64", "index": 6, "name": "sku", "comment": null}, "position": {"type": "INT64", "index": 7, "name": "position", "comment": null}, "inventory_policy": {"type": "STRING", "index": 8, "name": "inventory_policy", "comment": null}, "compare_at_price": {"type": "INT64", "index": 9, "name": "compare_at_price", "comment": null}, "fulfillment_service": {"type": "STRING", "index": 10, "name": "fulfillment_service", "comment": null}, "inventory_management": {"type": "STRING", "index": 11, "name": "inventory_management", "comment": null}, "created_at": {"type": "STRING", "index": 12, "name": "created_at", "comment": null}, "updated_at": {"type": "STRING", "index": 13, "name": "updated_at", "comment": null}, "taxable": {"type": "BOOL", "index": 14, "name": "taxable", "comment": null}, "barcode": {"type": "INT64", "index": 15, "name": "barcode", "comment": null}, "grams": {"type": "INT64", "index": 16, "name": "grams", "comment": null}, "image_id": {"type": "INT64", "index": 17, "name": "image_id", "comment": null}, "inventory_quantity": {"type": "INT64", "index": 18, "name": "inventory_quantity", "comment": null}, "weight": {"type": "INT64", "index": 19, "name": "weight", "comment": null}, "weight_unit": {"type": "STRING", "index": 20, "name": "weight_unit", "comment": null}, "old_inventory_quantity": {"type": "INT64", "index": 21, "name": "old_inventory_quantity", "comment": null}, "requires_shipping": {"type": "BOOL", "index": 22, "name": "requires_shipping", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 23, "name": "_fivetran_synced", "comment": null}, "option_2": {"type": "INT64", "index": 24, "name": "option_2", "comment": null}, "tax_code": {"type": "STRING", "index": 25, "name": "tax_code", "comment": null}, "option_3": {"type": "INT64", "index": 26, "name": "option_3", "comment": null}, "option_1": {"type": "STRING", "index": 27, "name": "option_1", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 5.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 948.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.shopify_holistic_reporting_integration_tests.shopify_product_variant_data"}, "seed.shopify_holistic_reporting_integration_tests.shopify_refund_data": {"metadata": {"type": "table", "schema": "dbt_test", "name": "shopify_refund_data", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "created_at": {"type": "STRING", "index": 2, "name": "created_at", "comment": null}, "processed_at": {"type": "STRING", "index": 3, "name": "processed_at", "comment": null}, "note": {"type": "STRING", "index": 4, "name": "note", "comment": null}, "restock": {"type": "BOOL", "index": 5, "name": "restock", "comment": null}, "user_id": {"type": "INT64", "index": 6, "name": "user_id", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 7, "name": "_fivetran_synced", "comment": null}, "total_duties_set": {"type": "INT64", "index": 8, "name": "total_duties_set", "comment": null}, "order_id": {"type": "INT64", "index": 9, "name": "order_id", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 5.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 431.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.shopify_holistic_reporting_integration_tests.shopify_refund_data"}, "seed.shopify_holistic_reporting_integration_tests.metric": {"metadata": {"type": "table", "schema": "dbt_test", "name": "metric", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "STRING", "index": 1, "name": "id", "comment": null}, "name": {"type": "STRING", "index": 2, "name": "name", "comment": null}, "integration_id": {"type": "STRING", "index": 3, "name": "integration_id", "comment": null}, "created": {"type": "STRING", "index": 4, "name": "created", "comment": null}, "updated": {"type": "STRING", "index": 5, "name": "updated", "comment": null}, "_fivetran_deleted": {"type": "BOOL", "index": 6, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 7, "name": "_fivetran_synced", "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": 181.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.shopify_holistic_reporting_integration_tests.metric"}, "seed.shopify_holistic_reporting_integration_tests.shopify_order_line_refund_data": {"metadata": {"type": "table", "schema": "dbt_test", "name": "shopify_order_line_refund_data", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "location_id": {"type": "INT64", "index": 2, "name": "location_id", "comment": null}, "refund_id": {"type": "INT64", "index": 3, "name": "refund_id", "comment": null}, "restock_type": {"type": "INT64", "index": 4, "name": "restock_type", "comment": null}, "quantity": {"type": "INT64", "index": 5, "name": "quantity", "comment": null}, "order_line_id": {"type": "INT64", "index": 6, "name": "order_line_id", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 7, "name": "_fivetran_synced", "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": "seed.shopify_holistic_reporting_integration_tests.shopify_order_line_refund_data"}, "seed.shopify_holistic_reporting_integration_tests.shopify_transaction_data": {"metadata": {"type": "table", "schema": "dbt_test", "name": "shopify_transaction_data", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "order_id": {"type": "INT64", "index": 2, "name": "order_id", "comment": null}, "refund_id": {"type": "INT64", "index": 3, "name": "refund_id", "comment": null}, "amount": {"type": "FLOAT64", "index": 4, "name": "amount", "comment": null}, "authorization": {"type": "STRING", "index": 5, "name": "authorization", "comment": null}, "created_at": {"type": "STRING", "index": 6, "name": "created_at", "comment": null}, "processed_at": {"type": "STRING", "index": 7, "name": "processed_at", "comment": null}, "device_id": {"type": "INT64", "index": 8, "name": "device_id", "comment": null}, "gateway": {"type": "STRING", "index": 9, "name": "gateway", "comment": null}, "source_name": {"type": "STRING", "index": 10, "name": "source_name", "comment": null}, "message": {"type": "STRING", "index": 11, "name": "message", "comment": null}, "currency": {"type": "STRING", "index": 12, "name": "currency", "comment": null}, "location_id": {"type": "INT64", "index": 13, "name": "location_id", "comment": null}, "parent_id": {"type": "INT64", "index": 14, "name": "parent_id", "comment": null}, "payment_avs_result_code": {"type": "STRING", "index": 15, "name": "payment_avs_result_code", "comment": null}, "kind": {"type": "STRING", "index": 16, "name": "kind", "comment": null}, "currency_exchange_id": {"type": "INT64", "index": 17, "name": "currency_exchange_id", "comment": null}, "currency_exchange_adjustment": {"type": "INT64", "index": 18, "name": "currency_exchange_adjustment", "comment": null}, "currency_exchange_original_amount": {"type": "INT64", "index": 19, "name": "currency_exchange_original_amount", "comment": null}, "currency_exchange_final_amount": {"type": "INT64", "index": 20, "name": "currency_exchange_final_amount", "comment": null}, "currency_exchange_currency": {"type": "INT64", "index": 21, "name": "currency_exchange_currency", "comment": null}, "error_code": {"type": "INT64", "index": 22, "name": "error_code", "comment": null}, "status": {"type": "STRING", "index": 23, "name": "status", "comment": null}, "test": {"type": "BOOL", "index": 24, "name": "test", "comment": null}, "user_id": {"type": "INT64", "index": 25, "name": "user_id", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 26, "name": "_fivetran_synced", "comment": null}, "payment_credit_card_bin": {"type": "INT64", "index": 27, "name": "payment_credit_card_bin", "comment": null}, "payment_cvv_result_code": {"type": "INT64", "index": 28, "name": "payment_cvv_result_code", "comment": null}, "payment_credit_card_number": {"type": "INT64", "index": 29, "name": "payment_credit_card_number", "comment": null}, "payment_credit_card_company": {"type": "INT64", "index": 30, "name": "payment_credit_card_company", "comment": null}, "receipt": {"type": "STRING", "index": 31, "name": "receipt", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 5.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 1045.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.shopify_holistic_reporting_integration_tests.shopify_transaction_data"}, "seed.shopify_holistic_reporting_integration_tests.integration": {"metadata": {"type": "table", "schema": "dbt_test", "name": "integration", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "STRING", "index": 1, "name": "id", "comment": null}, "category": {"type": "STRING", "index": 2, "name": "category", "comment": null}, "name": {"type": "STRING", "index": 3, "name": "name", "comment": null}, "_fivetran_deleted": {"type": "BOOL", "index": 4, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 5, "name": "_fivetran_synced", "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": 72.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.shopify_holistic_reporting_integration_tests.integration"}, "seed.shopify_holistic_reporting_integration_tests.event": {"metadata": {"type": "table", "schema": "dbt_test", "name": "event", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "STRING", "index": 1, "name": "id", "comment": null}, "person_id": {"type": "STRING", "index": 2, "name": "person_id", "comment": null}, "campaign_id": {"type": "STRING", "index": 3, "name": "campaign_id", "comment": null}, "flow_id": {"type": "STRING", "index": 4, "name": "flow_id", "comment": null}, "flow_message_id": {"type": "INT64", "index": 5, "name": "flow_message_id", "comment": null}, "uuid": {"type": "STRING", "index": 6, "name": "uuid", "comment": null}, "datetime": {"type": "STRING", "index": 7, "name": "datetime", "comment": null}, "timestamp": {"type": "STRING", "index": 8, "name": "timestamp", "comment": null}, "_fivetran_deleted": {"type": "BOOL", "index": 9, "name": "_fivetran_deleted", "comment": null}, "metric_id": {"type": "STRING", "index": 10, "name": "metric_id", "comment": null}, "type": {"type": "STRING", "index": 11, "name": "type", "comment": null}, "_variation": {"type": "STRING", "index": 12, "name": "_variation", "comment": null}, "property_value": {"type": "INT64", "index": 13, "name": "property_value", "comment": null}, "property_source_name": {"type": "INT64", "index": 14, "name": "property_source_name", "comment": null}, "property_extra": {"type": "INT64", "index": 15, "name": "property_extra", "comment": null}, "property_shipping_rate": {"type": "INT64", "index": 16, "name": "property_shipping_rate", "comment": null}, "property_items": {"type": "INT64", "index": 17, "name": "property_items", "comment": null}, "property_tags": {"type": "INT64", "index": 18, "name": "property_tags", "comment": null}, "property_item_count": {"type": "INT64", "index": 19, "name": "property_item_count", "comment": null}, "property_collections": {"type": "INT64", "index": 20, "name": "property_collections", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 21, "name": "_fivetran_synced", "comment": null}, "property_currency_code": {"type": "INT64", "index": 22, "name": "property_currency_code", "comment": null}, "property_product_id": {"type": "INT64", "index": 23, "name": "property_product_id", "comment": null}, "property_quantity": {"type": "INT64", "index": 24, "name": "property_quantity", "comment": null}, "property_name": {"type": "INT64", "index": 25, "name": "property_name", "comment": null}, "property_variant_option_title": {"type": "INT64", "index": 26, "name": "property_variant_option_title", "comment": null}, "property_sku": {"type": "INT64", "index": 27, "name": "property_sku", "comment": null}, "property_variant_name": {"type": "INT64", "index": 28, "name": "property_variant_name", "comment": null}, "property_vendor": {"type": "INT64", "index": 29, "name": "property_vendor", "comment": null}, "property_event_id": {"type": "STRING", "index": 30, "name": "property_event_id", "comment": null}, "property_total_discounts": {"type": "INT64", "index": 31, "name": "property_total_discounts", "comment": null}, "property_attribution": {"type": "INT64", "index": 32, "name": "property_attribution", "comment": null}, "property_discount_codes": {"type": "INT64", "index": 33, "name": "property_discount_codes", "comment": null}, "property_fulfillment_hours": {"type": "INT64", "index": 34, "name": "property_fulfillment_hours", "comment": null}, "property_fulfillment_status": {"type": "INT64", "index": 35, "name": "property_fulfillment_status", "comment": null}, "property_subject": {"type": "STRING", "index": 36, "name": "property_subject", "comment": null}, "property_title": {"type": "INT64", "index": 37, "name": "property_title", "comment": null}, "property_message_interaction": {"type": "INT64", "index": 38, "name": "property_message_interaction", "comment": null}, "property_url": {"type": "INT64", "index": 39, "name": "property_url", "comment": null}, "property_shipment_type": {"type": "INT64", "index": 40, "name": "property_shipment_type", "comment": null}, "property_courier_name": {"type": "INT64", "index": 41, "name": "property_courier_name", "comment": null}, "property_current_status": {"type": "INT64", "index": 42, "name": "property_current_status", "comment": null}, "property_tracking_ship_date": {"type": "INT64", "index": 43, "name": "property_tracking_ship_date", "comment": null}, "property_tracking_postal_code": {"type": "INT64", "index": 44, "name": "property_tracking_postal_code", "comment": null}, "property_shipment_package_count": {"type": "INT64", "index": 45, "name": "property_shipment_package_count", "comment": null}, "property_campaign_name": {"type": "STRING", "index": 46, "name": "property_campaign_name", "comment": null}, "property_cohort_message_send_cohort": {"type": "STRING", "index": 47, "name": "property_cohort_message_send_cohort", "comment": null}, "property_email_domain": {"type": "STRING", "index": 48, "name": "property_email_domain", "comment": null}, "property_bounce_type": {"type": "INT64", "index": 49, "name": "property_bounce_type", "comment": null}, "property_client_type": {"type": "INT64", "index": 50, "name": "property_client_type", "comment": null}, "property_client_os": {"type": "INT64", "index": 51, "name": "property_client_os", "comment": null}, "property_client_name": {"type": "INT64", "index": 52, "name": "property_client_name", "comment": null}, "property_client_os_family": {"type": "INT64", "index": 53, "name": "property_client_os_family", "comment": null}, "property_client_canonical": {"type": "INT64", "index": 54, "name": "property_client_canonical", "comment": null}, "property_page": {"type": "INT64", "index": 55, "name": "property_page", "comment": null}, "property_is_session_activity": {"type": "INT64", "index": 56, "name": "property_is_session_activity", "comment": null}, "property_os": {"type": "INT64", "index": 57, "name": "property_os", "comment": null}, "property_session_end": {"type": "INT64", "index": 58, "name": "property_session_end", "comment": null}, "property_browser": {"type": "INT64", "index": 59, "name": "property_browser", "comment": null}, "property_list": {"type": "INT64", "index": 60, "name": "property_list", "comment": null}, "property_compare_at_price": {"type": "INT64", "index": 61, "name": "property_compare_at_price", "comment": null}, "property_price": {"type": "INT64", "index": 62, "name": "property_price", "comment": null}, "property_image_url": {"type": "INT64", "index": 63, "name": "property_image_url", "comment": null}, "property_brand": {"type": "INT64", "index": 64, "name": "property_brand", "comment": null}, "property_categories": {"type": "INT64", "index": 65, "name": "property_categories", "comment": null}, "property_variant_option_size": {"type": "INT64", "index": 66, "name": "property_variant_option_size", "comment": null}, "property_attribute_workout": {"type": "INT64", "index": 67, "name": "property_attribute_workout", "comment": null}, "property_attribute_age": {"type": "INT64", "index": 68, "name": "property_attribute_age", "comment": null}, "property_attribute_fitness_goal": {"type": "INT64", "index": 69, "name": "property_attribute_fitness_goal", "comment": null}, "property_attribute_breakfast": {"type": "INT64", "index": 70, "name": "property_attribute_breakfast", "comment": null}, "property_variant_option_type": {"type": "INT64", "index": 71, "name": "property_variant_option_type", "comment": null}, "property_cohort_variation_send_cohort": {"type": "STRING", "index": 72, "name": "property_cohort_variation_send_cohort", "comment": null}, "property_method": {"type": "INT64", "index": 73, "name": "property_method", "comment": null}, "property_to_number": {"type": "INT64", "index": 74, "name": "property_to_number", "comment": null}, "property_message_type": {"type": "INT64", "index": 75, "name": "property_message_type", "comment": null}, "property_from_number": {"type": "INT64", "index": 76, "name": "property_from_number", "comment": null}, "property_message_format": {"type": "INT64", "index": 77, "name": "property_message_format", "comment": null}, "property_message_name": {"type": "INT64", "index": 78, "name": "property_message_name", "comment": null}, "property_carrier_delivery_status": {"type": "INT64", "index": 79, "name": "property_carrier_delivery_status", "comment": null}, "property_failure_type": {"type": "INT64", "index": 80, "name": "property_failure_type", "comment": null}, "property_failure_source": {"type": "INT64", "index": 81, "name": "property_failure_source", "comment": null}, "property_message_body": {"type": "INT64", "index": 82, "name": "property_message_body", "comment": null}, "property_email": {"type": "INT64", "index": 83, "name": "property_email", "comment": null}, "property_attribute_kit": {"type": "INT64", "index": 84, "name": "property_attribute_kit", "comment": null}, "property_vendor_error_code": {"type": "INT64", "index": 85, "name": "property_vendor_error_code", "comment": null}, "property_ordr_details": {"type": "INT64", "index": 86, "name": "property_ordr_details", "comment": null}, "property_date_to_send_gift": {"type": "INT64", "index": 87, "name": "property_date_to_send_gift", "comment": null}, "property_recipient_name": {"type": "INT64", "index": 88, "name": "property_recipient_name", "comment": null}, "property_attribute_facebook_order_retailer_id": {"type": "INT64", "index": 89, "name": "property_attribute_facebook_order_retailer_id", "comment": null}, "property_sender_s_name": {"type": "INT64", "index": 90, "name": "property_sender_s_name", "comment": null}, "property_attribute_kitid": {"type": "INT64", "index": 91, "name": "property_attribute_kitid", "comment": null}, "property_conversation_id": {"type": "INT64", "index": 92, "name": "property_conversation_id", "comment": null}, "property_conversation_link": {"type": "INT64", "index": 93, "name": "property_conversation_link", "comment": null}, "property_conversation_channel": {"type": "INT64", "index": 94, "name": "property_conversation_channel", "comment": null}, "property_rating": {"type": "INT64", "index": 95, "name": "property_rating", "comment": null}, "property_score": {"type": "INT64", "index": 96, "name": "property_score", "comment": null}, "property_from_phone_region": {"type": "INT64", "index": 97, "name": "property_from_phone_region", "comment": null}, "property_shipment_carrier": {"type": "INT64", "index": 98, "name": "property_shipment_carrier", "comment": null}, "property_shipment_status": {"type": "INT64", "index": 99, "name": "property_shipment_status", "comment": null}, "property_to_phone_region": {"type": "INT64", "index": 100, "name": "property_to_phone_region", "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": 577.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.shopify_holistic_reporting_integration_tests.event"}, "seed.shopify_holistic_reporting_integration_tests.flow": {"metadata": {"type": "table", "schema": "dbt_test", "name": "flow", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "STRING", "index": 1, "name": "id", "comment": null}, "name": {"type": "STRING", "index": 2, "name": "name", "comment": null}, "status": {"type": "STRING", "index": 3, "name": "status", "comment": null}, "created": {"type": "STRING", "index": 4, "name": "created", "comment": null}, "updated": {"type": "STRING", "index": 5, "name": "updated", "comment": null}, "customer_filter": {"type": "STRING", "index": 6, "name": "customer_filter", "comment": null}, "trigger": {"type": "STRING", "index": 7, "name": "trigger", "comment": null}, "_fivetran_deleted": {"type": "BOOL", "index": 8, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 9, "name": "_fivetran_synced", "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": 606.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.shopify_holistic_reporting_integration_tests.flow"}, "seed.shopify_holistic_reporting_integration_tests.shopify_order_data": {"metadata": {"type": "table", "schema": "dbt_test", "name": "shopify_order_data", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "note": {"type": "STRING", "index": 2, "name": "note", "comment": null}, "email": {"type": "STRING", "index": 3, "name": "email", "comment": null}, "taxes_included": {"type": "BOOL", "index": 4, "name": "taxes_included", "comment": null}, "currency": {"type": "STRING", "index": 5, "name": "currency", "comment": null}, "subtotal_price": {"type": "FLOAT64", "index": 6, "name": "subtotal_price", "comment": null}, "total_tax": {"type": "INT64", "index": 7, "name": "total_tax", "comment": null}, "total_price": {"type": "FLOAT64", "index": 8, "name": "total_price", "comment": null}, "created_at": {"type": "TIMESTAMP", "index": 9, "name": "created_at", "comment": null}, "updated_at": {"type": "TIMESTAMP", "index": 10, "name": "updated_at", "comment": null}, "name": {"type": "STRING", "index": 11, "name": "name", "comment": null}, "shipping_address_name": {"type": "STRING", "index": 12, "name": "shipping_address_name", "comment": null}, "shipping_address_first_name": {"type": "STRING", "index": 13, "name": "shipping_address_first_name", "comment": null}, "shipping_address_last_name": {"type": "STRING", "index": 14, "name": "shipping_address_last_name", "comment": null}, "shipping_address_company": {"type": "STRING", "index": 15, "name": "shipping_address_company", "comment": null}, "shipping_address_phone": {"type": "STRING", "index": 16, "name": "shipping_address_phone", "comment": null}, "shipping_address_address_1": {"type": "STRING", "index": 17, "name": "shipping_address_address_1", "comment": null}, "shipping_address_address_2": {"type": "STRING", "index": 18, "name": "shipping_address_address_2", "comment": null}, "shipping_address_city": {"type": "STRING", "index": 19, "name": "shipping_address_city", "comment": null}, "shipping_address_country": {"type": "STRING", "index": 20, "name": "shipping_address_country", "comment": null}, "shipping_address_country_code": {"type": "STRING", "index": 21, "name": "shipping_address_country_code", "comment": null}, "shipping_address_province": {"type": "STRING", "index": 22, "name": "shipping_address_province", "comment": null}, "shipping_address_province_code": {"type": "INT64", "index": 23, "name": "shipping_address_province_code", "comment": null}, "shipping_address_zip": {"type": "STRING", "index": 24, "name": "shipping_address_zip", "comment": null}, "shipping_address_latitude": {"type": "STRING", "index": 25, "name": "shipping_address_latitude", "comment": null}, "shipping_address_longitude": {"type": "STRING", "index": 26, "name": "shipping_address_longitude", "comment": null}, "billing_address_name": {"type": "STRING", "index": 27, "name": "billing_address_name", "comment": null}, "billing_address_first_name": {"type": "STRING", "index": 28, "name": "billing_address_first_name", "comment": null}, "billing_address_last_name": {"type": "STRING", "index": 29, "name": "billing_address_last_name", "comment": null}, "billing_address_company": {"type": "STRING", "index": 30, "name": "billing_address_company", "comment": null}, "billing_address_phone": {"type": "STRING", "index": 31, "name": "billing_address_phone", "comment": null}, "billing_address_address_1": {"type": "STRING", "index": 32, "name": "billing_address_address_1", "comment": null}, "billing_address_address_2": {"type": "STRING", "index": 33, "name": "billing_address_address_2", "comment": null}, "billing_address_city": {"type": "STRING", "index": 34, "name": "billing_address_city", "comment": null}, "billing_address_country": {"type": "STRING", "index": 35, "name": "billing_address_country", "comment": null}, "billing_address_country_code": {"type": "STRING", "index": 36, "name": "billing_address_country_code", "comment": null}, "billing_address_province": {"type": "STRING", "index": 37, "name": "billing_address_province", "comment": null}, "billing_address_province_code": {"type": "INT64", "index": 38, "name": "billing_address_province_code", "comment": null}, "billing_address_zip": {"type": "STRING", "index": 39, "name": "billing_address_zip", "comment": null}, "billing_address_latitude": {"type": "STRING", "index": 40, "name": "billing_address_latitude", "comment": null}, "billing_address_longitude": {"type": "STRING", "index": 41, "name": "billing_address_longitude", "comment": null}, "customer_id": {"type": "INT64", "index": 42, "name": "customer_id", "comment": null}, "location_id": {"type": "INT64", "index": 43, "name": "location_id", "comment": null}, "user_id": {"type": "INT64", "index": 44, "name": "user_id", "comment": null}, "number": {"type": "INT64", "index": 45, "name": "number", "comment": null}, "order_number": {"type": "INT64", "index": 46, "name": "order_number", "comment": null}, "financial_status": {"type": "STRING", "index": 47, "name": "financial_status", "comment": null}, "fulfillment_status": {"type": "STRING", "index": 48, "name": "fulfillment_status", "comment": null}, "processed_at": {"type": "TIMESTAMP", "index": 49, "name": "processed_at", "comment": null}, "processing_method": {"type": "STRING", "index": 50, "name": "processing_method", "comment": null}, "referring_site": {"type": "STRING", "index": 51, "name": "referring_site", "comment": null}, "cancel_reason": {"type": "INT64", "index": 52, "name": "cancel_reason", "comment": null}, "cancelled_at": {"type": "TIMESTAMP", "index": 53, "name": "cancelled_at", "comment": null}, "closed_at": {"type": "STRING", "index": 54, "name": "closed_at", "comment": null}, "total_discounts": {"type": "FLOAT64", "index": 55, "name": "total_discounts", "comment": null}, "total_line_items_price": {"type": "FLOAT64", "index": 56, "name": "total_line_items_price", "comment": null}, "total_weight": {"type": "INT64", "index": 57, "name": "total_weight", "comment": null}, "source_name": {"type": "STRING", "index": 58, "name": "source_name", "comment": null}, "browser_ip": {"type": "STRING", "index": 59, "name": "browser_ip", "comment": null}, "buyer_accepts_marketing": {"type": "BOOL", "index": 60, "name": "buyer_accepts_marketing", "comment": null}, "token": {"type": "STRING", "index": 61, "name": "token", "comment": null}, "cart_token": {"type": "STRING", "index": 62, "name": "cart_token", "comment": null}, "checkout_token": {"type": "STRING", "index": 63, "name": "checkout_token", "comment": null}, "test": {"type": "BOOL", "index": 64, "name": "test", "comment": null}, "landing_site_base_url": {"type": "STRING", "index": 65, "name": "landing_site_base_url", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 66, "name": "_fivetran_synced", "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": 3850.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.shopify_holistic_reporting_integration_tests.shopify_order_data"}, "seed.shopify_holistic_reporting_integration_tests.shopify_order_line_data": {"metadata": {"type": "table", "schema": "dbt_test", "name": "shopify_order_line_data", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"order_id": {"type": "INT64", "index": 1, "name": "order_id", "comment": null}, "id": {"type": "INT64", "index": 2, "name": "id", "comment": null}, "product_id": {"type": "INT64", "index": 3, "name": "product_id", "comment": null}, "variant_id": {"type": "INT64", "index": 4, "name": "variant_id", "comment": null}, "name": {"type": "STRING", "index": 5, "name": "name", "comment": null}, "title": {"type": "STRING", "index": 6, "name": "title", "comment": null}, "vendor": {"type": "STRING", "index": 7, "name": "vendor", "comment": null}, "price": {"type": "FLOAT64", "index": 8, "name": "price", "comment": null}, "quantity": {"type": "INT64", "index": 9, "name": "quantity", "comment": null}, "grams": {"type": "INT64", "index": 10, "name": "grams", "comment": null}, "sku": {"type": "STRING", "index": 11, "name": "sku", "comment": null}, "fulfillable_quantity": {"type": "INT64", "index": 12, "name": "fulfillable_quantity", "comment": null}, "fulfillment_service": {"type": "STRING", "index": 13, "name": "fulfillment_service", "comment": null}, "gift_card": {"type": "BOOL", "index": 14, "name": "gift_card", "comment": null}, "requires_shipping": {"type": "BOOL", "index": 15, "name": "requires_shipping", "comment": null}, "taxable": {"type": "BOOL", "index": 16, "name": "taxable", "comment": null}, "index": {"type": "INT64", "index": 17, "name": "index", "comment": null}, "total_discount": {"type": "INT64", "index": 18, "name": "total_discount", "comment": null}, "pre_tax_price": {"type": "INT64", "index": 19, "name": "pre_tax_price", "comment": null}, "fulfillment_status": {"type": "STRING", "index": 20, "name": "fulfillment_status", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 21, "name": "_fivetran_synced", "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": 727.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.shopify_holistic_reporting_integration_tests.shopify_order_line_data"}, "seed.shopify_holistic_reporting_integration_tests.shopify_product_data": {"metadata": {"type": "table", "schema": "dbt_test", "name": "shopify_product_data", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "title": {"type": "STRING", "index": 2, "name": "title", "comment": null}, "handle": {"type": "STRING", "index": 3, "name": "handle", "comment": null}, "product_type": {"type": "STRING", "index": 4, "name": "product_type", "comment": null}, "vendor": {"type": "STRING", "index": 5, "name": "vendor", "comment": null}, "created_at": {"type": "TIMESTAMP", "index": 6, "name": "created_at", "comment": null}, "updated_at": {"type": "TIMESTAMP", "index": 7, "name": "updated_at", "comment": null}, "published_at": {"type": "TIMESTAMP", "index": 8, "name": "published_at", "comment": null}, "published_scope": {"type": "STRING", "index": 9, "name": "published_scope", "comment": null}, "_fivetran_deleted": {"type": "BOOL", "index": 10, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 11, "name": "_fivetran_synced", "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": 549.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.shopify_holistic_reporting_integration_tests.shopify_product_data"}, "seed.shopify_holistic_reporting_integration_tests.shopify_order_adjustment_data": {"metadata": {"type": "table", "schema": "dbt_test", "name": "shopify_order_adjustment_data", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "order_id": {"type": "INT64", "index": 2, "name": "order_id", "comment": null}, "refund_id": {"type": "INT64", "index": 3, "name": "refund_id", "comment": null}, "amount": {"type": "INT64", "index": 4, "name": "amount", "comment": null}, "tax_amount": {"type": "FLOAT64", "index": 5, "name": "tax_amount", "comment": null}, "kind": {"type": "STRING", "index": 6, "name": "kind", "comment": null}, "reason": {"type": "STRING", "index": 7, "name": "reason", "comment": null}, "amount_set": {"type": "INT64", "index": 8, "name": "amount_set", "comment": null}, "tax_amount_set": {"type": "INT64", "index": 9, "name": "tax_amount_set", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 10, "name": "_fivetran_synced", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 5.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 416.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.shopify_holistic_reporting_integration_tests.shopify_order_adjustment_data"}, "seed.shopify_holistic_reporting_integration_tests.shopify_customer_data": {"metadata": {"type": "table", "schema": "dbt_test", "name": "shopify_customer_data", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "first_name": {"type": "STRING", "index": 2, "name": "first_name", "comment": null}, "last_name": {"type": "STRING", "index": 3, "name": "last_name", "comment": null}, "email": {"type": "STRING", "index": 4, "name": "email", "comment": null}, "phone": {"type": "INT64", "index": 5, "name": "phone", "comment": null}, "state": {"type": "STRING", "index": 6, "name": "state", "comment": null}, "orders_count": {"type": "INT64", "index": 7, "name": "orders_count", "comment": null}, "total_spent": {"type": "FLOAT64", "index": 8, "name": "total_spent", "comment": null}, "created_at": {"type": "TIMESTAMP", "index": 9, "name": "created_at", "comment": null}, "updated_at": {"type": "TIMESTAMP", "index": 10, "name": "updated_at", "comment": null}, "accepts_marketing": {"type": "BOOL", "index": 11, "name": "accepts_marketing", "comment": null}, "tax_exempt": {"type": "BOOL", "index": 12, "name": "tax_exempt", "comment": null}, "verified_email": {"type": "BOOL", "index": 13, "name": "verified_email", "comment": null}, "default_address_id": {"type": "INT64", "index": 14, "name": "default_address_id", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 15, "name": "_fivetran_synced", "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": 512.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.shopify_holistic_reporting_integration_tests.shopify_customer_data"}, "model.shopify.shopify__calendar": {"metadata": {"type": "table", "schema": "dbt_test_shopify", "name": "shopify__calendar", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"date_day": {"type": "DATETIME", "index": 1, "name": "date_day", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 1381.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 11048.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.shopify.shopify__calendar"}, "model.shopify.shopify__orders": {"metadata": {"type": "table", "schema": "dbt_test_shopify", "name": "shopify__orders", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"order_id": {"type": "INT64", "index": 1, "name": "order_id", "comment": null}, "processed_timestamp": {"type": "TIMESTAMP", "index": 2, "name": "processed_timestamp", "comment": null}, "updated_timestamp": {"type": "TIMESTAMP", "index": 3, "name": "updated_timestamp", "comment": null}, "user_id": {"type": "INT64", "index": 4, "name": "user_id", "comment": null}, "total_discounts": {"type": "FLOAT64", "index": 5, "name": "total_discounts", "comment": null}, "total_line_items_price": {"type": "FLOAT64", "index": 6, "name": "total_line_items_price", "comment": null}, "total_price": {"type": "FLOAT64", "index": 7, "name": "total_price", "comment": null}, "total_tax": {"type": "INT64", "index": 8, "name": "total_tax", "comment": null}, "source_name": {"type": "STRING", "index": 9, "name": "source_name", "comment": null}, "subtotal_price": {"type": "FLOAT64", "index": 10, "name": "subtotal_price", "comment": null}, "has_taxes_included": {"type": "BOOL", "index": 11, "name": "has_taxes_included", "comment": null}, "total_weight": {"type": "INT64", "index": 12, "name": "total_weight", "comment": null}, "landing_site_base_url": {"type": "STRING", "index": 13, "name": "landing_site_base_url", "comment": null}, "location_id": {"type": "INT64", "index": 14, "name": "location_id", "comment": null}, "name": {"type": "STRING", "index": 15, "name": "name", "comment": null}, "note": {"type": "STRING", "index": 16, "name": "note", "comment": null}, "number": {"type": "INT64", "index": 17, "name": "number", "comment": null}, "order_number": {"type": "INT64", "index": 18, "name": "order_number", "comment": null}, "cancel_reason": {"type": "INT64", "index": 19, "name": "cancel_reason", "comment": null}, "cancelled_timestamp": {"type": "TIMESTAMP", "index": 20, "name": "cancelled_timestamp", "comment": null}, "cart_token": {"type": "STRING", "index": 21, "name": "cart_token", "comment": null}, "checkout_token": {"type": "STRING", "index": 22, "name": "checkout_token", "comment": null}, "closed_timestamp": {"type": "STRING", "index": 23, "name": "closed_timestamp", "comment": null}, "created_timestamp": {"type": "TIMESTAMP", "index": 24, "name": "created_timestamp", "comment": null}, "currency": {"type": "STRING", "index": 25, "name": "currency", "comment": null}, "customer_id": {"type": "INT64", "index": 26, "name": "customer_id", "comment": null}, "email": {"type": "STRING", "index": 27, "name": "email", "comment": null}, "financial_status": {"type": "STRING", "index": 28, "name": "financial_status", "comment": null}, "fulfillment_status": {"type": "STRING", "index": 29, "name": "fulfillment_status", "comment": null}, "processing_method": {"type": "STRING", "index": 30, "name": "processing_method", "comment": null}, "referring_site": {"type": "STRING", "index": 31, "name": "referring_site", "comment": null}, "billing_address_address_1": {"type": "STRING", "index": 32, "name": "billing_address_address_1", "comment": null}, "billing_address_address_2": {"type": "STRING", "index": 33, "name": "billing_address_address_2", "comment": null}, "billing_address_city": {"type": "STRING", "index": 34, "name": "billing_address_city", "comment": null}, "billing_address_company": {"type": "STRING", "index": 35, "name": "billing_address_company", "comment": null}, "billing_address_country": {"type": "STRING", "index": 36, "name": "billing_address_country", "comment": null}, "billing_address_country_code": {"type": "STRING", "index": 37, "name": "billing_address_country_code", "comment": null}, "billing_address_first_name": {"type": "STRING", "index": 38, "name": "billing_address_first_name", "comment": null}, "billing_address_last_name": {"type": "STRING", "index": 39, "name": "billing_address_last_name", "comment": null}, "billing_address_latitude": {"type": "STRING", "index": 40, "name": "billing_address_latitude", "comment": null}, "billing_address_longitude": {"type": "STRING", "index": 41, "name": "billing_address_longitude", "comment": null}, "billing_address_name": {"type": "STRING", "index": 42, "name": "billing_address_name", "comment": null}, "billing_address_phone": {"type": "STRING", "index": 43, "name": "billing_address_phone", "comment": null}, "billing_address_province": {"type": "STRING", "index": 44, "name": "billing_address_province", "comment": null}, "billing_address_province_code": {"type": "INT64", "index": 45, "name": "billing_address_province_code", "comment": null}, "billing_address_zip": {"type": "STRING", "index": 46, "name": "billing_address_zip", "comment": null}, "browser_ip": {"type": "STRING", "index": 47, "name": "browser_ip", "comment": null}, "has_buyer_accepted_marketing": {"type": "BOOL", "index": 48, "name": "has_buyer_accepted_marketing", "comment": null}, "total_shipping_price_set": {"type": "STRING", "index": 49, "name": "total_shipping_price_set", "comment": null}, "shipping_address_address_1": {"type": "STRING", "index": 50, "name": "shipping_address_address_1", "comment": null}, "shipping_address_address_2": {"type": "STRING", "index": 51, "name": "shipping_address_address_2", "comment": null}, "shipping_address_city": {"type": "STRING", "index": 52, "name": "shipping_address_city", "comment": null}, "shipping_address_company": {"type": "STRING", "index": 53, "name": "shipping_address_company", "comment": null}, "shipping_address_country": {"type": "STRING", "index": 54, "name": "shipping_address_country", "comment": null}, "shipping_address_country_code": {"type": "STRING", "index": 55, "name": "shipping_address_country_code", "comment": null}, "shipping_address_first_name": {"type": "STRING", "index": 56, "name": "shipping_address_first_name", "comment": null}, "shipping_address_last_name": {"type": "STRING", "index": 57, "name": "shipping_address_last_name", "comment": null}, "shipping_address_latitude": {"type": "STRING", "index": 58, "name": "shipping_address_latitude", "comment": null}, "shipping_address_longitude": {"type": "STRING", "index": 59, "name": "shipping_address_longitude", "comment": null}, "shipping_address_name": {"type": "STRING", "index": 60, "name": "shipping_address_name", "comment": null}, "shipping_address_phone": {"type": "STRING", "index": 61, "name": "shipping_address_phone", "comment": null}, "shipping_address_province": {"type": "STRING", "index": 62, "name": "shipping_address_province", "comment": null}, "shipping_address_province_code": {"type": "INT64", "index": 63, "name": "shipping_address_province_code", "comment": null}, "shipping_address_zip": {"type": "STRING", "index": 64, "name": "shipping_address_zip", "comment": null}, "is_test_order": {"type": "BOOL", "index": 65, "name": "is_test_order", "comment": null}, "token": {"type": "STRING", "index": 66, "name": "token", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 67, "name": "_fivetran_synced", "comment": null}, "source_relation": {"type": "STRING", "index": 68, "name": "source_relation", "comment": null}, "shipping_cost": {"type": "FLOAT64", "index": 69, "name": "shipping_cost", "comment": null}, "order_adjustment_amount": {"type": "INT64", "index": 70, "name": "order_adjustment_amount", "comment": null}, "order_adjustment_tax_amount": {"type": "FLOAT64", "index": 71, "name": "order_adjustment_tax_amount", "comment": null}, "refund_subtotal": {"type": "NUMERIC", "index": 72, "name": "refund_subtotal", "comment": null}, "refund_total_tax": {"type": "NUMERIC", "index": 73, "name": "refund_total_tax", "comment": null}, "order_adjusted_total": {"type": "FLOAT64", "index": 74, "name": "order_adjusted_total", "comment": null}, "line_item_count": {"type": "INT64", "index": 75, "name": "line_item_count", "comment": null}, "customer_order_seq_number": {"type": "INT64", "index": 76, "name": "customer_order_seq_number", "comment": null}, "new_vs_repeat": {"type": "STRING", "index": 77, "name": "new_vs_repeat", "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": 3970.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.shopify.shopify__orders"}, "model.shopify.shopify__customer_cohorts": {"metadata": {"type": "table", "schema": "dbt_test_shopify", "name": "shopify__customer_cohorts", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"date_month": {"type": "DATETIME", "index": 1, "name": "date_month", "comment": null}, "customer_id": {"type": "INT64", "index": 2, "name": "customer_id", "comment": null}, "first_order_timestamp": {"type": "TIMESTAMP", "index": 3, "name": "first_order_timestamp", "comment": null}, "cohort_month": {"type": "TIMESTAMP", "index": 4, "name": "cohort_month", "comment": null}, "source_relation": {"type": "STRING", "index": 5, "name": "source_relation", "comment": null}, "order_count_in_month": {"type": "INT64", "index": 6, "name": "order_count_in_month", "comment": null}, "total_price_in_month": {"type": "FLOAT64", "index": 7, "name": "total_price_in_month", "comment": null}, "line_item_count_in_month": {"type": "INT64", "index": 8, "name": "line_item_count_in_month", "comment": null}, "total_price_lifetime": {"type": "FLOAT64", "index": 9, "name": "total_price_lifetime", "comment": null}, "order_count_lifetime": {"type": "INT64", "index": 10, "name": "order_count_lifetime", "comment": null}, "line_item_count_lifetime": {"type": "INT64", "index": 11, "name": "line_item_count_lifetime", "comment": null}, "cohort_month_number": {"type": "INT64", "index": 12, "name": "cohort_month_number", "comment": null}, "customer_cohort_id": {"type": "STRING", "index": 13, "name": "customer_cohort_id", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 52.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 6448.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.shopify.shopify__customer_cohorts"}, "model.shopify.shopify__transactions": {"metadata": {"type": "table", "schema": "dbt_test_shopify", "name": "shopify__transactions", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"transaction_id": {"type": "INT64", "index": 1, "name": "transaction_id", "comment": null}, "order_id": {"type": "INT64", "index": 2, "name": "order_id", "comment": null}, "refund_id": {"type": "INT64", "index": 3, "name": "refund_id", "comment": null}, "amount": {"type": "FLOAT64", "index": 4, "name": "amount", "comment": null}, "created_timestamp": {"type": "STRING", "index": 5, "name": "created_timestamp", "comment": null}, "processed_timestamp": {"type": "STRING", "index": 6, "name": "processed_timestamp", "comment": null}, "device_id": {"type": "INT64", "index": 7, "name": "device_id", "comment": null}, "gateway": {"type": "STRING", "index": 8, "name": "gateway", "comment": null}, "source_name": {"type": "STRING", "index": 9, "name": "source_name", "comment": null}, "message": {"type": "STRING", "index": 10, "name": "message", "comment": null}, "currency": {"type": "STRING", "index": 11, "name": "currency", "comment": null}, "location_id": {"type": "INT64", "index": 12, "name": "location_id", "comment": null}, "parent_id": {"type": "INT64", "index": 13, "name": "parent_id", "comment": null}, "payment_avs_result_code": {"type": "STRING", "index": 14, "name": "payment_avs_result_code", "comment": null}, "payment_credit_card_bin": {"type": "INT64", "index": 15, "name": "payment_credit_card_bin", "comment": null}, "payment_cvv_result_code": {"type": "INT64", "index": 16, "name": "payment_cvv_result_code", "comment": null}, "payment_credit_card_number": {"type": "INT64", "index": 17, "name": "payment_credit_card_number", "comment": null}, "payment_credit_card_company": {"type": "INT64", "index": 18, "name": "payment_credit_card_company", "comment": null}, "kind": {"type": "STRING", "index": 19, "name": "kind", "comment": null}, "receipt": {"type": "STRING", "index": 20, "name": "receipt", "comment": null}, "currency_exchange_id": {"type": "INT64", "index": 21, "name": "currency_exchange_id", "comment": null}, "currency_exchange_adjustment": {"type": "INT64", "index": 22, "name": "currency_exchange_adjustment", "comment": null}, "currency_exchange_original_amount": {"type": "INT64", "index": 23, "name": "currency_exchange_original_amount", "comment": null}, "currency_exchange_final_amount": {"type": "INT64", "index": 24, "name": "currency_exchange_final_amount", "comment": null}, "currency_exchange_currency": {"type": "INT64", "index": 25, "name": "currency_exchange_currency", "comment": null}, "error_code": {"type": "INT64", "index": 26, "name": "error_code", "comment": null}, "status": {"type": "STRING", "index": 27, "name": "status", "comment": null}, "test": {"type": "BOOL", "index": 28, "name": "test", "comment": null}, "user_id": {"type": "INT64", "index": 29, "name": "user_id", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 30, "name": "_fivetran_synced", "comment": null}, "source_relation": {"type": "STRING", "index": 31, "name": "source_relation", "comment": null}, "exchange_rate": {"type": "NUMERIC", "index": 32, "name": "exchange_rate", "comment": null}, "currency_exchange_calculated_amount": {"type": "FLOAT64", "index": 33, "name": "currency_exchange_calculated_amount", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 5.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 1119.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.shopify.shopify__transactions"}, "model.shopify.shopify__order_lines": {"metadata": {"type": "table", "schema": "dbt_test_shopify", "name": "shopify__order_lines", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"_fivetran_synced": {"type": "TIMESTAMP", "index": 1, "name": "_fivetran_synced", "comment": null}, "fulfillable_quantity": {"type": "INT64", "index": 2, "name": "fulfillable_quantity", "comment": null}, "fulfillment_service": {"type": "STRING", "index": 3, "name": "fulfillment_service", "comment": null}, "fulfillment_status": {"type": "STRING", "index": 4, "name": "fulfillment_status", "comment": null}, "is_gift_card": {"type": "BOOL", "index": 5, "name": "is_gift_card", "comment": null}, "grams": {"type": "INT64", "index": 6, "name": "grams", "comment": null}, "order_line_id": {"type": "INT64", "index": 7, "name": "order_line_id", "comment": null}, "index": {"type": "INT64", "index": 8, "name": "index", "comment": null}, "name": {"type": "STRING", "index": 9, "name": "name", "comment": null}, "order_id": {"type": "INT64", "index": 10, "name": "order_id", "comment": null}, "pre_tax_price": {"type": "INT64", "index": 11, "name": "pre_tax_price", "comment": null}, "price": {"type": "FLOAT64", "index": 12, "name": "price", "comment": null}, "product_id": {"type": "INT64", "index": 13, "name": "product_id", "comment": null}, "property_charge_interval_frequency": {"type": "NUMERIC", "index": 14, "name": "property_charge_interval_frequency", "comment": null}, "property_for_shipping_jan_3_rd_2020": {"type": "STRING", "index": 15, "name": "property_for_shipping_jan_3_rd_2020", "comment": null}, "property_shipping_interval_frequency": {"type": "NUMERIC", "index": 16, "name": "property_shipping_interval_frequency", "comment": null}, "property_shipping_interval_unit_type": {"type": "STRING", "index": 17, "name": "property_shipping_interval_unit_type", "comment": null}, "property_subscription_id": {"type": "NUMERIC", "index": 18, "name": "property_subscription_id", "comment": null}, "quantity": {"type": "INT64", "index": 19, "name": "quantity", "comment": null}, "is_requiring_shipping": {"type": "BOOL", "index": 20, "name": "is_requiring_shipping", "comment": null}, "sku": {"type": "STRING", "index": 21, "name": "sku", "comment": null}, "is_taxable": {"type": "BOOL", "index": 22, "name": "is_taxable", "comment": null}, "title": {"type": "STRING", "index": 23, "name": "title", "comment": null}, "total_discount": {"type": "INT64", "index": 24, "name": "total_discount", "comment": null}, "variant_id": {"type": "INT64", "index": 25, "name": "variant_id", "comment": null}, "vendor": {"type": "STRING", "index": 26, "name": "vendor", "comment": null}, "source_relation": {"type": "STRING", "index": 27, "name": "source_relation", "comment": null}, "refunded_quantity": {"type": "INT64", "index": 28, "name": "refunded_quantity", "comment": null}, "refunded_subtotal": {"type": "NUMERIC", "index": 29, "name": "refunded_subtotal", "comment": null}, "quantity_net_refunds": {"type": "INT64", "index": 30, "name": "quantity_net_refunds", "comment": null}, "subtotal_net_refunds": {"type": "NUMERIC", "index": 31, "name": "subtotal_net_refunds", "comment": null}, "variant_created_at": {"type": "STRING", "index": 32, "name": "variant_created_at", "comment": null}, "variant_updated_at": {"type": "STRING", "index": 33, "name": "variant_updated_at", "comment": null}, "inventory_item_id": {"type": "INT64", "index": 34, "name": "inventory_item_id", "comment": null}, "image_id": {"type": "INT64", "index": 35, "name": "image_id", "comment": null}, "variant_title": {"type": "STRING", "index": 36, "name": "variant_title", "comment": null}, "variant_price": {"type": "INT64", "index": 37, "name": "variant_price", "comment": null}, "variant_sku": {"type": "INT64", "index": 38, "name": "variant_sku", "comment": null}, "variant_position": {"type": "INT64", "index": 39, "name": "variant_position", "comment": null}, "variant_inventory_policy": {"type": "STRING", "index": 40, "name": "variant_inventory_policy", "comment": null}, "variant_compare_at_price": {"type": "INT64", "index": 41, "name": "variant_compare_at_price", "comment": null}, "variant_fulfillment_service": {"type": "STRING", "index": 42, "name": "variant_fulfillment_service", "comment": null}, "variant_inventory_management": {"type": "STRING", "index": 43, "name": "variant_inventory_management", "comment": null}, "variant_is_taxable": {"type": "BOOL", "index": 44, "name": "variant_is_taxable", "comment": null}, "variant_barcode": {"type": "INT64", "index": 45, "name": "variant_barcode", "comment": null}, "variant_grams": {"type": "INT64", "index": 46, "name": "variant_grams", "comment": null}, "variant_inventory_quantity": {"type": "INT64", "index": 47, "name": "variant_inventory_quantity", "comment": null}, "variant_weight": {"type": "INT64", "index": 48, "name": "variant_weight", "comment": null}, "variant_weight_unit": {"type": "STRING", "index": 49, "name": "variant_weight_unit", "comment": null}, "variant_option_1": {"type": "STRING", "index": 50, "name": "variant_option_1", "comment": null}, "variant_option_2": {"type": "INT64", "index": 51, "name": "variant_option_2", "comment": null}, "variant_option_3": {"type": "INT64", "index": 52, "name": "variant_option_3", "comment": null}, "variant_tax_code": {"type": "STRING", "index": 53, "name": "variant_tax_code", "comment": null}, "variant_is_requiring_shipping": {"type": "BOOL", "index": 54, "name": "variant_is_requiring_shipping", "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": 829.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.shopify.shopify__order_lines"}, "model.shopify.shopify__customers": {"metadata": {"type": "table", "schema": "dbt_test_shopify", "name": "shopify__customers", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"_fivetran_synced": {"type": "TIMESTAMP", "index": 1, "name": "_fivetran_synced", "comment": null}, "has_accepted_marketing": {"type": "BOOL", "index": 2, "name": "has_accepted_marketing", "comment": null}, "created_timestamp": {"type": "TIMESTAMP", "index": 3, "name": "created_timestamp", "comment": null}, "default_address_id": {"type": "INT64", "index": 4, "name": "default_address_id", "comment": null}, "email": {"type": "STRING", "index": 5, "name": "email", "comment": null}, "first_name": {"type": "STRING", "index": 6, "name": "first_name", "comment": null}, "customer_id": {"type": "INT64", "index": 7, "name": "customer_id", "comment": null}, "last_name": {"type": "STRING", "index": 8, "name": "last_name", "comment": null}, "phone": {"type": "INT64", "index": 9, "name": "phone", "comment": null}, "account_state": {"type": "STRING", "index": 10, "name": "account_state", "comment": null}, "is_tax_exempt": {"type": "BOOL", "index": 11, "name": "is_tax_exempt", "comment": null}, "updated_timestamp": {"type": "TIMESTAMP", "index": 12, "name": "updated_timestamp", "comment": null}, "is_verified_email": {"type": "BOOL", "index": 13, "name": "is_verified_email", "comment": null}, "source_relation": {"type": "STRING", "index": 14, "name": "source_relation", "comment": null}, "first_order_timestamp": {"type": "TIMESTAMP", "index": 15, "name": "first_order_timestamp", "comment": null}, "most_recent_order_timestamp": {"type": "TIMESTAMP", "index": 16, "name": "most_recent_order_timestamp", "comment": null}, "average_order_value": {"type": "FLOAT64", "index": 17, "name": "average_order_value", "comment": null}, "lifetime_total_spent": {"type": "FLOAT64", "index": 18, "name": "lifetime_total_spent", "comment": null}, "lifetime_total_refunded": {"type": "FLOAT64", "index": 19, "name": "lifetime_total_refunded", "comment": null}, "lifetime_total_amount": {"type": "FLOAT64", "index": 20, "name": "lifetime_total_amount", "comment": null}, "lifetime_count_orders": {"type": "INT64", "index": 21, "name": "lifetime_count_orders", "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": 622.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.shopify.shopify__customers"}, "model.shopify.shopify__products": {"metadata": {"type": "table", "schema": "dbt_test_shopify", "name": "shopify__products", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"_fivetran_deleted": {"type": "BOOL", "index": 1, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 2, "name": "_fivetran_synced", "comment": null}, "created_timestamp": {"type": "TIMESTAMP", "index": 3, "name": "created_timestamp", "comment": null}, "handle": {"type": "STRING", "index": 4, "name": "handle", "comment": null}, "product_id": {"type": "INT64", "index": 5, "name": "product_id", "comment": null}, "product_type": {"type": "STRING", "index": 6, "name": "product_type", "comment": null}, "published_timestamp": {"type": "TIMESTAMP", "index": 7, "name": "published_timestamp", "comment": null}, "published_scope": {"type": "STRING", "index": 8, "name": "published_scope", "comment": null}, "title": {"type": "STRING", "index": 9, "name": "title", "comment": null}, "updated_timestamp": {"type": "TIMESTAMP", "index": 10, "name": "updated_timestamp", "comment": null}, "vendor": {"type": "STRING", "index": 11, "name": "vendor", "comment": null}, "source_relation": {"type": "STRING", "index": 12, "name": "source_relation", "comment": null}, "quantity_sold": {"type": "INT64", "index": 13, "name": "quantity_sold", "comment": null}, "subtotal_sold": {"type": "INT64", "index": 14, "name": "subtotal_sold", "comment": null}, "quantity_sold_net_refunds": {"type": "INT64", "index": 15, "name": "quantity_sold_net_refunds", "comment": null}, "subtotal_sold_net_refunds": {"type": "NUMERIC", "index": 16, "name": "subtotal_sold_net_refunds", "comment": null}, "first_order_timestamp": {"type": "TIMESTAMP", "index": 17, "name": "first_order_timestamp", "comment": null}, "most_recent_order_timestamp": {"type": "TIMESTAMP", "index": 18, "name": "most_recent_order_timestamp", "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": 723.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.shopify.shopify__products"}, "model.klaviyo.int_klaviyo__campaign_flow_metrics": {"metadata": {"type": "view", "schema": "dbt_test_int_klaviyo", "name": "int_klaviyo__campaign_flow_metrics", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"last_touch_campaign_id": {"type": "STRING", "index": 1, "name": "last_touch_campaign_id", "comment": null}, "last_touch_flow_id": {"type": "STRING", "index": 2, "name": "last_touch_flow_id", "comment": null}, "variation_id": {"type": "STRING", "index": 3, "name": "variation_id", "comment": null}, "source_relation": {"type": "STRING", "index": 4, "name": "source_relation", "comment": null}, "total_count_unique_people": {"type": "INT64", "index": 5, "name": "total_count_unique_people", "comment": null}, "first_event_at": {"type": "TIMESTAMP", "index": 6, "name": "first_event_at", "comment": null}, "last_event_at": {"type": "TIMESTAMP", "index": 7, "name": "last_event_at", "comment": null}, "sum_revenue_refunded_order": {"type": "NUMERIC", "index": 8, "name": "sum_revenue_refunded_order", "comment": null}, "sum_revenue_placed_order": {"type": "NUMERIC", "index": 9, "name": "sum_revenue_placed_order", "comment": null}, "sum_revenue_ordered_product": {"type": "NUMERIC", "index": 10, "name": "sum_revenue_ordered_product", "comment": null}, "sum_revenue_checkout_started": {"type": "NUMERIC", "index": 11, "name": "sum_revenue_checkout_started", "comment": null}, "sum_revenue_cancelled_order": {"type": "NUMERIC", "index": 12, "name": "sum_revenue_cancelled_order", "comment": null}, "count_active_on_site": {"type": "INT64", "index": 13, "name": "count_active_on_site", "comment": null}, "unique_count_active_on_site": {"type": "INT64", "index": 14, "name": "unique_count_active_on_site", "comment": null}, "count_viewed_product": {"type": "INT64", "index": 15, "name": "count_viewed_product", "comment": null}, "unique_count_viewed_product": {"type": "INT64", "index": 16, "name": "unique_count_viewed_product", "comment": null}, "count_ordered_product": {"type": "INT64", "index": 17, "name": "count_ordered_product", "comment": null}, "unique_count_ordered_product": {"type": "INT64", "index": 18, "name": "unique_count_ordered_product", "comment": null}, "count_placed_order": {"type": "INT64", "index": 19, "name": "count_placed_order", "comment": null}, "unique_count_placed_order": {"type": "INT64", "index": 20, "name": "unique_count_placed_order", "comment": null}, "count_refunded_order": {"type": "INT64", "index": 21, "name": "count_refunded_order", "comment": null}, "unique_count_refunded_order": {"type": "INT64", "index": 22, "name": "unique_count_refunded_order", "comment": null}, "count_cancelled_order": {"type": "INT64", "index": 23, "name": "count_cancelled_order", "comment": null}, "unique_count_cancelled_order": {"type": "INT64", "index": 24, "name": "unique_count_cancelled_order", "comment": null}, "count_fulfilled_order": {"type": "INT64", "index": 25, "name": "count_fulfilled_order", "comment": null}, "unique_count_fulfilled_order": {"type": "INT64", "index": 26, "name": "unique_count_fulfilled_order", "comment": null}, "count_received_email": {"type": "INT64", "index": 27, "name": "count_received_email", "comment": null}, "unique_count_received_email": {"type": "INT64", "index": 28, "name": "unique_count_received_email", "comment": null}, "count_clicked_email": {"type": "INT64", "index": 29, "name": "count_clicked_email", "comment": null}, "unique_count_clicked_email": {"type": "INT64", "index": 30, "name": "unique_count_clicked_email", "comment": null}, "count_opened_email": {"type": "INT64", "index": 31, "name": "count_opened_email", "comment": null}, "unique_count_opened_email": {"type": "INT64", "index": 32, "name": "unique_count_opened_email", "comment": null}, "count_bounced_email": {"type": "INT64", "index": 33, "name": "count_bounced_email", "comment": null}, "unique_count_bounced_email": {"type": "INT64", "index": 34, "name": "unique_count_bounced_email", "comment": null}, "count_marked_email_as_spam": {"type": "INT64", "index": 35, "name": "count_marked_email_as_spam", "comment": null}, "unique_count_marked_email_as_spam": {"type": "INT64", "index": 36, "name": "unique_count_marked_email_as_spam", "comment": null}, "count_dropped_email": {"type": "INT64", "index": 37, "name": "count_dropped_email", "comment": null}, "unique_count_dropped_email": {"type": "INT64", "index": 38, "name": "unique_count_dropped_email", "comment": null}, "count_subscribed_to_list": {"type": "INT64", "index": 39, "name": "count_subscribed_to_list", "comment": null}, "unique_count_subscribed_to_list": {"type": "INT64", "index": 40, "name": "unique_count_subscribed_to_list", "comment": null}, "count_unsubscribed_to_list": {"type": "INT64", "index": 41, "name": "count_unsubscribed_to_list", "comment": null}, "unique_count_unsubscribed_to_list": {"type": "INT64", "index": 42, "name": "unique_count_unsubscribed_to_list", "comment": null}, "count_unsubscribed": {"type": "INT64", "index": 43, "name": "count_unsubscribed", "comment": null}, "unique_count_unsubscribed": {"type": "INT64", "index": 44, "name": "unique_count_unsubscribed", "comment": null}, "count_updated_email_preferences": {"type": "INT64", "index": 45, "name": "count_updated_email_preferences", "comment": null}, "unique_count_updated_email_preferences": {"type": "INT64", "index": 46, "name": "unique_count_updated_email_preferences", "comment": null}, "count_subscribed_to_back_in_stock": {"type": "INT64", "index": 47, "name": "count_subscribed_to_back_in_stock", "comment": null}, "unique_count_subscribed_to_back_in_stock": {"type": "INT64", "index": 48, "name": "unique_count_subscribed_to_back_in_stock", "comment": null}, "count_merged_profile": {"type": "INT64", "index": 49, "name": "count_merged_profile", "comment": null}, "unique_count_merged_profile": {"type": "INT64", "index": 50, "name": "unique_count_merged_profile", "comment": null}, "count_received_sms": {"type": "INT64", "index": 51, "name": "count_received_sms", "comment": null}, "unique_count_received_sms": {"type": "INT64", "index": 52, "name": "unique_count_received_sms", "comment": null}, "count_clicked_sms": {"type": "INT64", "index": 53, "name": "count_clicked_sms", "comment": null}, "unique_count_clicked_sms": {"type": "INT64", "index": 54, "name": "unique_count_clicked_sms", "comment": null}, "count_consented_to_receive_sms": {"type": "INT64", "index": 55, "name": "count_consented_to_receive_sms", "comment": null}, "unique_count_consented_to_receive_sms": {"type": "INT64", "index": 56, "name": "unique_count_consented_to_receive_sms", "comment": null}, "count_sent_sms": {"type": "INT64", "index": 57, "name": "count_sent_sms", "comment": null}, "unique_count_sent_sms": {"type": "INT64", "index": 58, "name": "unique_count_sent_sms", "comment": null}, "count_unsubscribed_from_sms": {"type": "INT64", "index": 59, "name": "count_unsubscribed_from_sms", "comment": null}, "unique_count_unsubscribed_from_sms": {"type": "INT64", "index": 60, "name": "unique_count_unsubscribed_from_sms", "comment": null}, "count_failed_to_deliver_sms": {"type": "INT64", "index": 61, "name": "count_failed_to_deliver_sms", "comment": null}, "unique_count_failed_to_deliver_sms": {"type": "INT64", "index": 62, "name": "unique_count_failed_to_deliver_sms", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.klaviyo.int_klaviyo__campaign_flow_metrics"}, "model.klaviyo.int_klaviyo__event_attribution": {"metadata": {"type": "table", "schema": "dbt_test_int_klaviyo", "name": "int_klaviyo__event_attribution", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"variation_id": {"type": "STRING", "index": 1, "name": "variation_id", "comment": null}, "campaign_id": {"type": "STRING", "index": 2, "name": "campaign_id", "comment": null}, "occurred_at": {"type": "TIMESTAMP", "index": 3, "name": "occurred_at", "comment": null}, "flow_id": {"type": "STRING", "index": 4, "name": "flow_id", "comment": null}, "flow_message_id": {"type": "INT64", "index": 5, "name": "flow_message_id", "comment": null}, "event_id": {"type": "STRING", "index": 6, "name": "event_id", "comment": null}, "metric_id": {"type": "STRING", "index": 7, "name": "metric_id", "comment": null}, "person_id": {"type": "STRING", "index": 8, "name": "person_id", "comment": null}, "type": {"type": "STRING", "index": 9, "name": "type", "comment": null}, "uuid": {"type": "STRING", "index": 10, "name": "uuid", "comment": null}, "numeric_value": {"type": "INT64", "index": 11, "name": "numeric_value", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 12, "name": "_fivetran_synced", "comment": null}, "source_relation": {"type": "STRING", "index": 13, "name": "source_relation", "comment": null}, "occurred_on": {"type": "DATE", "index": 14, "name": "occurred_on", "comment": null}, "unique_event_id": {"type": "STRING", "index": 15, "name": "unique_event_id", "comment": null}, "touch_id": {"type": "STRING", "index": 16, "name": "touch_id", "comment": null}, "touch_type": {"type": "STRING", "index": 17, "name": "touch_type", "comment": null}, "touch_session": {"type": "INT64", "index": 18, "name": "touch_session", "comment": null}, "session_start_at": {"type": "TIMESTAMP", "index": 19, "name": "session_start_at", "comment": null}, "session_event_type": {"type": "STRING", "index": 20, "name": "session_event_type", "comment": null}, "last_touch_id": {"type": "STRING", "index": 21, "name": "last_touch_id", "comment": null}, "session_touch_type": {"type": "STRING", "index": 22, "name": "session_touch_type", "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": 448.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "partitioning_type": {"id": "partitioning_type", "label": "Partitioned By", "value": "occurred_on", "include": true, "description": "The partitioning column for this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.klaviyo.int_klaviyo__event_attribution"}, "model.klaviyo.int_klaviyo__person_metrics": {"metadata": {"type": "view", "schema": "dbt_test_int_klaviyo", "name": "int_klaviyo__person_metrics", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"person_id": {"type": "STRING", "index": 1, "name": "person_id", "comment": null}, "source_relation": {"type": "STRING", "index": 2, "name": "source_relation", "comment": null}, "count_total_campaigns": {"type": "INT64", "index": 3, "name": "count_total_campaigns", "comment": null}, "count_total_flows": {"type": "INT64", "index": 4, "name": "count_total_flows", "comment": null}, "first_event_at": {"type": "TIMESTAMP", "index": 5, "name": "first_event_at", "comment": null}, "last_event_at": {"type": "TIMESTAMP", "index": 6, "name": "last_event_at", "comment": null}, "first_campaign_touch_at": {"type": "TIMESTAMP", "index": 7, "name": "first_campaign_touch_at", "comment": null}, "last_campaign_touch_at": {"type": "TIMESTAMP", "index": 8, "name": "last_campaign_touch_at", "comment": null}, "first_flow_touch_at": {"type": "TIMESTAMP", "index": 9, "name": "first_flow_touch_at", "comment": null}, "last_flow_touch_at": {"type": "TIMESTAMP", "index": 10, "name": "last_flow_touch_at", "comment": null}, "total_sum_revenue_refunded_order": {"type": "NUMERIC", "index": 11, "name": "total_sum_revenue_refunded_order", "comment": null}, "organic_sum_revenue_refunded_order": {"type": "NUMERIC", "index": 12, "name": "organic_sum_revenue_refunded_order", "comment": null}, "total_sum_revenue_placed_order": {"type": "NUMERIC", "index": 13, "name": "total_sum_revenue_placed_order", "comment": null}, "organic_sum_revenue_placed_order": {"type": "NUMERIC", "index": 14, "name": "organic_sum_revenue_placed_order", "comment": null}, "total_sum_revenue_ordered_product": {"type": "NUMERIC", "index": 15, "name": "total_sum_revenue_ordered_product", "comment": null}, "organic_sum_revenue_ordered_product": {"type": "NUMERIC", "index": 16, "name": "organic_sum_revenue_ordered_product", "comment": null}, "total_sum_revenue_checkout_started": {"type": "NUMERIC", "index": 17, "name": "total_sum_revenue_checkout_started", "comment": null}, "organic_sum_revenue_checkout_started": {"type": "NUMERIC", "index": 18, "name": "organic_sum_revenue_checkout_started", "comment": null}, "total_sum_revenue_cancelled_order": {"type": "NUMERIC", "index": 19, "name": "total_sum_revenue_cancelled_order", "comment": null}, "organic_sum_revenue_cancelled_order": {"type": "NUMERIC", "index": 20, "name": "organic_sum_revenue_cancelled_order", "comment": null}, "total_count_active_on_site": {"type": "INT64", "index": 21, "name": "total_count_active_on_site", "comment": null}, "total_count_viewed_product": {"type": "INT64", "index": 22, "name": "total_count_viewed_product", "comment": null}, "total_count_ordered_product": {"type": "INT64", "index": 23, "name": "total_count_ordered_product", "comment": null}, "total_count_placed_order": {"type": "INT64", "index": 24, "name": "total_count_placed_order", "comment": null}, "total_count_refunded_order": {"type": "INT64", "index": 25, "name": "total_count_refunded_order", "comment": null}, "total_count_cancelled_order": {"type": "INT64", "index": 26, "name": "total_count_cancelled_order", "comment": null}, "total_count_fulfilled_order": {"type": "INT64", "index": 27, "name": "total_count_fulfilled_order", "comment": null}, "total_count_received_email": {"type": "INT64", "index": 28, "name": "total_count_received_email", "comment": null}, "total_count_clicked_email": {"type": "INT64", "index": 29, "name": "total_count_clicked_email", "comment": null}, "total_count_opened_email": {"type": "INT64", "index": 30, "name": "total_count_opened_email", "comment": null}, "total_count_bounced_email": {"type": "INT64", "index": 31, "name": "total_count_bounced_email", "comment": null}, "total_count_marked_email_as_spam": {"type": "INT64", "index": 32, "name": "total_count_marked_email_as_spam", "comment": null}, "total_count_dropped_email": {"type": "INT64", "index": 33, "name": "total_count_dropped_email", "comment": null}, "total_count_subscribed_to_list": {"type": "INT64", "index": 34, "name": "total_count_subscribed_to_list", "comment": null}, "total_count_unsubscribed_to_list": {"type": "INT64", "index": 35, "name": "total_count_unsubscribed_to_list", "comment": null}, "total_count_unsubscribed": {"type": "INT64", "index": 36, "name": "total_count_unsubscribed", "comment": null}, "total_count_updated_email_preferences": {"type": "INT64", "index": 37, "name": "total_count_updated_email_preferences", "comment": null}, "total_count_subscribed_to_back_in_stock": {"type": "INT64", "index": 38, "name": "total_count_subscribed_to_back_in_stock", "comment": null}, "total_count_merged_profile": {"type": "INT64", "index": 39, "name": "total_count_merged_profile", "comment": null}, "total_count_received_sms": {"type": "INT64", "index": 40, "name": "total_count_received_sms", "comment": null}, "total_count_clicked_sms": {"type": "INT64", "index": 41, "name": "total_count_clicked_sms", "comment": null}, "total_count_consented_to_receive_sms": {"type": "INT64", "index": 42, "name": "total_count_consented_to_receive_sms", "comment": null}, "total_count_sent_sms": {"type": "INT64", "index": 43, "name": "total_count_sent_sms", "comment": null}, "total_count_unsubscribed_from_sms": {"type": "INT64", "index": 44, "name": "total_count_unsubscribed_from_sms", "comment": null}, "total_count_failed_to_deliver_sms": {"type": "INT64", "index": 45, "name": "total_count_failed_to_deliver_sms", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.klaviyo.int_klaviyo__person_metrics"}, "model.shopify_holistic_reporting.int__klaviyo_person_rollup": {"metadata": {"type": "view", "schema": "dbt_test_shopify_holistic", "name": "int__klaviyo_person_rollup", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"email": {"type": "STRING", "index": 1, "name": "email", "comment": null}, "source_relation": {"type": "STRING", "index": 2, "name": "source_relation", "comment": null}, "person_ids": {"type": "STRING", "index": 3, "name": "person_ids", "comment": null}, "phone_numbers": {"type": "STRING", "index": 4, "name": "phone_numbers", "comment": null}, "full_name": {"type": "STRING", "index": 5, "name": "full_name", "comment": null}, "first_klaviyo_account_made_at": {"type": "STRING", "index": 6, "name": "first_klaviyo_account_made_at", "comment": null}, "last_klaviyo_account_made_at": {"type": "STRING", "index": 7, "name": "last_klaviyo_account_made_at", "comment": null}, "last_updated_at": {"type": "STRING", "index": 8, "name": "last_updated_at", "comment": null}, "first_event_at": {"type": "TIMESTAMP", "index": 9, "name": "first_event_at", "comment": null}, "last_event_at": {"type": "TIMESTAMP", "index": 10, "name": "last_event_at", "comment": null}, "first_campaign_touch_at": {"type": "TIMESTAMP", "index": 11, "name": "first_campaign_touch_at", "comment": null}, "last_campaign_touch_at": {"type": "TIMESTAMP", "index": 12, "name": "last_campaign_touch_at", "comment": null}, "first_flow_touch_at": {"type": "TIMESTAMP", "index": 13, "name": "first_flow_touch_at", "comment": null}, "last_flow_touch_at": {"type": "TIMESTAMP", "index": 14, "name": "last_flow_touch_at", "comment": null}, "count_total_campaigns": {"type": "INT64", "index": 15, "name": "count_total_campaigns", "comment": null}, "count_total_flows": {"type": "INT64", "index": 16, "name": "count_total_flows", "comment": null}, "address_1": {"type": "STRING", "index": 17, "name": "address_1", "comment": null}, "address_2": {"type": "INT64", "index": 18, "name": "address_2", "comment": null}, "city": {"type": "STRING", "index": 19, "name": "city", "comment": null}, "country": {"type": "STRING", "index": 20, "name": "country", "comment": null}, "zip": {"type": "INT64", "index": 21, "name": "zip", "comment": null}, "latitude": {"type": "FLOAT64", "index": 22, "name": "latitude", "comment": null}, "longitude": {"type": "FLOAT64", "index": 23, "name": "longitude", "comment": null}, "organization": {"type": "INT64", "index": 24, "name": "organization", "comment": null}, "region": {"type": "STRING", "index": 25, "name": "region", "comment": null}, "timezone": {"type": "STRING", "index": 26, "name": "timezone", "comment": null}, "title": {"type": "INT64", "index": 27, "name": "title", "comment": null}, "total_sum_revenue_refunded_order": {"type": "NUMERIC", "index": 28, "name": "total_sum_revenue_refunded_order", "comment": null}, "organic_sum_revenue_refunded_order": {"type": "NUMERIC", "index": 29, "name": "organic_sum_revenue_refunded_order", "comment": null}, "total_sum_revenue_placed_order": {"type": "NUMERIC", "index": 30, "name": "total_sum_revenue_placed_order", "comment": null}, "organic_sum_revenue_placed_order": {"type": "NUMERIC", "index": 31, "name": "organic_sum_revenue_placed_order", "comment": null}, "total_sum_revenue_ordered_product": {"type": "NUMERIC", "index": 32, "name": "total_sum_revenue_ordered_product", "comment": null}, "organic_sum_revenue_ordered_product": {"type": "NUMERIC", "index": 33, "name": "organic_sum_revenue_ordered_product", "comment": null}, "total_sum_revenue_checkout_started": {"type": "NUMERIC", "index": 34, "name": "total_sum_revenue_checkout_started", "comment": null}, "organic_sum_revenue_checkout_started": {"type": "NUMERIC", "index": 35, "name": "organic_sum_revenue_checkout_started", "comment": null}, "total_sum_revenue_cancelled_order": {"type": "NUMERIC", "index": 36, "name": "total_sum_revenue_cancelled_order", "comment": null}, "organic_sum_revenue_cancelled_order": {"type": "NUMERIC", "index": 37, "name": "organic_sum_revenue_cancelled_order", "comment": null}, "total_count_active_on_site": {"type": "INT64", "index": 38, "name": "total_count_active_on_site", "comment": null}, "total_count_viewed_product": {"type": "INT64", "index": 39, "name": "total_count_viewed_product", "comment": null}, "total_count_ordered_product": {"type": "INT64", "index": 40, "name": "total_count_ordered_product", "comment": null}, "total_count_placed_order": {"type": "INT64", "index": 41, "name": "total_count_placed_order", "comment": null}, "total_count_refunded_order": {"type": "INT64", "index": 42, "name": "total_count_refunded_order", "comment": null}, "total_count_cancelled_order": {"type": "INT64", "index": 43, "name": "total_count_cancelled_order", "comment": null}, "total_count_fulfilled_order": {"type": "INT64", "index": 44, "name": "total_count_fulfilled_order", "comment": null}, "total_count_received_email": {"type": "INT64", "index": 45, "name": "total_count_received_email", "comment": null}, "total_count_clicked_email": {"type": "INT64", "index": 46, "name": "total_count_clicked_email", "comment": null}, "total_count_opened_email": {"type": "INT64", "index": 47, "name": "total_count_opened_email", "comment": null}, "total_count_bounced_email": {"type": "INT64", "index": 48, "name": "total_count_bounced_email", "comment": null}, "total_count_marked_email_as_spam": {"type": "INT64", "index": 49, "name": "total_count_marked_email_as_spam", "comment": null}, "total_count_dropped_email": {"type": "INT64", "index": 50, "name": "total_count_dropped_email", "comment": null}, "total_count_subscribed_to_list": {"type": "INT64", "index": 51, "name": "total_count_subscribed_to_list", "comment": null}, "total_count_unsubscribed_to_list": {"type": "INT64", "index": 52, "name": "total_count_unsubscribed_to_list", "comment": null}, "total_count_unsubscribed": {"type": "INT64", "index": 53, "name": "total_count_unsubscribed", "comment": null}, "total_count_updated_email_preferences": {"type": "INT64", "index": 54, "name": "total_count_updated_email_preferences", "comment": null}, "total_count_subscribed_to_back_in_stock": {"type": "INT64", "index": 55, "name": "total_count_subscribed_to_back_in_stock", "comment": null}, "total_count_merged_profile": {"type": "INT64", "index": 56, "name": "total_count_merged_profile", "comment": null}, "total_count_received_sms": {"type": "INT64", "index": 57, "name": "total_count_received_sms", "comment": null}, "total_count_clicked_sms": {"type": "INT64", "index": 58, "name": "total_count_clicked_sms", "comment": null}, "total_count_consented_to_receive_sms": {"type": "INT64", "index": 59, "name": "total_count_consented_to_receive_sms", "comment": null}, "total_count_sent_sms": {"type": "INT64", "index": 60, "name": "total_count_sent_sms", "comment": null}, "total_count_unsubscribed_from_sms": {"type": "INT64", "index": 61, "name": "total_count_unsubscribed_from_sms", "comment": null}, "total_count_failed_to_deliver_sms": {"type": "INT64", "index": 62, "name": "total_count_failed_to_deliver_sms", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.shopify_holistic_reporting.int__klaviyo_person_rollup"}, "model.shopify_holistic_reporting.shopify_holistic_reporting__customer_enhanced": {"metadata": {"type": "table", "schema": "dbt_test_shopify_holistic", "name": "shopify_holistic_reporting__customer_enhanced", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"email": {"type": "STRING", "index": 1, "name": "email", "comment": null}, "full_name": {"type": "STRING", "index": 2, "name": "full_name", "comment": null}, "shopify_customer_ids": {"type": "STRING", "index": 3, "name": "shopify_customer_ids", "comment": null}, "klaviyo_person_ids": {"type": "STRING", "index": 4, "name": "klaviyo_person_ids", "comment": null}, "phone_number": {"type": "STRING", "index": 5, "name": "phone_number", "comment": null}, "shopify_customer_first_created_at": {"type": "TIMESTAMP", "index": 6, "name": "shopify_customer_first_created_at", "comment": null}, "shopify_customer_last_created_at": {"type": "TIMESTAMP", "index": 7, "name": "shopify_customer_last_created_at", "comment": null}, "klaviyo_person_first_created_at": {"type": "STRING", "index": 8, "name": "klaviyo_person_first_created_at", "comment": null}, "klaviyo_person_last_created_at": {"type": "STRING", "index": 9, "name": "klaviyo_person_last_created_at", "comment": null}, "shopify_customer_last_updated_at": {"type": "TIMESTAMP", "index": 10, "name": "shopify_customer_last_updated_at", "comment": null}, "klaviyo_person_last_updated_at": {"type": "STRING", "index": 11, "name": "klaviyo_person_last_updated_at", "comment": null}, "is_shopify_email_verified": {"type": "BOOL", "index": 12, "name": "is_shopify_email_verified", "comment": null}, "shopify_first_order_at": {"type": "TIMESTAMP", "index": 13, "name": "shopify_first_order_at", "comment": null}, "shopify_last_order_at": {"type": "TIMESTAMP", "index": 14, "name": "shopify_last_order_at", "comment": null}, "shopify_lifetime_total_spent": {"type": "FLOAT64", "index": 15, "name": "shopify_lifetime_total_spent", "comment": null}, "shopify_lifetime_total_refunded": {"type": "FLOAT64", "index": 16, "name": "shopify_lifetime_total_refunded", "comment": null}, "shopify_lifetime_total_amount": {"type": "FLOAT64", "index": 17, "name": "shopify_lifetime_total_amount", "comment": null}, "shopify_lifetime_count_orders": {"type": "INT64", "index": 18, "name": "shopify_lifetime_count_orders", "comment": null}, "shopify_average_order_value": {"type": "FLOAT64", "index": 19, "name": "shopify_average_order_value", "comment": null}, "shopify_has_accepted_marketing": {"type": "BOOL", "index": 20, "name": "shopify_has_accepted_marketing", "comment": null}, "shopify_is_tax_exempt": {"type": "BOOL", "index": 21, "name": "shopify_is_tax_exempt", "comment": null}, "shopify_default_address_id": {"type": "INT64", "index": 22, "name": "shopify_default_address_id", "comment": null}, "shopify_account_state": {"type": "STRING", "index": 23, "name": "shopify_account_state", "comment": null}, "shopify_source_relation": {"type": "STRING", "index": 24, "name": "shopify_source_relation", "comment": null}, "klaviyo_first_event_at": {"type": "TIMESTAMP", "index": 25, "name": "klaviyo_first_event_at", "comment": null}, "klaviyo_last_event_at": {"type": "TIMESTAMP", "index": 26, "name": "klaviyo_last_event_at", "comment": null}, "klaviyo_first_campaign_touch_at": {"type": "TIMESTAMP", "index": 27, "name": "klaviyo_first_campaign_touch_at", "comment": null}, "klaviyo_last_campaign_touch_at": {"type": "TIMESTAMP", "index": 28, "name": "klaviyo_last_campaign_touch_at", "comment": null}, "klaviyo_first_flow_touch_at": {"type": "TIMESTAMP", "index": 29, "name": "klaviyo_first_flow_touch_at", "comment": null}, "klaviyo_last_flow_touch_at": {"type": "TIMESTAMP", "index": 30, "name": "klaviyo_last_flow_touch_at", "comment": null}, "klaviyo_count_total_campaigns": {"type": "INT64", "index": 31, "name": "klaviyo_count_total_campaigns", "comment": null}, "klaviyo_count_total_flows": {"type": "INT64", "index": 32, "name": "klaviyo_count_total_flows", "comment": null}, "klaviyo_address_1": {"type": "STRING", "index": 33, "name": "klaviyo_address_1", "comment": null}, "klaviyo_address_2": {"type": "INT64", "index": 34, "name": "klaviyo_address_2", "comment": null}, "klaviyo_city": {"type": "STRING", "index": 35, "name": "klaviyo_city", "comment": null}, "klaviyo_country": {"type": "STRING", "index": 36, "name": "klaviyo_country", "comment": null}, "klaviyo_zip": {"type": "INT64", "index": 37, "name": "klaviyo_zip", "comment": null}, "klaviyo_latitude": {"type": "FLOAT64", "index": 38, "name": "klaviyo_latitude", "comment": null}, "klaviyo_longitude": {"type": "FLOAT64", "index": 39, "name": "klaviyo_longitude", "comment": null}, "klaviyo_organization": {"type": "INT64", "index": 40, "name": "klaviyo_organization", "comment": null}, "klaviyo_region": {"type": "STRING", "index": 41, "name": "klaviyo_region", "comment": null}, "klaviyo_timezone": {"type": "STRING", "index": 42, "name": "klaviyo_timezone", "comment": null}, "klaviyo_title": {"type": "INT64", "index": 43, "name": "klaviyo_title", "comment": null}, "klaviyo_total_sum_revenue_refunded_order": {"type": "NUMERIC", "index": 44, "name": "klaviyo_total_sum_revenue_refunded_order", "comment": null}, "klaviyo_organic_sum_revenue_refunded_order": {"type": "NUMERIC", "index": 45, "name": "klaviyo_organic_sum_revenue_refunded_order", "comment": null}, "klaviyo_total_sum_revenue_placed_order": {"type": "NUMERIC", "index": 46, "name": "klaviyo_total_sum_revenue_placed_order", "comment": null}, "klaviyo_organic_sum_revenue_placed_order": {"type": "NUMERIC", "index": 47, "name": "klaviyo_organic_sum_revenue_placed_order", "comment": null}, "klaviyo_total_sum_revenue_ordered_product": {"type": "NUMERIC", "index": 48, "name": "klaviyo_total_sum_revenue_ordered_product", "comment": null}, "klaviyo_organic_sum_revenue_ordered_product": {"type": "NUMERIC", "index": 49, "name": "klaviyo_organic_sum_revenue_ordered_product", "comment": null}, "klaviyo_total_sum_revenue_checkout_started": {"type": "NUMERIC", "index": 50, "name": "klaviyo_total_sum_revenue_checkout_started", "comment": null}, "klaviyo_organic_sum_revenue_checkout_started": {"type": "NUMERIC", "index": 51, "name": "klaviyo_organic_sum_revenue_checkout_started", "comment": null}, "klaviyo_total_sum_revenue_cancelled_order": {"type": "NUMERIC", "index": 52, "name": "klaviyo_total_sum_revenue_cancelled_order", "comment": null}, "klaviyo_organic_sum_revenue_cancelled_order": {"type": "NUMERIC", "index": 53, "name": "klaviyo_organic_sum_revenue_cancelled_order", "comment": null}, "klaviyo_total_count_active_on_site": {"type": "INT64", "index": 54, "name": "klaviyo_total_count_active_on_site", "comment": null}, "klaviyo_total_count_viewed_product": {"type": "INT64", "index": 55, "name": "klaviyo_total_count_viewed_product", "comment": null}, "klaviyo_total_count_ordered_product": {"type": "INT64", "index": 56, "name": "klaviyo_total_count_ordered_product", "comment": null}, "klaviyo_total_count_placed_order": {"type": "INT64", "index": 57, "name": "klaviyo_total_count_placed_order", "comment": null}, "klaviyo_total_count_refunded_order": {"type": "INT64", "index": 58, "name": "klaviyo_total_count_refunded_order", "comment": null}, "klaviyo_total_count_cancelled_order": {"type": "INT64", "index": 59, "name": "klaviyo_total_count_cancelled_order", "comment": null}, "klaviyo_total_count_fulfilled_order": {"type": "INT64", "index": 60, "name": "klaviyo_total_count_fulfilled_order", "comment": null}, "klaviyo_total_count_received_email": {"type": "INT64", "index": 61, "name": "klaviyo_total_count_received_email", "comment": null}, "klaviyo_total_count_clicked_email": {"type": "INT64", "index": 62, "name": "klaviyo_total_count_clicked_email", "comment": null}, "klaviyo_total_count_opened_email": {"type": "INT64", "index": 63, "name": "klaviyo_total_count_opened_email", "comment": null}, "klaviyo_total_count_bounced_email": {"type": "INT64", "index": 64, "name": "klaviyo_total_count_bounced_email", "comment": null}, "klaviyo_total_count_marked_email_as_spam": {"type": "INT64", "index": 65, "name": "klaviyo_total_count_marked_email_as_spam", "comment": null}, "klaviyo_total_count_dropped_email": {"type": "INT64", "index": 66, "name": "klaviyo_total_count_dropped_email", "comment": null}, "klaviyo_total_count_subscribed_to_list": {"type": "INT64", "index": 67, "name": "klaviyo_total_count_subscribed_to_list", "comment": null}, "klaviyo_total_count_unsubscribed_to_list": {"type": "INT64", "index": 68, "name": "klaviyo_total_count_unsubscribed_to_list", "comment": null}, "klaviyo_total_count_unsubscribed": {"type": "INT64", "index": 69, "name": "klaviyo_total_count_unsubscribed", "comment": null}, "klaviyo_total_count_updated_email_preferences": {"type": "INT64", "index": 70, "name": "klaviyo_total_count_updated_email_preferences", "comment": null}, "klaviyo_total_count_subscribed_to_back_in_stock": {"type": "INT64", "index": 71, "name": "klaviyo_total_count_subscribed_to_back_in_stock", "comment": null}, "klaviyo_total_count_merged_profile": {"type": "INT64", "index": 72, "name": "klaviyo_total_count_merged_profile", "comment": null}, "klaviyo_total_count_received_sms": {"type": "INT64", "index": 73, "name": "klaviyo_total_count_received_sms", "comment": null}, "klaviyo_total_count_clicked_sms": {"type": "INT64", "index": 74, "name": "klaviyo_total_count_clicked_sms", "comment": null}, "klaviyo_total_count_consented_to_receive_sms": {"type": "INT64", "index": 75, "name": "klaviyo_total_count_consented_to_receive_sms", "comment": null}, "klaviyo_total_count_sent_sms": {"type": "INT64", "index": 76, "name": "klaviyo_total_count_sent_sms", "comment": null}, "klaviyo_total_count_unsubscribed_from_sms": {"type": "INT64", "index": 77, "name": "klaviyo_total_count_unsubscribed_from_sms", "comment": null}, "klaviyo_total_count_failed_to_deliver_sms": {"type": "INT64", "index": 78, "name": "klaviyo_total_count_failed_to_deliver_sms", "comment": null}, "klaviyo_source_relation": {"type": "STRING", "index": 79, "name": "klaviyo_source_relation", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 5.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 1075.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.shopify_holistic_reporting.shopify_holistic_reporting__customer_enhanced"}, "model.shopify_holistic_reporting.int__daily_shopify_customer_orders": {"metadata": {"type": "view", "schema": "dbt_test_shopify_holistic", "name": "int__daily_shopify_customer_orders", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"date_day": {"type": "DATE", "index": 1, "name": "date_day", "comment": null}, "email": {"type": "STRING", "index": 2, "name": "email", "comment": null}, "last_touch_campaign_id": {"type": "STRING", "index": 3, "name": "last_touch_campaign_id", "comment": null}, "last_touch_flow_id": {"type": "STRING", "index": 4, "name": "last_touch_flow_id", "comment": null}, "last_touch_campaign_name": {"type": "STRING", "index": 5, "name": "last_touch_campaign_name", "comment": null}, "last_touch_flow_name": {"type": "STRING", "index": 6, "name": "last_touch_flow_name", "comment": null}, "last_touch_variation_id": {"type": "STRING", "index": 7, "name": "last_touch_variation_id", "comment": null}, "last_touch_campaign_subject_line": {"type": "STRING", "index": 8, "name": "last_touch_campaign_subject_line", "comment": null}, "last_touch_campaign_type": {"type": "STRING", "index": 9, "name": "last_touch_campaign_type", "comment": null}, "source_relation": {"type": "STRING", "index": 10, "name": "source_relation", "comment": null}, "total_orders": {"type": "INT64", "index": 11, "name": "total_orders", "comment": null}, "total_price": {"type": "FLOAT64", "index": 12, "name": "total_price", "comment": null}, "count_line_items": {"type": "INT64", "index": 13, "name": "count_line_items", "comment": null}, "total_line_items_price": {"type": "FLOAT64", "index": 14, "name": "total_line_items_price", "comment": null}, "total_discounts": {"type": "FLOAT64", "index": 15, "name": "total_discounts", "comment": null}, "total_tax": {"type": "INT64", "index": 16, "name": "total_tax", "comment": null}, "total_shipping_cost": {"type": "FLOAT64", "index": 17, "name": "total_shipping_cost", "comment": null}, "total_refund_subtotal": {"type": "NUMERIC", "index": 18, "name": "total_refund_subtotal", "comment": null}, "total_refund_tax": {"type": "NUMERIC", "index": 19, "name": "total_refund_tax", "comment": null}, "count_cancelled_orders": {"type": "INT64", "index": 20, "name": "count_cancelled_orders", "comment": null}, "count_products": {"type": "INT64", "index": 21, "name": "count_products", "comment": null}, "count_product_variants": {"type": "INT64", "index": 22, "name": "count_product_variants", "comment": null}, "sum_quantity": {"type": "INT64", "index": 23, "name": "sum_quantity", "comment": null}, "total_order_adjustment_amount": {"type": "INT64", "index": 24, "name": "total_order_adjustment_amount", "comment": null}, "total_order_adjustment_tax_amount": {"type": "FLOAT64", "index": 25, "name": "total_order_adjustment_tax_amount", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.shopify_holistic_reporting.int__daily_shopify_customer_orders"}, "model.shopify_holistic_reporting.int__shopify_customer_rollup": {"metadata": {"type": "view", "schema": "dbt_test_shopify_holistic", "name": "int__shopify_customer_rollup", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"email": {"type": "STRING", "index": 1, "name": "email", "comment": null}, "source_relation": {"type": "STRING", "index": 2, "name": "source_relation", "comment": null}, "customer_ids": {"type": "STRING", "index": 3, "name": "customer_ids", "comment": null}, "phone_numbers": {"type": "STRING", "index": 4, "name": "phone_numbers", "comment": null}, "full_name": {"type": "STRING", "index": 5, "name": "full_name", "comment": null}, "first_shopify_account_made_at": {"type": "TIMESTAMP", "index": 6, "name": "first_shopify_account_made_at", "comment": null}, "last_shopify_account_made_at": {"type": "TIMESTAMP", "index": 7, "name": "last_shopify_account_made_at", "comment": null}, "first_order_at": {"type": "TIMESTAMP", "index": 8, "name": "first_order_at", "comment": null}, "last_order_at": {"type": "TIMESTAMP", "index": 9, "name": "last_order_at", "comment": null}, "last_updated_at": {"type": "TIMESTAMP", "index": 10, "name": "last_updated_at", "comment": null}, "lifetime_total_spent": {"type": "FLOAT64", "index": 11, "name": "lifetime_total_spent", "comment": null}, "lifetime_total_refunded": {"type": "FLOAT64", "index": 12, "name": "lifetime_total_refunded", "comment": null}, "lifetime_total_amount": {"type": "FLOAT64", "index": 13, "name": "lifetime_total_amount", "comment": null}, "lifetime_count_orders": {"type": "INT64", "index": 14, "name": "lifetime_count_orders", "comment": null}, "average_order_value": {"type": "FLOAT64", "index": 15, "name": "average_order_value", "comment": null}, "has_accepted_marketing": {"type": "BOOL", "index": 16, "name": "has_accepted_marketing", "comment": null}, "is_tax_exempt": {"type": "BOOL", "index": 17, "name": "is_tax_exempt", "comment": null}, "is_verified_email": {"type": "BOOL", "index": 18, "name": "is_verified_email", "comment": null}, "default_address_id": {"type": "INT64", "index": 19, "name": "default_address_id", "comment": null}, "account_state": {"type": "STRING", "index": 20, "name": "account_state", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.shopify_holistic_reporting.int__shopify_customer_rollup"}, "model.shopify_holistic_reporting.int__daily_klaviyo_user_metrics": {"metadata": {"type": "view", "schema": "dbt_test_shopify_holistic", "name": "int__daily_klaviyo_user_metrics", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"date_day": {"type": "DATE", "index": 1, "name": "date_day", "comment": null}, "email": {"type": "STRING", "index": 2, "name": "email", "comment": null}, "last_touch_campaign_id": {"type": "STRING", "index": 3, "name": "last_touch_campaign_id", "comment": null}, "last_touch_flow_id": {"type": "STRING", "index": 4, "name": "last_touch_flow_id", "comment": null}, "campaign_name": {"type": "STRING", "index": 5, "name": "campaign_name", "comment": null}, "flow_name": {"type": "STRING", "index": 6, "name": "flow_name", "comment": null}, "variation_id": {"type": "STRING", "index": 7, "name": "variation_id", "comment": null}, "campaign_subject_line": {"type": "STRING", "index": 8, "name": "campaign_subject_line", "comment": null}, "campaign_type": {"type": "STRING", "index": 9, "name": "campaign_type", "comment": null}, "source_relation": {"type": "STRING", "index": 10, "name": "source_relation", "comment": null}, "first_event_at": {"type": "TIMESTAMP", "index": 11, "name": "first_event_at", "comment": null}, "last_event_at": {"type": "TIMESTAMP", "index": 12, "name": "last_event_at", "comment": null}, "sum_revenue_refunded_order": {"type": "NUMERIC", "index": 13, "name": "sum_revenue_refunded_order", "comment": null}, "sum_revenue_placed_order": {"type": "NUMERIC", "index": 14, "name": "sum_revenue_placed_order", "comment": null}, "sum_revenue_ordered_product": {"type": "NUMERIC", "index": 15, "name": "sum_revenue_ordered_product", "comment": null}, "sum_revenue_checkout_started": {"type": "NUMERIC", "index": 16, "name": "sum_revenue_checkout_started", "comment": null}, "sum_revenue_cancelled_order": {"type": "NUMERIC", "index": 17, "name": "sum_revenue_cancelled_order", "comment": null}, "count_active_on_site": {"type": "INT64", "index": 18, "name": "count_active_on_site", "comment": null}, "count_viewed_product": {"type": "INT64", "index": 19, "name": "count_viewed_product", "comment": null}, "count_ordered_product": {"type": "INT64", "index": 20, "name": "count_ordered_product", "comment": null}, "count_placed_order": {"type": "INT64", "index": 21, "name": "count_placed_order", "comment": null}, "count_refunded_order": {"type": "INT64", "index": 22, "name": "count_refunded_order", "comment": null}, "count_received_email": {"type": "INT64", "index": 23, "name": "count_received_email", "comment": null}, "count_clicked_email": {"type": "INT64", "index": 24, "name": "count_clicked_email", "comment": null}, "count_opened_email": {"type": "INT64", "index": 25, "name": "count_opened_email", "comment": null}, "count_marked_email_as_spam": {"type": "INT64", "index": 26, "name": "count_marked_email_as_spam", "comment": null}, "count_unsubscribed": {"type": "INT64", "index": 27, "name": "count_unsubscribed", "comment": null}, "count_received_sms": {"type": "INT64", "index": 28, "name": "count_received_sms", "comment": null}, "count_clicked_sms": {"type": "INT64", "index": 29, "name": "count_clicked_sms", "comment": null}, "count_sent_sms": {"type": "INT64", "index": 30, "name": "count_sent_sms", "comment": null}, "count_unsubscribed_from_sms": {"type": "INT64", "index": 31, "name": "count_unsubscribed_from_sms", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.shopify_holistic_reporting.int__daily_klaviyo_user_metrics"}, "model.shopify_holistic_reporting.shopify_holistic_reporting__daily_customer_metrics": {"metadata": {"type": "table", "schema": "dbt_test_shopify_holistic", "name": "shopify_holistic_reporting__daily_customer_metrics", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"date_day": {"type": "DATE", "index": 1, "name": "date_day", "comment": null}, "email": {"type": "STRING", "index": 2, "name": "email", "comment": null}, "campaign_id": {"type": "STRING", "index": 3, "name": "campaign_id", "comment": null}, "flow_id": {"type": "STRING", "index": 4, "name": "flow_id", "comment": null}, "campaign_name": {"type": "STRING", "index": 5, "name": "campaign_name", "comment": null}, "flow_name": {"type": "STRING", "index": 6, "name": "flow_name", "comment": null}, "variation_id": {"type": "STRING", "index": 7, "name": "variation_id", "comment": null}, "campaign_subject_line": {"type": "STRING", "index": 8, "name": "campaign_subject_line", "comment": null}, "campaign_type": {"type": "STRING", "index": 9, "name": "campaign_type", "comment": null}, "shopify_total_orders": {"type": "INT64", "index": 10, "name": "shopify_total_orders", "comment": null}, "shopify_total_price": {"type": "FLOAT64", "index": 11, "name": "shopify_total_price", "comment": null}, "shopify_count_line_items": {"type": "INT64", "index": 12, "name": "shopify_count_line_items", "comment": null}, "shopify_total_line_items_price": {"type": "FLOAT64", "index": 13, "name": "shopify_total_line_items_price", "comment": null}, "shopify_total_discounts": {"type": "FLOAT64", "index": 14, "name": "shopify_total_discounts", "comment": null}, "shopify_total_tax": {"type": "INT64", "index": 15, "name": "shopify_total_tax", "comment": null}, "shopify_total_shipping_cost": {"type": "FLOAT64", "index": 16, "name": "shopify_total_shipping_cost", "comment": null}, "shopify_total_refund_subtotal": {"type": "NUMERIC", "index": 17, "name": "shopify_total_refund_subtotal", "comment": null}, "shopify_total_refund_tax": {"type": "NUMERIC", "index": 18, "name": "shopify_total_refund_tax", "comment": null}, "shopify_count_cancelled_orders": {"type": "INT64", "index": 19, "name": "shopify_count_cancelled_orders", "comment": null}, "shopify_count_products": {"type": "INT64", "index": 20, "name": "shopify_count_products", "comment": null}, "shopify_count_product_variants": {"type": "INT64", "index": 21, "name": "shopify_count_product_variants", "comment": null}, "shopify_sum_quantity": {"type": "INT64", "index": 22, "name": "shopify_sum_quantity", "comment": null}, "shopify_total_order_adjustment_amount": {"type": "INT64", "index": 23, "name": "shopify_total_order_adjustment_amount", "comment": null}, "shopify_total_order_adjustment_tax_amount": {"type": "FLOAT64", "index": 24, "name": "shopify_total_order_adjustment_tax_amount", "comment": null}, "shopify_source_relation": {"type": "STRING", "index": 25, "name": "shopify_source_relation", "comment": null}, "klaviyo_first_event_at": {"type": "TIMESTAMP", "index": 26, "name": "klaviyo_first_event_at", "comment": null}, "klaviyo_last_event_at": {"type": "TIMESTAMP", "index": 27, "name": "klaviyo_last_event_at", "comment": null}, "klaviyo_sum_revenue_refunded_order": {"type": "NUMERIC", "index": 28, "name": "klaviyo_sum_revenue_refunded_order", "comment": null}, "klaviyo_sum_revenue_placed_order": {"type": "NUMERIC", "index": 29, "name": "klaviyo_sum_revenue_placed_order", "comment": null}, "klaviyo_sum_revenue_ordered_product": {"type": "NUMERIC", "index": 30, "name": "klaviyo_sum_revenue_ordered_product", "comment": null}, "klaviyo_sum_revenue_checkout_started": {"type": "NUMERIC", "index": 31, "name": "klaviyo_sum_revenue_checkout_started", "comment": null}, "klaviyo_sum_revenue_cancelled_order": {"type": "NUMERIC", "index": 32, "name": "klaviyo_sum_revenue_cancelled_order", "comment": null}, "klaviyo_count_active_on_site": {"type": "INT64", "index": 33, "name": "klaviyo_count_active_on_site", "comment": null}, "klaviyo_count_viewed_product": {"type": "INT64", "index": 34, "name": "klaviyo_count_viewed_product", "comment": null}, "klaviyo_count_ordered_product": {"type": "INT64", "index": 35, "name": "klaviyo_count_ordered_product", "comment": null}, "klaviyo_count_placed_order": {"type": "INT64", "index": 36, "name": "klaviyo_count_placed_order", "comment": null}, "klaviyo_count_refunded_order": {"type": "INT64", "index": 37, "name": "klaviyo_count_refunded_order", "comment": null}, "klaviyo_count_received_email": {"type": "INT64", "index": 38, "name": "klaviyo_count_received_email", "comment": null}, "klaviyo_count_clicked_email": {"type": "INT64", "index": 39, "name": "klaviyo_count_clicked_email", "comment": null}, "klaviyo_count_opened_email": {"type": "INT64", "index": 40, "name": "klaviyo_count_opened_email", "comment": null}, "klaviyo_count_marked_email_as_spam": {"type": "INT64", "index": 41, "name": "klaviyo_count_marked_email_as_spam", "comment": null}, "klaviyo_count_unsubscribed": {"type": "INT64", "index": 42, "name": "klaviyo_count_unsubscribed", "comment": null}, "klaviyo_count_received_sms": {"type": "INT64", "index": 43, "name": "klaviyo_count_received_sms", "comment": null}, "klaviyo_count_clicked_sms": {"type": "INT64", "index": 44, "name": "klaviyo_count_clicked_sms", "comment": null}, "klaviyo_count_sent_sms": {"type": "INT64", "index": 45, "name": "klaviyo_count_sent_sms", "comment": null}, "klaviyo_count_unsubscribed_from_sms": {"type": "INT64", "index": 46, "name": "klaviyo_count_unsubscribed_from_sms", "comment": null}, "klaviyo_source_relation": {"type": "STRING", "index": 47, "name": "klaviyo_source_relation", "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": 498.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.shopify_holistic_reporting.shopify_holistic_reporting__daily_customer_metrics"}, "model.shopify_holistic_reporting.shopify_holistic_reporting__orders_attribution": {"metadata": {"type": "table", "schema": "dbt_test_shopify_holistic", "name": "shopify_holistic_reporting__orders_attribution", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"order_id": {"type": "INT64", "index": 1, "name": "order_id", "comment": null}, "processed_timestamp": {"type": "TIMESTAMP", "index": 2, "name": "processed_timestamp", "comment": null}, "updated_timestamp": {"type": "TIMESTAMP", "index": 3, "name": "updated_timestamp", "comment": null}, "user_id": {"type": "INT64", "index": 4, "name": "user_id", "comment": null}, "total_discounts": {"type": "FLOAT64", "index": 5, "name": "total_discounts", "comment": null}, "total_line_items_price": {"type": "FLOAT64", "index": 6, "name": "total_line_items_price", "comment": null}, "total_price": {"type": "FLOAT64", "index": 7, "name": "total_price", "comment": null}, "total_tax": {"type": "INT64", "index": 8, "name": "total_tax", "comment": null}, "source_name": {"type": "STRING", "index": 9, "name": "source_name", "comment": null}, "subtotal_price": {"type": "FLOAT64", "index": 10, "name": "subtotal_price", "comment": null}, "has_taxes_included": {"type": "BOOL", "index": 11, "name": "has_taxes_included", "comment": null}, "total_weight": {"type": "INT64", "index": 12, "name": "total_weight", "comment": null}, "landing_site_base_url": {"type": "STRING", "index": 13, "name": "landing_site_base_url", "comment": null}, "location_id": {"type": "INT64", "index": 14, "name": "location_id", "comment": null}, "name": {"type": "STRING", "index": 15, "name": "name", "comment": null}, "note": {"type": "STRING", "index": 16, "name": "note", "comment": null}, "number": {"type": "INT64", "index": 17, "name": "number", "comment": null}, "order_number": {"type": "INT64", "index": 18, "name": "order_number", "comment": null}, "cancel_reason": {"type": "INT64", "index": 19, "name": "cancel_reason", "comment": null}, "cancelled_timestamp": {"type": "TIMESTAMP", "index": 20, "name": "cancelled_timestamp", "comment": null}, "cart_token": {"type": "STRING", "index": 21, "name": "cart_token", "comment": null}, "checkout_token": {"type": "STRING", "index": 22, "name": "checkout_token", "comment": null}, "closed_timestamp": {"type": "STRING", "index": 23, "name": "closed_timestamp", "comment": null}, "created_timestamp": {"type": "TIMESTAMP", "index": 24, "name": "created_timestamp", "comment": null}, "currency": {"type": "STRING", "index": 25, "name": "currency", "comment": null}, "customer_id": {"type": "INT64", "index": 26, "name": "customer_id", "comment": null}, "email": {"type": "STRING", "index": 27, "name": "email", "comment": null}, "financial_status": {"type": "STRING", "index": 28, "name": "financial_status", "comment": null}, "fulfillment_status": {"type": "STRING", "index": 29, "name": "fulfillment_status", "comment": null}, "processing_method": {"type": "STRING", "index": 30, "name": "processing_method", "comment": null}, "referring_site": {"type": "STRING", "index": 31, "name": "referring_site", "comment": null}, "billing_address_address_1": {"type": "STRING", "index": 32, "name": "billing_address_address_1", "comment": null}, "billing_address_address_2": {"type": "STRING", "index": 33, "name": "billing_address_address_2", "comment": null}, "billing_address_city": {"type": "STRING", "index": 34, "name": "billing_address_city", "comment": null}, "billing_address_company": {"type": "STRING", "index": 35, "name": "billing_address_company", "comment": null}, "billing_address_country": {"type": "STRING", "index": 36, "name": "billing_address_country", "comment": null}, "billing_address_country_code": {"type": "STRING", "index": 37, "name": "billing_address_country_code", "comment": null}, "billing_address_first_name": {"type": "STRING", "index": 38, "name": "billing_address_first_name", "comment": null}, "billing_address_last_name": {"type": "STRING", "index": 39, "name": "billing_address_last_name", "comment": null}, "billing_address_latitude": {"type": "STRING", "index": 40, "name": "billing_address_latitude", "comment": null}, "billing_address_longitude": {"type": "STRING", "index": 41, "name": "billing_address_longitude", "comment": null}, "billing_address_name": {"type": "STRING", "index": 42, "name": "billing_address_name", "comment": null}, "billing_address_phone": {"type": "STRING", "index": 43, "name": "billing_address_phone", "comment": null}, "billing_address_province": {"type": "STRING", "index": 44, "name": "billing_address_province", "comment": null}, "billing_address_province_code": {"type": "INT64", "index": 45, "name": "billing_address_province_code", "comment": null}, "billing_address_zip": {"type": "STRING", "index": 46, "name": "billing_address_zip", "comment": null}, "browser_ip": {"type": "STRING", "index": 47, "name": "browser_ip", "comment": null}, "has_buyer_accepted_marketing": {"type": "BOOL", "index": 48, "name": "has_buyer_accepted_marketing", "comment": null}, "total_shipping_price_set": {"type": "STRING", "index": 49, "name": "total_shipping_price_set", "comment": null}, "shipping_address_address_1": {"type": "STRING", "index": 50, "name": "shipping_address_address_1", "comment": null}, "shipping_address_address_2": {"type": "STRING", "index": 51, "name": "shipping_address_address_2", "comment": null}, "shipping_address_city": {"type": "STRING", "index": 52, "name": "shipping_address_city", "comment": null}, "shipping_address_company": {"type": "STRING", "index": 53, "name": "shipping_address_company", "comment": null}, "shipping_address_country": {"type": "STRING", "index": 54, "name": "shipping_address_country", "comment": null}, "shipping_address_country_code": {"type": "STRING", "index": 55, "name": "shipping_address_country_code", "comment": null}, "shipping_address_first_name": {"type": "STRING", "index": 56, "name": "shipping_address_first_name", "comment": null}, "shipping_address_last_name": {"type": "STRING", "index": 57, "name": "shipping_address_last_name", "comment": null}, "shipping_address_latitude": {"type": "STRING", "index": 58, "name": "shipping_address_latitude", "comment": null}, "shipping_address_longitude": {"type": "STRING", "index": 59, "name": "shipping_address_longitude", "comment": null}, "shipping_address_name": {"type": "STRING", "index": 60, "name": "shipping_address_name", "comment": null}, "shipping_address_phone": {"type": "STRING", "index": 61, "name": "shipping_address_phone", "comment": null}, "shipping_address_province": {"type": "STRING", "index": 62, "name": "shipping_address_province", "comment": null}, "shipping_address_province_code": {"type": "INT64", "index": 63, "name": "shipping_address_province_code", "comment": null}, "shipping_address_zip": {"type": "STRING", "index": 64, "name": "shipping_address_zip", "comment": null}, "is_test_order": {"type": "BOOL", "index": 65, "name": "is_test_order", "comment": null}, "token": {"type": "STRING", "index": 66, "name": "token", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 67, "name": "_fivetran_synced", "comment": null}, "shipping_cost": {"type": "FLOAT64", "index": 68, "name": "shipping_cost", "comment": null}, "order_adjustment_amount": {"type": "INT64", "index": 69, "name": "order_adjustment_amount", "comment": null}, "order_adjustment_tax_amount": {"type": "FLOAT64", "index": 70, "name": "order_adjustment_tax_amount", "comment": null}, "refund_subtotal": {"type": "NUMERIC", "index": 71, "name": "refund_subtotal", "comment": null}, "refund_total_tax": {"type": "NUMERIC", "index": 72, "name": "refund_total_tax", "comment": null}, "order_adjusted_total": {"type": "FLOAT64", "index": 73, "name": "order_adjusted_total", "comment": null}, "line_item_count": {"type": "INT64", "index": 74, "name": "line_item_count", "comment": null}, "customer_order_seq_number": {"type": "INT64", "index": 75, "name": "customer_order_seq_number", "comment": null}, "new_vs_repeat": {"type": "STRING", "index": 76, "name": "new_vs_repeat", "comment": null}, "is_attributed": {"type": "BOOL", "index": 77, "name": "is_attributed", "comment": null}, "last_touch_campaign_id": {"type": "STRING", "index": 78, "name": "last_touch_campaign_id", "comment": null}, "last_touch_flow_id": {"type": "STRING", "index": 79, "name": "last_touch_flow_id", "comment": null}, "last_touch_variation_id": {"type": "STRING", "index": 80, "name": "last_touch_variation_id", "comment": null}, "last_touch_campaign_name": {"type": "STRING", "index": 81, "name": "last_touch_campaign_name", "comment": null}, "last_touch_campaign_subject_line": {"type": "STRING", "index": 82, "name": "last_touch_campaign_subject_line", "comment": null}, "last_touch_campaign_type": {"type": "STRING", "index": 83, "name": "last_touch_campaign_type", "comment": null}, "last_touch_flow_name": {"type": "STRING", "index": 84, "name": "last_touch_flow_name", "comment": null}, "count_interactions_with_campaign": {"type": "INT64", "index": 85, "name": "count_interactions_with_campaign", "comment": null}, "count_interactions_with_flow": {"type": "INT64", "index": 86, "name": "count_interactions_with_flow", "comment": null}, "last_touch_event_id": {"type": "STRING", "index": 87, "name": "last_touch_event_id", "comment": null}, "last_touch_event_occurred_at": {"type": "TIMESTAMP", "index": 88, "name": "last_touch_event_occurred_at", "comment": null}, "last_touch_event_type": {"type": "STRING", "index": 89, "name": "last_touch_event_type", "comment": null}, "last_touch_integration_name": {"type": "STRING", "index": 90, "name": "last_touch_integration_name", "comment": null}, "last_touch_integration_category": {"type": "STRING", "index": 91, "name": "last_touch_integration_category", "comment": null}, "shopify_source_relation": {"type": "STRING", "index": 92, "name": "shopify_source_relation", "comment": null}, "klaviyo_source_relation": {"type": "STRING", "index": 93, "name": "klaviyo_source_relation", "comment": null}, "unique_order_key": {"type": "STRING", "index": 94, "name": "unique_order_key", "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": 4099.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "partitioning_type": {"id": "partitioning_type", "label": "Partitioned By", "value": "created_timestamp", "include": true, "description": "The partitioning column for this table"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.shopify_holistic_reporting.shopify_holistic_reporting__orders_attribution"}}, "sources": {"source.klaviyo_source.klaviyo.event": {"metadata": {"type": "table", "schema": "klaviyo", "name": "event", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "STRING", "index": 1, "name": "id", "comment": null}, "_fivetran_deleted": {"type": "BOOL", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 3, "name": "_fivetran_synced", "comment": null}, "_variation": {"type": "STRING", "index": 4, "name": "_variation", "comment": null}, "campaign_id": {"type": "STRING", "index": 5, "name": "campaign_id", "comment": null}, "datetime": {"type": "TIMESTAMP", "index": 6, "name": "datetime", "comment": null}, "flow_id": {"type": "STRING", "index": 7, "name": "flow_id", "comment": null}, "flow_message_id": {"type": "STRING", "index": 8, "name": "flow_message_id", "comment": null}, "metric_id": {"type": "STRING", "index": 9, "name": "metric_id", "comment": null}, "person_id": {"type": "STRING", "index": 10, "name": "person_id", "comment": null}, "property_attribution": {"type": "STRING", "index": 11, "name": "property_attribution", "comment": null}, "property_campaign_name": {"type": "STRING", "index": 12, "name": "property_campaign_name", "comment": null}, "property_client_name": {"type": "STRING", "index": 13, "name": "property_client_name", "comment": null}, "property_client_os": {"type": "STRING", "index": 14, "name": "property_client_os", "comment": null}, "property_client_os_family": {"type": "STRING", "index": 15, "name": "property_client_os_family", "comment": null}, "property_client_type": {"type": "STRING", "index": 16, "name": "property_client_type", "comment": null}, "property_cohort_message_send_cohort": {"type": "STRING", "index": 17, "name": "property_cohort_message_send_cohort", "comment": null}, "property_email_domain": {"type": "STRING", "index": 18, "name": "property_email_domain", "comment": null}, "property_event_id": {"type": "STRING", "index": 19, "name": "property_event_id", "comment": null}, "property_message_interaction": {"type": "STRING", "index": 20, "name": "property_message_interaction", "comment": null}, "property_subject": {"type": "STRING", "index": 21, "name": "property_subject", "comment": null}, "timestamp": {"type": "TIMESTAMP", "index": 22, "name": "timestamp", "comment": null}, "type": {"type": "STRING", "index": 23, "name": "type", "comment": null}, "uuid": {"type": "STRING", "index": 24, "name": "uuid", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 11.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 3485.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.klaviyo_source.klaviyo.event"}, "source.klaviyo_source.klaviyo.flow": {"metadata": {"type": "table", "schema": "klaviyo", "name": "flow", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "STRING", "index": 1, "name": "id", "comment": null}, "_fivetran_deleted": {"type": "BOOL", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 3, "name": "_fivetran_synced", "comment": null}, "created": {"type": "TIMESTAMP", "index": 4, "name": "created", "comment": null}, "customer_filter": {"type": "STRING", "index": 5, "name": "customer_filter", "comment": null}, "name": {"type": "STRING", "index": 6, "name": "name", "comment": null}, "status": {"type": "STRING", "index": 7, "name": "status", "comment": null}, "trigger": {"type": "STRING", "index": 8, "name": "trigger", "comment": null}, "updated": {"type": "TIMESTAMP", "index": 9, "name": "updated", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 6.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 1022.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.klaviyo_source.klaviyo.flow"}, "source.klaviyo_source.klaviyo.metric": {"metadata": {"type": "table", "schema": "klaviyo", "name": "metric", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "STRING", "index": 1, "name": "id", "comment": null}, "_fivetran_deleted": {"type": "BOOL", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 3, "name": "_fivetran_synced", "comment": null}, "created": {"type": "TIMESTAMP", "index": 4, "name": "created", "comment": null}, "integration_id": {"type": "STRING", "index": 5, "name": "integration_id", "comment": null}, "name": {"type": "STRING", "index": 6, "name": "name", "comment": null}, "updated": {"type": "TIMESTAMP", "index": 7, "name": "updated", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 8.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 455.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.klaviyo_source.klaviyo.metric"}, "source.klaviyo_source.klaviyo.integration": {"metadata": {"type": "table", "schema": "klaviyo", "name": "integration", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "STRING", "index": 1, "name": "id", "comment": null}, "_fivetran_deleted": {"type": "BOOL", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 3, "name": "_fivetran_synced", "comment": null}, "category": {"type": "STRING", "index": 4, "name": "category", "comment": null}, "name": {"type": "STRING", "index": 5, "name": "name", "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": 63.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.klaviyo_source.klaviyo.integration"}, "source.klaviyo_source.klaviyo.person": {"metadata": {"type": "table", "schema": "klaviyo", "name": "person", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "STRING", "index": 1, "name": "id", "comment": null}, "_fivetran_deleted": {"type": "BOOL", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 3, "name": "_fivetran_synced", "comment": null}, "address_1": {"type": "STRING", "index": 4, "name": "address_1", "comment": null}, "address_2": {"type": "STRING", "index": 5, "name": "address_2", "comment": null}, "city": {"type": "STRING", "index": 6, "name": "city", "comment": null}, "country": {"type": "STRING", "index": 7, "name": "country", "comment": null}, "created": {"type": "TIMESTAMP", "index": 8, "name": "created", "comment": null}, "custom_email": {"type": "STRING", "index": 9, "name": "custom_email", "comment": null}, "custom_object": {"type": "STRING", "index": 10, "name": "custom_object", "comment": null}, "email": {"type": "STRING", "index": 11, "name": "email", "comment": null}, "first_name": {"type": "STRING", "index": 12, "name": "first_name", "comment": null}, "last_name": {"type": "STRING", "index": 13, "name": "last_name", "comment": null}, "latitude": {"type": "FLOAT64", "index": 14, "name": "latitude", "comment": null}, "longitude": {"type": "FLOAT64", "index": 15, "name": "longitude", "comment": null}, "organization": {"type": "STRING", "index": 16, "name": "organization", "comment": null}, "phone_number": {"type": "STRING", "index": 17, "name": "phone_number", "comment": null}, "region": {"type": "STRING", "index": 18, "name": "region", "comment": null}, "timezone": {"type": "STRING", "index": 19, "name": "timezone", "comment": null}, "title": {"type": "STRING", "index": 20, "name": "title", "comment": null}, "updated": {"type": "TIMESTAMP", "index": 21, "name": "updated", "comment": null}, "zip": {"type": "STRING", "index": 22, "name": "zip", "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": 147.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.klaviyo_source.klaviyo.person"}, "source.klaviyo_source.klaviyo.campaign": {"metadata": {"type": "table", "schema": "klaviyo", "name": "campaign", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "STRING", "index": 1, "name": "id", "comment": null}, "_fivetran_deleted": {"type": "BOOL", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 3, "name": "_fivetran_synced", "comment": null}, "campaign_type": {"type": "STRING", "index": 4, "name": "campaign_type", "comment": null}, "created": {"type": "TIMESTAMP", "index": 5, "name": "created", "comment": null}, "email_template_id": {"type": "STRING", "index": 6, "name": "email_template_id", "comment": null}, "from_email": {"type": "STRING", "index": 7, "name": "from_email", "comment": null}, "from_name": {"type": "STRING", "index": 8, "name": "from_name", "comment": null}, "is_segmented": {"type": "BOOL", "index": 9, "name": "is_segmented", "comment": null}, "name": {"type": "STRING", "index": 10, "name": "name", "comment": null}, "send_time": {"type": "TIMESTAMP", "index": 11, "name": "send_time", "comment": null}, "sent_at": {"type": "TIMESTAMP", "index": 12, "name": "sent_at", "comment": null}, "status": {"type": "STRING", "index": 13, "name": "status", "comment": null}, "status_id": {"type": "STRING", "index": 14, "name": "status_id", "comment": null}, "status_label": {"type": "STRING", "index": 15, "name": "status_label", "comment": null}, "subject": {"type": "STRING", "index": 16, "name": "subject", "comment": null}, "updated": {"type": "TIMESTAMP", "index": 17, "name": "updated", "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": 630.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.klaviyo_source.klaviyo.campaign"}}, "errors": null} \ No newline at end of file diff --git a/docs/graph.gpickle b/docs/graph.gpickle index 1bff471c009a1b5ed5423cb3a8019786feeafa95..6ab87f1a9f54fddff07d88f4775c9c605d7c3ce0 100644 GIT binary patch delta 5404 zcmZ{ocUV-%8pfS-W?)%*L;;PvK@m$pvG-s>G$DzRSaPkzLM%}+f{7*uxoX5boBOB> zOzc=OD$T?7!ziM16%^FijZp*<1q&i-?09G9z=~%#{yE<}zj?nha~6{`Jk3d-WFbjd z(;$Nsx6ri;xwAJa+T^!#vO#h5HR<@me%EMIYrc@}KiPpVWUq=gwPy?FY=6BH)-{;$ z#RCP=rj}f_zZbFR3puZ%O#yu2R{!4b@P$LaMw{C3g%5|Pxe~UJ>!-Y$6exE8uWz)e z9glrJ%_J6%e8F6p55^f368WBtc6F`qu&*X+8rOamIYt&ac|8_)^bV+ zJEgzb?Eo>uzB`(e9`4^J@skFHnb+q$eG^nN4hD$8NNUy}?QJ&ZLcQRFTn`b9C{XlA zrTP{gu7enxc7}c(bOiF%8@gZW<9Tyn%$~>>B7}Wuk^XR13P%s%>bRf2Kg#} z*K!?LAW1`03w_cEg}QU-iZL*#6(Y7w!iu(NFn5`gnh8bzC|#Q< zoalfS8(CS-_n2WR%ll^c%dH`9DB5Yu9(*?pISFRj&19C1m9hNMsN97cJHL%G=l(Qj z6mo+H)6iaz2I(O@66ILA9v6+;+p!}q*ag7K@6j=vxhKV- zVWLCNI%7rAFGWT%F`xek?UthooA$<-k%3dP_tZd40=if)U0`Ep;5N?9jDh%# z=#)(x+qa@oqFi0(gZ*~2*sfk9Bdd@v98X0*a2r<>A|W&jov3ev3EINgeTZ;EUPUrp z{+bmu@HBRSwb|%EJu_6WR^_6ddd_m~4j-OG=dD;1Pa}81GH!->XHj+iq6or{ODKVl z{?%kZ%G~%vWD(k^#ZYF+g$7+ljxehP-Q{z7w89a>OVMR3;JkA5H)i+vYQ*%q{?diF zP-jTLhql%O13Uf`i3#(DePa>2$4YJBVKo|OmFe=Q=moF+)e-xF6=j~3=z>0eyR>a# zvm~)cJR!URYQX=|)3Q{+_T%c2$C57F?Zk|&IBEM?X6$cx+- z#&}DwMaoJKV5(?42e-PH2&#Of8a+#*gg9A}aErt5LDK+fj>j7zWkPSNw2<84Y(FWa z5pz|1b21o4N;hPU3c8M#^!)2v5`PQ^PLnq2oGmZk_^C6a1PY9Eq>;SyrO8L&`vp=m z)>20NThcjlXT$!oIGYhGb%OQ3NWJZCASpw-f=`09g_orC=NWK(z4XY6TfJE-bm81C z1`F4DJZTTlcT1l&{wFS7G=aPa8ONkB4-Sv|lCsplg_t6V>fbnr4i(aP9fRLE)y4vE zUoJI=oCi`cdLyJv=ndT-O6PfFPX3eu?vJJBL@W5}xs+i~(;mrscwdsANgfG)cIs$M z>9-($%7C%#r$HlHQYbf~!9=cRsIr1g=w&CDx@b{hjbxXW%vo7{n#CFNkh{T_p7Ld_ zGx|%g>`JTq$gQEGw;aX4L*>q{b^A>IbZ8`gml{1}2Wp6rb+9T(K3KodB0I*|!LM$) zn-O{slKbeimQseuIlNV6k1JsIzvOPtTEUeFx!RkZeRFC*%h@exhjPi24o)J@fMVs@ z^`}o9yKS-jmn+|tJIu1FBj4mj|JX#DLTFI(eb!NKTU9$O%`OxnDaX9!6z|FLNX!Q`>8IF94cQj`CRt$5u zx zyezeNkd9kJP6E#6#kw$PBE)q7jy)^Y8}LFa>3=ulJR!Z` z6k@mG6s>@ouj7EkW7w6}?8HrI@l%YUUI zsw#J5AMnk@Kh{%Go)A580C%OuDOg7r?!~_9A)#4#n%F+QK;8a2iydOW4=>Vg2e!RX zNX=iU(yDBB(%nOE`B6_g??`wy4mA8Q_Mw3Rgh161JW}l5|E;>)n2(#ontZ&%>Y!PL zxJ*dPl2obxDJI>13OAA7?vWRr`4qbWIfL);N9Jn!2k`hTUZMfksVop2F#A2vS1tF=^Mb-E%1ickt z_65c^fwZMN@uaC^B)dH|c)#$Q)dLQ_#y&RX&{85Nh3eYxH1!kG3XGWCw^;zn3ZRl{ zUx_%vJUg;c?0gvnMje@>buKzgvm2AH!cJlh*3;?3Nn=z=-D$7#-#V}tr#I@2oTnnx>Mg?2REnSJtZxR4r~ zUV&BNPj2qo5Eqael5cIA17=R)wY@eWP_1ooBjN+O-sHN5>Pg3SBzh=mO42yBWJ3gH zgVl_B_>v}2*o+u8{91i0A7bYGlFZs0o?~FHoqUO-rWv*R&;7_V!7uZGp{oz{gp?$V2BFGa1FNqxu}?)dr)GxQ1~+N)Npy49a-5!6LzRcdN5t8>x7f2#A# zK_p91b6!z4x(2xTA*rz4l9!<*MM%$;0h`~KwpBNWknKWsV;5z!+5}RDk|1pbz%ZO_ z5;mV)RBdL5vE<+Rf;ejnOFsxF-Y{(xYa~m)G~Gjt1JE%f+KS4g;#*UCWTv1dPGsHs zVIrx}DphFuS48}`N$KBW(gSGK6lNl5I`Oh;B6-sc@%PM)c6n;4j?5y{ZIi#BLymL1 zH~M9%={1|noUEEl8d{NKma%Cs|BfK8zgaL3D(91)wpEiB5C@?uYEPLe6tZJ%Tn7R4 zTBKfwn~&D12GSR@)LtzipJ@#P)9>QcTmE@M3S&)VrdCA-)qXiyC#2yWRO$~aSz1q5 zl2Nwx|4FPxZ}L>pU#}vIZA<;vkqm*pGC`HPCXroMQrDeq7VNgDT`q52rMh^vm5um- zWTJi1J%Qh`*`fch8xB_x;wl*7_d%?t3l8 zo}X;@BsnC%32i6!-HgFYlBC<&=HOK+zKVT!vymU*RoUjA{NO;J6caxn&DrL@?7(uM zkDW3xawOr02Cr;$5RdviiWvBTF(%s_$`7uM80^XqOiH%77e9zi+U7*qfxW--=;d&M zb{Ldx4&$Fqnq?LTohC9BmWp?M6_Vj^$Kg&s+2(HIWb7M-LYVWYY;&MEad>MB;Tc_$ zlmqYXlzF)8lx%Z%@gX%Ai*UC!?I$ngkH;Lo$m9NLZ(26^-sF;$d-#h}cr8l$7@ED8gyu5D{_EQJJtQtfPp7pA8fdXJqAJ zSx`q2Q@7cRh%2>9`i_AeMf|ADmz|i>=7L!cMjM-jA7q;&Ey7umS28)mZs(*N6XPu*M6H#^sDjo zEs=44gmS4S@^=|U#KhVqypn-S_gcO^*U~`>hx6Bk>VhLQK1%jfoG(;ipWyb%m^w2p zD`m#3)3Ro!r%laD$;`^65e2BbVte_BiKUIcQ=(K~Ymzhpw0t76Rhk=nbGdztsY<}j z5*;+RoAUU8j~Kj6$-VcUtdnNsLoY!y>Z&sBQH+c*ebIpZb{$7^kY)x*me5)Q;~c*6 z8)!43t2(`bXD6hx=G>%LQc)jBc0!l6Ey8SfG}eXlHS~u4L5S!y33qy;(cEQd%1Ve1 zLFGEAx`v}%KQ>~+moI-hVj*vd+I(Vaz%&Pi3(_8~Ff+WDwTyQq-25dB$9 z&CV-udoilj!E!4X`I%TfqqkK(t!EfLn}`Bw(fim4F)Pq6y(Ys}B417)^12ZwSkQT5 zZBl{lpfC3qeIghVi_jSz{t`Yy$->`F1$KRma&4^<(4uP8ojyK?9BFbHGQgW#&1&Do4F`0hrlt(#=Ideb$RS+1w3-Fwl`{MP9oJ`0-mp*vRH3Nhev z7;Uy=keEHqaQGxTXO$BeXB2naFXtrG)u3kU-Q;e8xy|R7O>ECDz&xI|O29Ss24;## zofymTIqd^Li*Mj?xLA)i=%Czm6}4hEK%;M-Xvdo)XhahZrS-QEf%-=Du?`t~ZlZ3& z?5^2Re;d88qnhhl&_g~zqw8l<)_^{={w^}X*?*&vk|E#L2HDuySmrjyYt2Y+_@E7i zAzE3Ayz{S0+j+%rT!2C(Ej4IiyVKgs*d0<#(lI_-qfZt=xSMoF+b{jfPV#~=9?~^F zLjCL&%5a{vx|d`}52Z<+VUCwH%+@E++ILv7^bDN#m9E;c?u~s=)?R(;Y{dRh*GtND z*T!cJl_qy)3dUZ#4mFdcA7pLFHG?|ORd;Sp3ZSf>^PuvgMD47x z(1;xQ8CY~xiZL?Wc>hUIbyG@1+K?%?rE`e+i+XYLfBTyzd(!eBBs=(PlXTCjKb3i2 ztF+x<%D-gd`(k4QJs(T5Y)K9=N#@RU+6lQcO+<1tmv+Al#!7O7qqejJ7uhk0P38EL z-?vMnF3$1**bpgS)M0J?KzTF23?>}?2e1d74jYs~oZz)+xlrJaTfpNvd5BS4YW7(9 z5MSK{zdbN0NgmKi8?x$ea`Q7Bvg9}{T_6`(-5Fr*y~}?xB~(qO?3W9d8~_=MKd~=pj4o3JdPZ zbxx=Uu(xa@vX%~*gMxlc{G^@se31gcaVTD>!*o?FzU;wG-|h)plJPRD5MZXeIJ4+P znghuTaE`&6CMrr4nv1LXrY63$V)uJEPxk3;r4J=95Kk!2!_~ZXBl1IOL<e2ljW@C)uLxa+6* zZN1E2ZN_^f%(TBv!&`6|9N3E4vS`&y_5I!sTqB6L8mUWH5(as@@CKb=%D|EQS#J-e zd+~CS=0b^DzJ>c(`IdZ+U(uNhyehE5GmMmL)e1cN0xQ~Js5ypP1upalVSpA@;Q;Xd z5_?P9B^ck#TAy+X-{7x<*uHg;RIRJ*0%u=~4{+w#=T4}ei@(N!(B&Nd73pMt{yeS` z%ozx}T)-LHcBx=K@SQp>v5RZerme5TZaVGKM{U@XF1p5ki;?efsi5Cf3R@fSOuh7@ zui;I?_}=MHn*Ady`N&4xS*HeA_A|DX99ZcZqMqDe)aeHH1mzZ9psfN}5iSV<%`Lz- zeS%I}T4qN)^J|EKw%HOBT)c;OaQkDrl*7sgI6!9>Xn2UL1ulZnj2O}bE#q zJM0l2MxA%zApU89LuP8#^TWTbWlj?Ystx1Eu*gUr>y^zacR|RW-v-Ma$h`kUb|hu@ zxHCQFLR@J^1;+5cGnvf0H)d&>s^*|834~|e$Q4aB0WhjF*~W#$y)&4ymFWr|o@9`w zngE#ZO)Q)=j{XYlo_j&F*#ThjBM$`C7a_1RfEcmXRtLb5Ao5547h2re$Evlq?yS(U zy@-nrzT6Pf%K65jnXovNn02`7A3?-xWt`g-^&;@^M_hGKy%zC{oIcIc^+LZKe+*{%~X{Y0%NZnrN~|*nI6YWozdPn@5nJbl?t-BxM4( z)C1Vs{aXiQ^=R^`fUMa{*|K@VOJm3|9sZ7uBWr}e&x(aV$V(uhnq>`#)``TPIaML^FLjfKoS{e!!%ZSFeno#`83bIAu(w~s_&0{4?SxKf_B?Shq z6}SR}`U0w0&78JUvfL_;a#Hp8+`d909={W+BUQU+*6|GMNuk~hUv7Ak;r;+M!=X~9 z-LR3kYu=ik5cL^Z%y(eYKK12H4{l-LPFu+`Z7^lvuJH8^a$02g@vur?yo+VHyPLFH fH^6^4s2O_fXI~>sL!$RT)eH&ySO(=FNp|@U(xsX| diff --git a/docs/manifest.json b/docs/manifest.json index 0b82ce6..814da02 100644 --- a/docs/manifest.json +++ b/docs/manifest.json @@ -1 +1 @@ -{"metadata": {"dbt_schema_version": "https://schemas.getdbt.com/dbt/manifest/v6.json", "dbt_version": "1.2.0", "generated_at": "2022-10-13T23:10:08.553077Z", "invocation_id": "995a6e9b-ac7c-4344-a33a-82df97529d6b", "env": {}, "project_id": "0d919ec91381ade1c67705291b214e1c", "user_id": "2bfa9082-ea6e-467b-abdc-d0514ab111d9", "send_anonymous_usage_stats": true, "adapter_type": "bigquery"}, "nodes": {"seed.shopify_holistic_reporting_integration_tests.shopify_order_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": {"_fivetran_synced": "timestamp", "created_at": "timestamp", "updated_at": "timestamp", "processed_at": "timestamp", "cancelled_at": "timestamp", "id": "INT64", "customer_id": "INT64", "location_id": "INT64", "user_id": "INT64"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests", "fqn": ["shopify_holistic_reporting_integration_tests", "shopify_order_data"], "unique_id": "seed.shopify_holistic_reporting_integration_tests.shopify_order_data", "package_name": "shopify_holistic_reporting_integration_tests", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests", "path": "shopify_order_data.csv", "original_file_path": "seeds/shopify_order_data.csv", "name": "shopify_order_data", "alias": "shopify_order_data", "checksum": {"name": "sha256", "checksum": "4d0dd043a886a0d9e7680e7ee2cd132717490f75d3a06fe7c38956d901976146"}, "tags": [], "refs": [], "sources": [], "metrics": [], "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 in ('redshift', 'postgres') else false }}", "column_types": {"created_at": "timestamp", "updated_at": "timestamp", "processed_at": "timestamp", "cancelled_at": "timestamp", "_fivetran_synced": "timestamp", "id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}", "customer_id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}", "location_id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}", "user_id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}"}}, "created_at": 1665702404.520545, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests`.`shopify_order_data`"}, "seed.shopify_holistic_reporting_integration_tests.shopify_order_line_refund_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": {"_fivetran_synced": "timestamp", "id": "INT64", "location_id": "INT64", "refund_id": "INT64", "order_line_id": "INT64"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests", "fqn": ["shopify_holistic_reporting_integration_tests", "shopify_order_line_refund_data"], "unique_id": "seed.shopify_holistic_reporting_integration_tests.shopify_order_line_refund_data", "package_name": "shopify_holistic_reporting_integration_tests", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests", "path": "shopify_order_line_refund_data.csv", "original_file_path": "seeds/shopify_order_line_refund_data.csv", "name": "shopify_order_line_refund_data", "alias": "shopify_order_line_refund_data", "checksum": {"name": "sha256", "checksum": "0564bef778890f3e086e4057b2536aaa6cfeceb2f9c9bd95f44d4b9f04a33dc6"}, "tags": [], "refs": [], "sources": [], "metrics": [], "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 in ('redshift', 'postgres') else false }}", "column_types": {"_fivetran_synced": "timestamp", "id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}", "location_id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}", "refund_id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}", "order_line_id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}"}}, "created_at": 1665702404.52617, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests`.`shopify_order_line_refund_data`"}, "seed.shopify_holistic_reporting_integration_tests.shopify_order_adjustment_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": {"_fivetran_synced": "timestamp", "id": "INT64", "order_id": "INT64", "refund_id": "INT64"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests", "fqn": ["shopify_holistic_reporting_integration_tests", "shopify_order_adjustment_data"], "unique_id": "seed.shopify_holistic_reporting_integration_tests.shopify_order_adjustment_data", "package_name": "shopify_holistic_reporting_integration_tests", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests", "path": "shopify_order_adjustment_data.csv", "original_file_path": "seeds/shopify_order_adjustment_data.csv", "name": "shopify_order_adjustment_data", "alias": "shopify_order_adjustment_data", "checksum": {"name": "sha256", "checksum": "48ce96540f19450088c661fd48bd8f6d58bb4ca13a1f048880e9984be367172e"}, "tags": [], "refs": [], "sources": [], "metrics": [], "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 in ('redshift', 'postgres') else false }}", "column_types": {"id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}", "order_id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}", "refund_id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}"}}, "created_at": 1665702404.527225, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests`.`shopify_order_adjustment_data`"}, "seed.shopify_holistic_reporting_integration_tests.shopify_product_variant_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": {"_fivetran_synced": "timestamp", "id": "INT64", "product_id": "INT64", "inventory_item_id": "INT64"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests", "fqn": ["shopify_holistic_reporting_integration_tests", "shopify_product_variant_data"], "unique_id": "seed.shopify_holistic_reporting_integration_tests.shopify_product_variant_data", "package_name": "shopify_holistic_reporting_integration_tests", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests", "path": "shopify_product_variant_data.csv", "original_file_path": "seeds/shopify_product_variant_data.csv", "name": "shopify_product_variant_data", "alias": "shopify_product_variant_data", "checksum": {"name": "sha256", "checksum": "3430f8a8a9139a753a727caa7e10ac2ac02c4e2683a37ed933566367d2f6200e"}, "tags": [], "refs": [], "sources": [], "metrics": [], "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 in ('redshift', 'postgres') else false }}", "column_types": {"id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}", "product_id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}", "inventory_item_id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}"}}, "created_at": 1665702404.52826, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests`.`shopify_product_variant_data`"}, "seed.shopify_holistic_reporting_integration_tests.shopify_refund_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": {"_fivetran_synced": "timestamp", "id": "INT64", "order_id": "INT64", "user_id": "INT64"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests", "fqn": ["shopify_holistic_reporting_integration_tests", "shopify_refund_data"], "unique_id": "seed.shopify_holistic_reporting_integration_tests.shopify_refund_data", "package_name": "shopify_holistic_reporting_integration_tests", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests", "path": "shopify_refund_data.csv", "original_file_path": "seeds/shopify_refund_data.csv", "name": "shopify_refund_data", "alias": "shopify_refund_data", "checksum": {"name": "sha256", "checksum": "8d8bc98681d9b0d57a43af3fc99ff13cc42401d97e49bba41c1fafb28f858d23"}, "tags": [], "refs": [], "sources": [], "metrics": [], "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 in ('redshift', 'postgres') else false }}", "column_types": {"id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}", "order_id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}", "user_id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}"}}, "created_at": 1665702404.529408, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests`.`shopify_refund_data`"}, "seed.shopify_holistic_reporting_integration_tests.shopify_transaction_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": {"_fivetran_synced": "timestamp", "id": "INT64", "order_id": "INT64", "refund_id": "INT64", "receipt": "string"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests", "fqn": ["shopify_holistic_reporting_integration_tests", "shopify_transaction_data"], "unique_id": "seed.shopify_holistic_reporting_integration_tests.shopify_transaction_data", "package_name": "shopify_holistic_reporting_integration_tests", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests", "path": "shopify_transaction_data.csv", "original_file_path": "seeds/shopify_transaction_data.csv", "name": "shopify_transaction_data", "alias": "shopify_transaction_data", "checksum": {"name": "sha256", "checksum": "def7b7fc64e42148b900dcd1f7327b470e5d3b0ed8e73f263e46a715ecb09199"}, "tags": [], "refs": [], "sources": [], "metrics": [], "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 in ('redshift', 'postgres') else false }}", "column_types": {"id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}", "order_id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}", "refund_id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}", "receipt": "{{ 'varchar(100)' if target.name in ('redshift', 'postgres') else 'string' }}"}}, "created_at": 1665702404.530432, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests`.`shopify_transaction_data`"}, "seed.shopify_holistic_reporting_integration_tests.flow": {"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": {"_fivetran_synced": "timestamp", "trigger": "string"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests", "fqn": ["shopify_holistic_reporting_integration_tests", "flow"], "unique_id": "seed.shopify_holistic_reporting_integration_tests.flow", "package_name": "shopify_holistic_reporting_integration_tests", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests", "path": "flow.csv", "original_file_path": "seeds/flow.csv", "name": "flow", "alias": "flow", "checksum": {"name": "sha256", "checksum": "8a59e1c986a7509b15603761cb0225587bd8db8ae81ee0b146ca821be8103627"}, "tags": [], "refs": [], "sources": [], "metrics": [], "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": {"trigger": "{{ 'string' if target.type in ('bigquery', 'spark') else 'varchar' }}"}, "enabled": "{{ true if target.type != 'snowflake' else false }}"}, "created_at": 1665702404.53245, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests`.`flow`"}, "seed.shopify_holistic_reporting_integration_tests.shopify_product_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": {"_fivetran_synced": "timestamp", "created_at": "timestamp", "updated_at": "timestamp", "published_at": "timestamp", "id": "INT64"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests", "fqn": ["shopify_holistic_reporting_integration_tests", "shopify_product_data"], "unique_id": "seed.shopify_holistic_reporting_integration_tests.shopify_product_data", "package_name": "shopify_holistic_reporting_integration_tests", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests", "path": "shopify_product_data.csv", "original_file_path": "seeds/shopify_product_data.csv", "name": "shopify_product_data", "alias": "shopify_product_data", "checksum": {"name": "sha256", "checksum": "5cc03f90512ac04a6526220040085e4e0488b62ef22e8b201424c7d7cf1bf847"}, "tags": [], "refs": [], "sources": [], "metrics": [], "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 in ('redshift', 'postgres') else false }}", "column_types": {"created_at": "timestamp", "updated_at": "timestamp", "published_at": "timestamp", "_fivetran_synced": "timestamp", "id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}"}}, "created_at": 1665702404.533605, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests`.`shopify_product_data`"}, "seed.shopify_holistic_reporting_integration_tests.integration": {"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": {"_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests", "fqn": ["shopify_holistic_reporting_integration_tests", "integration"], "unique_id": "seed.shopify_holistic_reporting_integration_tests.integration", "package_name": "shopify_holistic_reporting_integration_tests", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests", "path": "integration.csv", "original_file_path": "seeds/integration.csv", "name": "integration", "alias": "integration", "checksum": {"name": "sha256", "checksum": "7d65e88ffe7faca2f24289441001007cc8222d5bb8f788c2807072bd7bb0b022"}, "tags": [], "refs": [], "sources": [], "metrics": [], "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 in ('redshift', 'postgres') else false }}", "column_types": {"_fivetran_synced": "timestamp"}}, "created_at": 1665702404.5345972, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests`.`integration`"}, "seed.shopify_holistic_reporting_integration_tests.metric": {"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": {"_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests", "fqn": ["shopify_holistic_reporting_integration_tests", "metric"], "unique_id": "seed.shopify_holistic_reporting_integration_tests.metric", "package_name": "shopify_holistic_reporting_integration_tests", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests", "path": "metric.csv", "original_file_path": "seeds/metric.csv", "name": "metric", "alias": "metric", "checksum": {"name": "sha256", "checksum": "155dde6f21d4cf0d8d11b898b4c1f310c2ffbe44c897aaacd5dd31a607bd447a"}, "tags": [], "refs": [], "sources": [], "metrics": [], "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 in ('redshift', 'postgres') else false }}", "column_types": {"_fivetran_synced": "timestamp"}}, "created_at": 1665702404.535552, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests`.`metric`"}, "seed.shopify_holistic_reporting_integration_tests.person": {"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": {"_fivetran_synced": "timestamp", "phone_number": "string"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests", "fqn": ["shopify_holistic_reporting_integration_tests", "person"], "unique_id": "seed.shopify_holistic_reporting_integration_tests.person", "package_name": "shopify_holistic_reporting_integration_tests", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests", "path": "person.csv", "original_file_path": "seeds/person.csv", "name": "person", "alias": "person", "checksum": {"name": "sha256", "checksum": "6f915292a8aba951a356baacc8e65fac88b0a28e98d6cff84f708aeaf68d9ceb"}, "tags": [], "refs": [], "sources": [], "metrics": [], "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 in ('redshift', 'postgres') else false }}", "column_types": {"phone_number": "{{ 'string' if target.type in ('bigquery', 'spark') else 'varchar' }}"}}, "created_at": 1665702404.536522, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests`.`person`"}, "seed.shopify_holistic_reporting_integration_tests.event": {"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": {"_fivetran_synced": "timestamp", "flow_id": "string", "campaign_id": "string"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests", "fqn": ["shopify_holistic_reporting_integration_tests", "event"], "unique_id": "seed.shopify_holistic_reporting_integration_tests.event", "package_name": "shopify_holistic_reporting_integration_tests", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests", "path": "event.csv", "original_file_path": "seeds/event.csv", "name": "event", "alias": "event", "checksum": {"name": "sha256", "checksum": "fb7883912895ceb24123ecd1e37c8cd3d8e837493d1ed2007fd64daf45a8581c"}, "tags": [], "refs": [], "sources": [], "metrics": [], "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 in ('redshift', 'postgres') else false }}", "column_types": {"flow_id": "{{ 'string' if target.type in ('bigquery', 'spark') else 'varchar' }}", "campaign_id": "{{ 'string' if target.type in ('bigquery', 'spark') else 'varchar' }}"}}, "created_at": 1665702404.537636, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests`.`event`"}, "seed.shopify_holistic_reporting_integration_tests.shopify_customer_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": {"_fivetran_synced": "timestamp", "created_at": "timestamp", "updated_at": "timestamp", "id": "INT64", "default_address_id": "INT64"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests", "fqn": ["shopify_holistic_reporting_integration_tests", "shopify_customer_data"], "unique_id": "seed.shopify_holistic_reporting_integration_tests.shopify_customer_data", "package_name": "shopify_holistic_reporting_integration_tests", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests", "path": "shopify_customer_data.csv", "original_file_path": "seeds/shopify_customer_data.csv", "name": "shopify_customer_data", "alias": "shopify_customer_data", "checksum": {"name": "sha256", "checksum": "79bc0a5972c321cefe2973acdd443ce1d42e36b3b23b2298151046d23bdf4bea"}, "tags": [], "refs": [], "sources": [], "metrics": [], "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 in ('redshift', 'postgres') else false }}", "column_types": {"created_at": "timestamp", "updated_at": "timestamp", "_fivetran_synced": "timestamp", "id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}", "default_address_id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}"}}, "created_at": 1665702404.538647, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests`.`shopify_customer_data`"}, "seed.shopify_holistic_reporting_integration_tests.shopify_order_line_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": {"_fivetran_synced": "timestamp", "order_id": "INT64", "id": "INT64", "product_id": "INT64", "variant_id": "INT64"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests", "fqn": ["shopify_holistic_reporting_integration_tests", "shopify_order_line_data"], "unique_id": "seed.shopify_holistic_reporting_integration_tests.shopify_order_line_data", "package_name": "shopify_holistic_reporting_integration_tests", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests", "path": "shopify_order_line_data.csv", "original_file_path": "seeds/shopify_order_line_data.csv", "name": "shopify_order_line_data", "alias": "shopify_order_line_data", "checksum": {"name": "sha256", "checksum": "cabaa49c9bd299b34eb2154893a6dd399fbbad7e4ad7036293c8b4cb599199e0"}, "tags": [], "refs": [], "sources": [], "metrics": [], "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 in ('redshift', 'postgres') else false }}", "column_types": {"_fivetran_synced": "timestamp", "order_id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}", "id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}", "product_id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}", "variant_id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}"}}, "created_at": 1665702404.539656, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests`.`shopify_order_line_data`"}, "seed.shopify_holistic_reporting_integration_tests.campaign": {"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": {"_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests", "fqn": ["shopify_holistic_reporting_integration_tests", "campaign"], "unique_id": "seed.shopify_holistic_reporting_integration_tests.campaign", "package_name": "shopify_holistic_reporting_integration_tests", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests", "path": "campaign.csv", "original_file_path": "seeds/campaign.csv", "name": "campaign", "alias": "campaign", "checksum": {"name": "sha256", "checksum": "e80312165b7d9198633569c5c50aaaf7e73df74dff2d46600adca3fef4b8dd43"}, "tags": [], "refs": [], "sources": [], "metrics": [], "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 in ('redshift', 'postgres') else false }}", "column_types": {"_fivetran_synced": "timestamp"}}, "created_at": 1665702404.5406349, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests`.`campaign`"}, "model.shopify_source.stg_shopify__order_line": {"raw_sql": "with source as (\n\n select * from {{ ref('stg_shopify__order_line_tmp') }}\n\n),\n\nrenamed as (\n\n select\n \n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_shopify__order_line_tmp')),\n staging_columns=get_order_line_columns()\n )\n }}\n\n --The below script allows for pass through columns.\n {% if var('order_line_pass_through_columns') %}\n ,\n {{ var('order_line_pass_through_columns') | join (\", \")}}\n\n {% endif %}\n\n {{ fivetran_utils.source_relation(\n union_schema_variable='shopify_union_schemas', \n union_database_variable='shopify_union_databases') \n }}\n\n from source\n\n)\n\nselect * from renamed", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.shopify_source.get_order_line_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.source_relation"], "nodes": ["model.shopify_source.stg_shopify__order_line_tmp", "model.shopify_source.stg_shopify__order_line_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_stg_shopify", "fqn": ["shopify_source", "stg_shopify__order_line"], "unique_id": "model.shopify_source.stg_shopify__order_line", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "stg_shopify__order_line.sql", "original_file_path": "models/stg_shopify__order_line.sql", "name": "stg_shopify__order_line", "alias": "stg_shopify__order_line", "checksum": {"name": "sha256", "checksum": "bb641f0d784534dc9d6d86bda3391b7c905b0a739c6cf34ef60e4716b5fd86ce"}, "tags": [], "refs": [["stg_shopify__order_line_tmp"], ["stg_shopify__order_line_tmp"]], "sources": [], "metrics": [], "description": "Each record represents a line item from an order in Shopify.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "fulfillable_quantity": {"name": "fulfillable_quantity", "description": "The amount available to fulfill, calculated as follows: quantity - max(refunded_quantity, fulfilled_quantity) - pending_fulfilled_quantity - open_fulfilled_quantity", "meta": {}, "data_type": null, "quote": null, "tags": []}, "fulfillment_service": {"name": "fulfillment_service", "description": "The service provider that's fulfilling the item.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "fulfillment_status": {"name": "fulfillment_status", "description": "How far along an order is in terms line items fulfilled.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_gift_card": {"name": "is_gift_card", "description": "Whether the item is a gift card. If true, then the item is not taxed or considered for shipping charges.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "grams": {"name": "grams", "description": "The weight of the item in grams.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_line_id": {"name": "order_line_id", "description": "The ID of the line item.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "name": {"name": "name", "description": "The name of the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_id": {"name": "order_id", "description": "The ID of the related order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "price": {"name": "price", "description": "The price of the item before discounts have been applied in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "product_id": {"name": "product_id", "description": "The ID of the product that the line item belongs to. Can be null if the original product associated with the order is deleted at a later date.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "quantity": {"name": "quantity", "description": "The number of items that were purchased.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_requiring_shipping": {"name": "is_requiring_shipping", "description": "Whether the item requires shipping.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "sku": {"name": "sku", "description": "The item's SKU (stock keeping unit).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_taxable": {"name": "is_taxable", "description": "Whether the item was taxable.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "title": {"name": "title", "description": "The title of the product.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_discount": {"name": "total_discount", "description": "The total amount of the discount allocated to the line item in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_id": {"name": "variant_id", "description": "The ID of the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "vendor": {"name": "vendor", "description": "The name of the item's supplier.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify_source://models/stg_shopify.yml", "compiled_path": "target/compiled/shopify_source/models/stg_shopify__order_line.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify", "materialized": "table"}, "created_at": 1665702405.01487, "compiled_sql": "with source as (\n\n select * from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__order_line_tmp`\n\n),\n\nrenamed as (\n\n select\n \n \n cast(null as \n timestamp\n) as \n \n _fivetran_synced\n \n , \n cast(null as \n numeric\n) as \n \n fulfillable_quantity\n \n , \n cast(null as \n string\n) as \n \n fulfillment_service\n \n , \n cast(null as \n string\n) as \n \n fulfillment_status\n \n , \n cast(null as boolean) as is_gift_card , \n cast(null as \n numeric\n) as \n \n grams\n \n , \n cast(null as \n numeric\n) as order_line_id , \n cast(null as \n numeric\n) as \n \n index\n \n , \n cast(null as \n string\n) as \n \n name\n \n , \n cast(null as \n numeric\n) as \n \n order_id\n \n , \n cast(null as \n float64\n) as \n \n pre_tax_price\n \n , \n cast(null as \n float64\n) as \n \n price\n \n , \n cast(null as \n numeric\n) as \n \n product_id\n \n , \n cast(null as \n numeric\n) as \n \n property_charge_interval_frequency\n \n , \n cast(null as \n string\n) as \n \n property_for_shipping_jan_3_rd_2020\n \n , \n cast(null as \n numeric\n) as \n \n property_shipping_interval_frequency\n \n , \n cast(null as \n string\n) as \n \n property_shipping_interval_unit_type\n \n , \n cast(null as \n numeric\n) as \n \n property_subscription_id\n \n , \n cast(null as \n numeric\n) as \n \n quantity\n \n , \n cast(null as boolean) as is_requiring_shipping , \n cast(null as \n string\n) as \n \n sku\n \n , \n cast(null as boolean) as is_taxable , \n cast(null as \n string\n) as \n \n title\n \n , \n cast(null as \n float64\n) as \n \n total_discount\n \n , \n cast(null as \n numeric\n) as \n \n variant_id\n \n , \n cast(null as \n string\n) as \n \n vendor\n \n \n\n\n\n --The below script allows for pass through columns.\n \n\n \n\n\n, cast('' as \n string\n) as source_relation\n\n\n\n\n from source\n\n)\n\nselect * from renamed", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__order_line`"}, "model.shopify_source.stg_shopify__refund": {"raw_sql": "--To disable this model, set the shopify__using_refund variable within your dbt_project.yml file to False.\n{{ config(enabled=var('shopify__using_refund', True)) }}\n\nwith source as (\n\n select * \n from {{ ref('stg_shopify__refund_tmp') }}\n\n),\n\nrenamed as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_shopify__refund_tmp')),\n staging_columns=get_refund_columns()\n )\n }}\n\n {{ fivetran_utils.source_relation(\n union_schema_variable='shopify_union_schemas', \n union_database_variable='shopify_union_databases') \n }}\n \n from source\n)\n\nselect * from renamed", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.shopify_source.get_refund_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.source_relation"], "nodes": ["model.shopify_source.stg_shopify__refund_tmp", "model.shopify_source.stg_shopify__refund_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_stg_shopify", "fqn": ["shopify_source", "stg_shopify__refund"], "unique_id": "model.shopify_source.stg_shopify__refund", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "stg_shopify__refund.sql", "original_file_path": "models/stg_shopify__refund.sql", "name": "stg_shopify__refund", "alias": "stg_shopify__refund", "checksum": {"name": "sha256", "checksum": "db92848ca19e65385f44b51e662bc9a3c773fecefe896cbddd1f23d22d078e82"}, "tags": [], "refs": [["stg_shopify__refund_tmp"], ["stg_shopify__refund_tmp"]], "sources": [], "metrics": [], "description": "Each record represents a refund within Shopify.", "columns": {"refund_id": {"name": "refund_id", "description": "The unique numeric identifier for the refund.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "Timestamp of the date when the refund was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "processed_at": {"name": "processed_at", "description": "Timestamp of the date when the refund was processed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "note": {"name": "note", "description": "User generated note attached to the refund.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "restock": {"name": "restock", "description": "Boolean indicating if the refund is a result of a restock.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "user_id": {"name": "user_id", "description": "Reference to the user id which generated the refund.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_duties_set": {"name": "total_duties_set", "description": "Record representing total duties set for the refund.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_id": {"name": "order_id", "description": "Reference to the order which the refund is associated.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify_source://models/stg_shopify.yml", "compiled_path": "target/compiled/shopify_source/models/stg_shopify__refund.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify", "materialized": "table", "enabled": true}, "created_at": 1665702405.034945, "compiled_sql": "--To disable this model, set the shopify__using_refund variable within your dbt_project.yml file to False.\n\n\nwith source as (\n\n select * \n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__refund_tmp`\n\n),\n\nrenamed as (\n\n select\n \n cast(null as \n timestamp\n) as \n \n _fivetran_synced\n \n , \n cast(null as \n timestamp\n) as \n \n created_at\n \n , \n cast(null as \n numeric\n) as refund_id , \n cast(null as \n string\n) as \n \n note\n \n , \n cast(null as \n numeric\n) as \n \n order_id\n \n , \n cast(null as \n timestamp\n) as \n \n processed_at\n \n , \n cast(null as boolean) as \n \n restock\n \n , \n cast(null as \n numeric\n) as \n \n user_id\n \n \n\n\n\n \n\n\n, cast('' as \n string\n) as source_relation\n\n\n\n \n from source\n)\n\nselect * from renamed", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__refund`"}, "model.shopify_source.stg_shopify__product": {"raw_sql": "with source as (\n\n select * from {{ ref('stg_shopify__product_tmp') }}\n\n),\n\nrenamed as (\n\n select\n \n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_shopify__product_tmp')),\n staging_columns=get_product_columns()\n )\n }}\n\n --The below script allows for pass through columns.\n {% if var('product_pass_through_columns') %}\n ,\n {{ var('product_pass_through_columns') | join (\", \")}}\n\n {% endif %}\n\n {{ fivetran_utils.source_relation(\n union_schema_variable='shopify_union_schemas', \n union_database_variable='shopify_union_databases') \n }}\n\n from source\n\n)\n\nselect * from renamed", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.shopify_source.get_product_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.source_relation"], "nodes": ["model.shopify_source.stg_shopify__product_tmp", "model.shopify_source.stg_shopify__product_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_stg_shopify", "fqn": ["shopify_source", "stg_shopify__product"], "unique_id": "model.shopify_source.stg_shopify__product", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "stg_shopify__product.sql", "original_file_path": "models/stg_shopify__product.sql", "name": "stg_shopify__product", "alias": "stg_shopify__product", "checksum": {"name": "sha256", "checksum": "dd30ab5bbf28fc246f4d4625c8057bd05f59c9e8f115d8c72f301b22236b59eb"}, "tags": [], "refs": [["stg_shopify__product_tmp"], ["stg_shopify__product_tmp"]], "sources": [], "metrics": [], "description": "Each record represents a product in Shopify.", "columns": {"_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Whether the record has been deleted in the source system.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_timestamp": {"name": "created_timestamp", "description": "The date and time when the product was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "handle": {"name": "handle", "description": "A unique human-friendly string for the product. Automatically generated from the product's title.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "product_id": {"name": "product_id", "description": "An unsigned 64-bit integer that's used as a unique identifier for the product. Each id is unique across the Shopify system. No two products will have the same id, even if they're from different shops.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "product_type": {"name": "product_type", "description": "A categorization for the product used for filtering and searching products.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "published_timestamp": {"name": "published_timestamp", "description": "The date and time (ISO 8601 format) when the product was published. Can be set to null to unpublish the product from the Online Store channel.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "published_scope": {"name": "published_scope", "description": "Whether the product is published to the Point of Sale channel.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "title": {"name": "title", "description": "The name of the product.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_timestamp": {"name": "updated_timestamp", "description": "The date and time when the product was last modified.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "vendor": {"name": "vendor", "description": "The name of the product's vendor.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify_source://models/stg_shopify.yml", "compiled_path": "target/compiled/shopify_source/models/stg_shopify__product.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify", "materialized": "table"}, "created_at": 1665702405.0258079, "compiled_sql": "with source as (\n\n select * from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__product_tmp`\n\n),\n\nrenamed as (\n\n select\n \n \n cast(null as boolean) as \n \n _fivetran_deleted\n \n , \n cast(null as \n timestamp\n) as \n \n _fivetran_synced\n \n , \n cast(null as \n timestamp\n) as created_timestamp , \n cast(null as \n string\n) as \n \n handle\n \n , \n cast(null as \n numeric\n) as product_id , \n cast(null as \n string\n) as \n \n product_type\n \n , \n cast(null as \n timestamp\n) as published_timestamp , \n cast(null as \n string\n) as \n \n published_scope\n \n , \n cast(null as \n string\n) as \n \n title\n \n , \n cast(null as \n timestamp\n) as updated_timestamp , \n cast(null as \n string\n) as \n \n vendor\n \n \n\n\n\n --The below script allows for pass through columns.\n \n\n \n\n\n, cast('' as \n string\n) as source_relation\n\n\n\n\n from source\n\n)\n\nselect * from renamed", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__product`"}, "model.shopify_source.stg_shopify__product_variant": {"raw_sql": "with source as (\n\n select * from {{ ref('stg_shopify__product_variant_tmp') }}\n\n),\n\nrenamed as (\n\n select\n \n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_shopify__product_variant_tmp')),\n staging_columns=get_product_variant_columns()\n )\n }}\n\n --The below script allows for pass through columns.\n {% if var('product_variant_pass_through_columns') %}\n ,\n {{ var('product_variant_pass_through_columns') | join (\", \")}}\n\n {% endif %}\n\n {{ fivetran_utils.source_relation(\n union_schema_variable='shopify_union_schemas', \n union_database_variable='shopify_union_databases') \n }}\n\n from source\n\n)\n\nselect * from renamed", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.shopify_source.get_product_variant_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.source_relation"], "nodes": ["model.shopify_source.stg_shopify__product_variant_tmp", "model.shopify_source.stg_shopify__product_variant_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_stg_shopify", "fqn": ["shopify_source", "stg_shopify__product_variant"], "unique_id": "model.shopify_source.stg_shopify__product_variant", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "stg_shopify__product_variant.sql", "original_file_path": "models/stg_shopify__product_variant.sql", "name": "stg_shopify__product_variant", "alias": "stg_shopify__product_variant", "checksum": {"name": "sha256", "checksum": "6d09962a9153df0f1b3220ecfe3ecd87997d5e5b87187a985a7c25006ca8b229"}, "tags": [], "refs": [["stg_shopify__product_variant_tmp"], ["stg_shopify__product_variant_tmp"]], "sources": [], "metrics": [], "description": "Each record represents a product variant in Shopify", "columns": {"barcode": {"name": "barcode", "description": "The barcode, UPC, or ISBN number for the product.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "compare_at_price": {"name": "compare_at_price", "description": "The original price of the item before an adjustment or a sale.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_timestamp": {"name": "created_timestamp", "description": "The date and time (ISO 8601 format) when the product variant was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "fulfillment_service": {"name": "fulfillment_service", "description": "The fulfillment service associated with the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "grams": {"name": "grams", "description": "The weight of the product variant in grams.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_id": {"name": "variant_id", "description": "The unique numeric identifier for the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "image_id": {"name": "image_id", "description": "The unique numeric identifier for a product's image. The image must be associated to the same product as the variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "inventory_item_id": {"name": "inventory_item_id", "description": "The unique identifier for the inventory item, which is used in the Inventory API to query for inventory information.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "inventory_management": {"name": "inventory_management", "description": "The fulfillment service that tracks the number of items in stock for the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "inventory_policy": {"name": "inventory_policy", "description": "Whether customers are allowed to place an order for the product variant when it's out of stock.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "inventory_quantity": {"name": "inventory_quantity", "description": "An aggregate of inventory across all locations. To adjust inventory at a specific location, use the InventoryLevel resource.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "old_inventory_quantity": {"name": "old_inventory_quantity", "description": "This property is deprecated. Use the InventoryLevel resource instead.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "option_1": {"name": "option_1", "description": "The custom properties that a shop owner uses to define product variants. You can define three options for a product variant: option1, option2, option3.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "option_2": {"name": "option_2", "description": "The custom properties that a shop owner uses to define product variants. You can define three options for a product variant: option1, option2, option3.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "option_3": {"name": "option_3", "description": "The custom properties that a shop owner uses to define product variants. You can define three options for a product variant: option1, option2, option3.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "position": {"name": "position", "description": "The order of the product variant in the list of product variants. The first position in the list is 1. The position of variants is indicated by the order in which they are listed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "price": {"name": "price", "description": "The price of the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "product_id": {"name": "product_id", "description": "The unique numeric identifier for the product.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_requiring_shipping": {"name": "is_requiring_shipping", "description": "This property is deprecated. Use the `requires_shipping` property on the InventoryItem resource instead.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "sku": {"name": "sku", "description": "A unique identifier for the product variant in the shop. Required in order to connect to a FulfillmentService.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_taxable": {"name": "is_taxable", "description": "Whether a tax is charged when the product variant is sold.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tax_code": {"name": "tax_code", "description": "This parameter applies only to the stores that have the Avalara AvaTax app installed. Specifies the Avalara tax code for the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "title": {"name": "title", "description": "The title of the product variant. The title field is a concatenation of the option1, option2, and option3 fields. You can only update title indirectly using the option fields.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_timestamp": {"name": "updated_timestamp", "description": "The date and time when the product variant was last modified. Gets returned in ISO 8601 format.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "weight": {"name": "weight", "description": "The weight of the product variant in the unit system specified with weight_unit.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "weight_unit": {"name": "weight_unit", "description": "The unit of measurement that applies to the product variant's weight. If you don't specify a value for weight_unit, then the shop's default unit of measurement is applied. Valid values: g, kg, oz, and lb.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify_source://models/stg_shopify.yml", "compiled_path": "target/compiled/shopify_source/models/stg_shopify__product_variant.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify", "materialized": "table"}, "created_at": 1665702405.02949, "compiled_sql": "with source as (\n\n select * from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__product_variant_tmp`\n\n),\n\nrenamed as (\n\n select\n \n \n cast(null as \n numeric\n) as variant_id , \n cast(null as \n timestamp\n) as \n \n _fivetran_synced\n \n , \n cast(null as \n timestamp\n) as created_timestamp , \n cast(null as \n timestamp\n) as updated_timestamp , \n cast(null as \n numeric\n) as \n \n product_id\n \n , \n cast(null as \n numeric\n) as \n \n inventory_item_id\n \n , \n cast(null as \n numeric\n) as \n \n image_id\n \n , \n cast(null as \n string\n) as \n \n title\n \n , \n cast(null as \n float64\n) as \n \n price\n \n , \n cast(null as \n string\n) as \n \n sku\n \n , \n cast(null as \n numeric\n) as \n \n position\n \n , \n cast(null as \n string\n) as \n \n inventory_policy\n \n , \n cast(null as \n float64\n) as \n \n compare_at_price\n \n , \n cast(null as \n string\n) as \n \n fulfillment_service\n \n , \n cast(null as \n string\n) as \n \n inventory_management\n \n , \n cast(null as boolean) as is_taxable , \n cast(null as \n string\n) as \n \n barcode\n \n , \n cast(null as \n float64\n) as \n \n grams\n \n , \n cast(null as \n numeric\n) as \n \n inventory_quantity\n \n , \n cast(null as \n float64\n) as \n \n weight\n \n , \n cast(null as \n string\n) as \n \n weight_unit\n \n , \n cast(null as \n string\n) as \n \n option_1\n \n , \n cast(null as \n string\n) as \n \n option_2\n \n , \n cast(null as \n string\n) as \n \n option_3\n \n , \n cast(null as \n string\n) as \n \n tax_code\n \n , \n cast(null as \n numeric\n) as \n \n old_inventory_quantity\n \n , \n cast(null as boolean) as is_requiring_shipping \n\n\n\n --The below script allows for pass through columns.\n \n\n \n\n\n, cast('' as \n string\n) as source_relation\n\n\n\n\n from source\n\n)\n\nselect * from renamed", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__product_variant`"}, "model.shopify_source.stg_shopify__order": {"raw_sql": "with source as (\n\n select * from {{ ref('stg_shopify__order_tmp') }}\n\n),\n\nrenamed as (\n\n select\n \n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_shopify__order_tmp')),\n staging_columns=get_order_columns()\n )\n }}\n\n --The below script allows for pass through columns.\n {% if var('order_pass_through_columns') %}\n ,\n {{ var('order_pass_through_columns') | join (\", \")}}\n\n {% endif %}\n\n {{ fivetran_utils.source_relation(\n union_schema_variable='shopify_union_schemas', \n union_database_variable='shopify_union_databases') \n }}\n\n from source\n\n)\n\nselect * from renamed", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.shopify_source.get_order_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.source_relation"], "nodes": ["model.shopify_source.stg_shopify__order_tmp", "model.shopify_source.stg_shopify__order_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_stg_shopify", "fqn": ["shopify_source", "stg_shopify__order"], "unique_id": "model.shopify_source.stg_shopify__order", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "stg_shopify__order.sql", "original_file_path": "models/stg_shopify__order.sql", "name": "stg_shopify__order", "alias": "stg_shopify__order", "checksum": {"name": "sha256", "checksum": "a4b7cdee44f261fe11e487f1022c1f7bd57196220a453bff382c1876ee5a2192"}, "tags": [], "refs": [["stg_shopify__order_tmp"], ["stg_shopify__order_tmp"]], "sources": [], "metrics": [], "description": "Each record represents an order in Shopify.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "app_id": {"name": "app_id", "description": "The ID of the app that created the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_address_1": {"name": "billing_address_address_1", "description": "The street address of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_address_2": {"name": "billing_address_address_2", "description": "An optional additional field for the street address of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_city": {"name": "billing_address_city", "description": "The city, town, or village of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_company": {"name": "billing_address_company", "description": "The company of the person associated with the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_country": {"name": "billing_address_country", "description": "The name of the country of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_country_code": {"name": "billing_address_country_code", "description": "The two-letter code (ISO 3166-1 format) for the country of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_first_name": {"name": "billing_address_first_name", "description": "The first name of the person associated with the payment method.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_last_name": {"name": "billing_address_last_name", "description": "The last name of the person associated with the payment method.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_latitude": {"name": "billing_address_latitude", "description": "The latitude of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_longitude": {"name": "billing_address_longitude", "description": "The longitude of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_name": {"name": "billing_address_name", "description": "The full name of the person associated with the payment method.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_phone": {"name": "billing_address_phone", "description": "The phone number at the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_province": {"name": "billing_address_province", "description": "The name of the region (province, state, prefecture, \u2026) of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_province_code": {"name": "billing_address_province_code", "description": "The two-letter abbreviation of the region of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_zip": {"name": "billing_address_zip", "description": "The postal code (zip, postcode, Eircode, \u2026) of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "browser_ip": {"name": "browser_ip", "description": "The IP address of the browser used by the customer when they placed the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "has_buyer_accepted_marketing": {"name": "has_buyer_accepted_marketing", "description": "Whether the customer consented to receive email updates from the shop.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "cancel_reason": {"name": "cancel_reason", "description": "The reason why the order was canceled.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "cancelled_timestamp": {"name": "cancelled_timestamp", "description": "The date and time when the order was canceled.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "cart_token": {"name": "cart_token", "description": "The ID of the cart that's associated with the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "closed_timestamp": {"name": "closed_timestamp", "description": "The date and time when the order was closed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_timestamp": {"name": "created_timestamp", "description": "The autogenerated date and time when the order was created in Shopify.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "The three-letter code for the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "customer_id": {"name": "customer_id", "description": "The ID of the order's customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email": {"name": "email", "description": "The customer's email address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "financial_status": {"name": "financial_status", "description": "The status of payments associated with the order. Can only be set when the order is created", "meta": {}, "data_type": null, "quote": null, "tags": []}, "fulfillment_status": {"name": "fulfillment_status", "description": "The order's status in terms of fulfilled line items.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_id": {"name": "order_id", "description": "The ID of the order, used for API purposes. This is different from the order_number property, which is the ID used by the shop owner and customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "landing_site_base_url": {"name": "landing_site_base_url", "description": "The URL for the page where the buyer landed when they entered the shop.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "location_id": {"name": "location_id", "description": "The ID of the physical location where the order was processed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "name": {"name": "name", "description": "The order name, generated by combining the order_number property with the order prefix and suffix that are set in the merchant's general settings.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "note": {"name": "note", "description": "An optional note that a shop owner can attach to the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "number": {"name": "number", "description": "The order's position in the shop's count of orders. Numbers are sequential and start at 1.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_number": {"name": "order_number", "description": "The order 's position in the shop's count of orders starting at 1001. Order numbers are sequential and start at 1001.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "processed_timestamp": {"name": "processed_timestamp", "description": "The date and time when an order was processed. This value is the date that appears on your orders and that's used in the analytic reports.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "processing_method": {"name": "processing_method", "description": "How the payment was processed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "referring_site": {"name": "referring_site", "description": "The website where the customer clicked a link to the shop.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_address_1": {"name": "shipping_address_address_1", "description": "The street address of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_address_2": {"name": "shipping_address_address_2", "description": "An optional additional field for the street address of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_city": {"name": "shipping_address_city", "description": "The city, town, or village of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_company": {"name": "shipping_address_company", "description": "The company of the person associated with the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_country": {"name": "shipping_address_country", "description": "The name of the country of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_country_code": {"name": "shipping_address_country_code", "description": "The two-letter code (ISO 3166-1 format) for the country of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_first_name": {"name": "shipping_address_first_name", "description": "The first name of the person associated with the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_last_name": {"name": "shipping_address_last_name", "description": "The last name of the person associated with the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_latitude": {"name": "shipping_address_latitude", "description": "The latitude of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_longitude": {"name": "shipping_address_longitude", "description": "The longitude of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_name": {"name": "shipping_address_name", "description": "The full name of the person associated with the payment method.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_phone": {"name": "shipping_address_phone", "description": "The phone number at the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_province": {"name": "shipping_address_province", "description": "The name of the region (province, state, prefecture, \u2026) of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_province_code": {"name": "shipping_address_province_code", "description": "The two-letter abbreviation of the region of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_zip": {"name": "shipping_address_zip", "description": "The postal code (zip, postcode, Eircode, \u2026) of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_name": {"name": "source_name", "description": "Where the order originated. Can be set only during order creation, and is not writeable afterwards.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "subtotal_price": {"name": "subtotal_price", "description": "The price of the order in the shop currency after discounts but before shipping, taxes, and tips.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "has_taxes_included": {"name": "has_taxes_included", "description": "Whether taxes are included in the order subtotal.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_test_order": {"name": "is_test_order", "description": "Whether this is a test order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "token": {"name": "token", "description": "A unique token for the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_discounts": {"name": "total_discounts", "description": "The total discounts applied to the price of the order in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_line_items_price": {"name": "total_line_items_price", "description": "The sum of all line item prices in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_price": {"name": "total_price", "description": "The sum of all line item prices, discounts, shipping, taxes, and tips in the shop currency. Must be positive.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_tax": {"name": "total_tax", "description": "The sum of all the taxes applied to the order in th shop currency. Must be positive).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_weight": {"name": "total_weight", "description": "The sum of all line item weights in grams.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_timestamp": {"name": "updated_timestamp", "description": "The date and time (ISO 8601 format) when the order was last modified.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "user_id": {"name": "user_id", "description": "The ID of the user logged into Shopify POS who processed the order, if applicable.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_shipping_price_set": {"name": "total_shipping_price_set", "description": "The total shipping price set for the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "index": {"name": "index", "description": "The index associated with the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "pre_tax_price": {"name": "pre_tax_price", "description": "The total pre tax price of the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify_source://models/stg_shopify.yml", "compiled_path": "target/compiled/shopify_source/models/stg_shopify__order.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify", "materialized": "table"}, "created_at": 1665702405.024142, "compiled_sql": "with source as (\n\n select * from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__order_tmp`\n\n),\n\nrenamed as (\n\n select\n \n \n cast(null as \n numeric\n) as order_id , \n cast(null as \n timestamp\n) as processed_timestamp , \n cast(null as \n timestamp\n) as updated_timestamp , \n cast(null as \n numeric\n) as \n \n user_id\n \n , \n cast(null as \n float64\n) as \n \n total_discounts\n \n , \n cast(null as \n float64\n) as \n \n total_line_items_price\n \n , \n cast(null as \n float64\n) as \n \n total_price\n \n , \n cast(null as \n float64\n) as \n \n total_tax\n \n , \n cast(null as \n string\n) as \n \n source_name\n \n , \n cast(null as \n float64\n) as \n \n subtotal_price\n \n , \n cast(null as boolean) as has_taxes_included , \n cast(null as \n numeric\n) as \n \n total_weight\n \n , \n cast(null as \n string\n) as \n \n landing_site_base_url\n \n , \n cast(null as \n numeric\n) as \n \n location_id\n \n , \n cast(null as \n string\n) as \n \n name\n \n , \n cast(null as \n string\n) as \n \n note\n \n , \n cast(null as \n numeric\n) as \n \n number\n \n , \n cast(null as \n numeric\n) as \n \n order_number\n \n , \n cast(null as \n string\n) as \n \n cancel_reason\n \n , \n cast(null as \n timestamp\n) as cancelled_timestamp , \n cast(null as \n string\n) as \n \n cart_token\n \n , \n cast(null as \n string\n) as \n \n checkout_token\n \n , \n cast(null as \n timestamp\n) as closed_timestamp , \n cast(null as \n timestamp\n) as created_timestamp , \n cast(null as \n string\n) as \n \n currency\n \n , \n cast(null as \n numeric\n) as \n \n customer_id\n \n , \n cast(null as \n string\n) as \n \n email\n \n , \n cast(null as \n string\n) as \n \n financial_status\n \n , \n cast(null as \n string\n) as \n \n fulfillment_status\n \n , \n cast(null as \n string\n) as \n \n processing_method\n \n , \n cast(null as \n string\n) as \n \n referring_site\n \n , \n cast(null as \n string\n) as \n \n billing_address_address_1\n \n , \n cast(null as \n string\n) as \n \n billing_address_address_2\n \n , \n cast(null as \n string\n) as \n \n billing_address_city\n \n , \n cast(null as \n string\n) as \n \n billing_address_company\n \n , \n cast(null as \n string\n) as \n \n billing_address_country\n \n , \n cast(null as \n string\n) as \n \n billing_address_country_code\n \n , \n cast(null as \n string\n) as \n \n billing_address_first_name\n \n , \n cast(null as \n string\n) as \n \n billing_address_last_name\n \n , \n cast(null as \n string\n) as \n \n billing_address_latitude\n \n , \n cast(null as \n string\n) as \n \n billing_address_longitude\n \n , \n cast(null as \n string\n) as \n \n billing_address_name\n \n , \n cast(null as \n string\n) as \n \n billing_address_phone\n \n , \n cast(null as \n string\n) as \n \n billing_address_province\n \n , \n cast(null as \n string\n) as \n \n billing_address_province_code\n \n , \n cast(null as \n string\n) as \n \n billing_address_zip\n \n , \n cast(null as \n string\n) as \n \n browser_ip\n \n , \n cast(null as boolean) as has_buyer_accepted_marketing , \n cast(null as \n string\n) as \n \n total_shipping_price_set\n \n , \n cast(null as \n string\n) as \n \n shipping_address_address_1\n \n , \n cast(null as \n string\n) as \n \n shipping_address_address_2\n \n , \n cast(null as \n string\n) as \n \n shipping_address_city\n \n , \n cast(null as \n string\n) as \n \n shipping_address_company\n \n , \n cast(null as \n string\n) as \n \n shipping_address_country\n \n , \n cast(null as \n string\n) as \n \n shipping_address_country_code\n \n , \n cast(null as \n string\n) as \n \n shipping_address_first_name\n \n , \n cast(null as \n string\n) as \n \n shipping_address_last_name\n \n , \n cast(null as \n string\n) as \n \n shipping_address_latitude\n \n , \n cast(null as \n string\n) as \n \n shipping_address_longitude\n \n , \n cast(null as \n string\n) as \n \n shipping_address_name\n \n , \n cast(null as \n string\n) as \n \n shipping_address_phone\n \n , \n cast(null as \n string\n) as \n \n shipping_address_province\n \n , \n cast(null as \n string\n) as \n \n shipping_address_province_code\n \n , \n cast(null as \n string\n) as \n \n shipping_address_zip\n \n , \n cast(null as boolean) as is_test_order , \n cast(null as \n string\n) as \n \n token\n \n , \n cast(null as \n timestamp\n) as \n \n _fivetran_synced\n \n \n\n\n\n --The below script allows for pass through columns.\n \n\n \n\n\n, cast('' as \n string\n) as source_relation\n\n\n\n\n from source\n\n)\n\nselect * from renamed", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__order`"}, "model.shopify_source.stg_shopify__transaction": {"raw_sql": "with source as (\n\n select * from {{ ref('stg_shopify__transaction_tmp') }}\n\n),\n\nrenamed as (\n\n select\n\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_shopify__transaction_tmp')),\n staging_columns=get_transaction_columns()\n )\n }}\n\n --The below script allows for pass through columns.\n {% if var('transaction_pass_through_columns') %}\n ,\n {{ var('transaction_pass_through_columns') | join (\", \")}}\n\n {% endif %}\n\n {{ fivetran_utils.source_relation(\n union_schema_variable='shopify_union_schemas', \n union_database_variable='shopify_union_databases') \n }}\n\n from source\n where not test\n\n)\n\nselect * from renamed", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.shopify_source.get_transaction_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.source_relation"], "nodes": ["model.shopify_source.stg_shopify__transaction_tmp", "model.shopify_source.stg_shopify__transaction_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_stg_shopify", "fqn": ["shopify_source", "stg_shopify__transaction"], "unique_id": "model.shopify_source.stg_shopify__transaction", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "stg_shopify__transaction.sql", "original_file_path": "models/stg_shopify__transaction.sql", "name": "stg_shopify__transaction", "alias": "stg_shopify__transaction", "checksum": {"name": "sha256", "checksum": "b837eb0c1661d2817ccb6a1c3123e7d146dbbd9a63ea1fe0ad52ba8a1742ecbe"}, "tags": [], "refs": [["stg_shopify__transaction_tmp"], ["stg_shopify__transaction_tmp"]], "sources": [], "metrics": [], "description": "Each record represents a transaction in Shopify.", "columns": {"transaction_id": {"name": "transaction_id", "description": "The ID for the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_id": {"name": "order_id", "description": "The ID for the order that the transaction is associated with.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refund_id": {"name": "refund_id", "description": "The ID associated with a refund in the refund table.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "amount": {"name": "amount", "description": "The amount of money included in the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "authorization": {"name": "authorization", "description": "The authorization code associated with the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_timestamp": {"name": "created_timestamp", "description": "The date and time when the transaction was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "processed_timestamp": {"name": "processed_timestamp", "description": "The date and time when a transaction was processed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "device_id": {"name": "device_id", "description": "The ID for the device.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "gateway": {"name": "gateway", "description": "The name of the gateway the transaction was issued through.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_name": {"name": "source_name", "description": "The origin of the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "message": {"name": "message", "description": "A string generated by the payment provider with additional information about why the transaction succeeded or failed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "The three-letter code (ISO 4217 format) for the currency used for the payment.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "location_id": {"name": "location_id", "description": "The ID of the physical location where the transaction was processed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "parent_id": {"name": "parent_id", "description": "The ID of an associated transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payment_avs_result_code": {"name": "payment_avs_result_code", "description": "The response code from the address verification system.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payment_credit_card_bin": {"name": "payment_credit_card_bin", "description": "The issuer identification number (IIN), formerly known as bank identification number (BIN) of the customer's credit card.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payment_cvv_result_code": {"name": "payment_cvv_result_code", "description": "The response code from the credit card company indicating whether the customer entered the card security code, or card verification value, correctly.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payment_credit_card_number": {"name": "payment_credit_card_number", "description": "The customer's credit card number, with most of the leading digits redacted.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payment_credit_card_company": {"name": "payment_credit_card_company", "description": "The name of the company that issued the customer's credit card.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "kind": {"name": "kind", "description": "The transaction's type.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "receipt": {"name": "receipt", "description": "A transaction receipt attached to the transaction by the gateway.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency_exchange_id": {"name": "currency_exchange_id", "description": "The ID of the adjustment.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency_exchange_adjustment": {"name": "currency_exchange_adjustment", "description": "The difference between the amounts on the associated transaction and the parent transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency_exchange_original_amount": {"name": "currency_exchange_original_amount", "description": "The amount of the parent transaction in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency_exchange_final_amount": {"name": "currency_exchange_final_amount", "description": "The amount of the associated transaction in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency_exchange_currency": {"name": "currency_exchange_currency", "description": "The shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "error_code": {"name": "error_code", "description": "A standardized error code, independent of the payment provider.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status": {"name": "status", "description": "The status of the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "test": {"name": "test", "description": "Whether the transaction is a test transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "user_id": {"name": "user_id", "description": "The ID for the user who was logged into the Shopify POS device when the order was processed, if applicable.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify_source://models/stg_shopify.yml", "compiled_path": "target/compiled/shopify_source/models/stg_shopify__transaction.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify", "materialized": "table"}, "created_at": 1665702405.033545, "compiled_sql": "with source as (\n\n select * from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__transaction_tmp`\n\n),\n\nrenamed as (\n\n select\n\n \n cast(null as \n numeric\n) as transaction_id , \n cast(null as \n numeric\n) as \n \n order_id\n \n , \n cast(null as \n numeric\n) as \n \n refund_id\n \n , \n cast(null as \n numeric\n) as \n \n amount\n \n , \n cast(null as \n timestamp\n) as created_timestamp , \n cast(null as \n timestamp\n) as processed_timestamp , \n cast(null as \n numeric\n) as \n \n device_id\n \n , \n cast(null as \n string\n) as \n \n gateway\n \n , \n cast(null as \n string\n) as \n \n source_name\n \n , \n cast(null as \n string\n) as \n \n message\n \n , \n cast(null as \n string\n) as \n \n currency\n \n , \n cast(null as \n numeric\n) as \n \n location_id\n \n , \n cast(null as \n numeric\n) as \n \n parent_id\n \n , \n cast(null as \n string\n) as \n \n payment_avs_result_code\n \n , \n cast(null as \n string\n) as \n \n payment_credit_card_bin\n \n , \n cast(null as \n string\n) as \n \n payment_cvv_result_code\n \n , \n cast(null as \n string\n) as \n \n payment_credit_card_number\n \n , \n cast(null as \n string\n) as \n \n payment_credit_card_company\n \n , \n cast(null as \n string\n) as \n \n kind\n \n , \n cast(null as \n string\n) as \n \n receipt\n \n , \n cast(null as \n numeric\n) as \n \n currency_exchange_id\n \n , \n cast(null as \n numeric\n) as \n \n currency_exchange_adjustment\n \n , \n cast(null as \n numeric\n) as \n \n currency_exchange_original_amount\n \n , \n cast(null as \n numeric\n) as \n \n currency_exchange_final_amount\n \n , \n cast(null as \n string\n) as \n \n currency_exchange_currency\n \n , \n cast(null as \n string\n) as \n \n error_code\n \n , \n cast(null as \n string\n) as \n \n status\n \n , \n cast(null as boolean) as \n \n test\n \n , \n cast(null as \n numeric\n) as \n \n user_id\n \n , \n cast(null as \n timestamp\n) as \n \n _fivetran_synced\n \n \n\n\n\n --The below script allows for pass through columns.\n \n\n \n\n\n, cast('' as \n string\n) as source_relation\n\n\n\n\n from source\n where not test\n\n)\n\nselect * from renamed", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__transaction`"}, "model.shopify_source.stg_shopify__order_adjustment": {"raw_sql": "--To disable this model, set the shopify__using_order_adjustment variable within your dbt_project.yml file to False.\n{{ config(enabled=var('shopify__using_order_adjustment', True)) }}\n\nwith source as (\n\n select * \n from {{ ref('stg_shopify__order_adjustment_tmp') }}\n\n),\n\nrenamed as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_shopify__order_adjustment_tmp')),\n staging_columns=get_order_adjustment_columns()\n )\n }}\n\n {{ fivetran_utils.source_relation(\n union_schema_variable='shopify_union_schemas', \n union_database_variable='shopify_union_databases') \n }}\n \n from source\n)\n\nselect * from renamed", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.shopify_source.get_order_adjustment_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.source_relation"], "nodes": ["model.shopify_source.stg_shopify__order_adjustment_tmp", "model.shopify_source.stg_shopify__order_adjustment_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_stg_shopify", "fqn": ["shopify_source", "stg_shopify__order_adjustment"], "unique_id": "model.shopify_source.stg_shopify__order_adjustment", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "stg_shopify__order_adjustment.sql", "original_file_path": "models/stg_shopify__order_adjustment.sql", "name": "stg_shopify__order_adjustment", "alias": "stg_shopify__order_adjustment", "checksum": {"name": "sha256", "checksum": "b494a4c88cf235fb0b11c020d004bcf0904e9d1ae235144330d3d24b37ad4318"}, "tags": [], "refs": [["stg_shopify__order_adjustment_tmp"], ["stg_shopify__order_adjustment_tmp"]], "sources": [], "metrics": [], "description": "Each record represents and adjustment to and order within Shopify.", "columns": {"order_adjustment_id": {"name": "order_adjustment_id", "description": "The unique numeric identifier for the order adjustment.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_id": {"name": "order_id", "description": "Reference to the order which the adjustment is associated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refund_id": {"name": "refund_id", "description": "Reference to the refund which the adjustment is associated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "amount": {"name": "amount", "description": "Amount of the adjustment.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tax_amount": {"name": "tax_amount", "description": "Tax amount applied to the order adjustment.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "kind": {"name": "kind", "description": "The kind of order adjustment (eg. refund, restock, etc.).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "reason": {"name": "reason", "description": "The reason for the order adjustment.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "amount_set": {"name": "amount_set", "description": "Amount set towards the order adjustment", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tax_amount_set": {"name": "tax_amount_set", "description": "Tax amount set towards the order adjustment.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify_source://models/stg_shopify.yml", "compiled_path": "target/compiled/shopify_source/models/stg_shopify__order_adjustment.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify", "materialized": "table", "enabled": true}, "created_at": 1665702405.036482, "compiled_sql": "--To disable this model, set the shopify__using_order_adjustment variable within your dbt_project.yml file to False.\n\n\nwith source as (\n\n select * \n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__order_adjustment_tmp`\n\n),\n\nrenamed as (\n\n select\n \n cast(null as \n numeric\n) as order_adjustment_id , \n cast(null as \n numeric\n) as \n \n order_id\n \n , \n cast(null as \n numeric\n) as \n \n refund_id\n \n , \n cast(null as \n float64\n) as \n \n amount\n \n , \n cast(null as \n float64\n) as \n \n tax_amount\n \n , \n cast(null as \n string\n) as \n \n kind\n \n , \n cast(null as \n string\n) as \n \n reason\n \n , \n cast(null as \n timestamp\n) as \n \n _fivetran_synced\n \n \n\n\n\n \n\n\n, cast('' as \n string\n) as source_relation\n\n\n\n \n from source\n)\n\nselect * from renamed", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__order_adjustment`"}, "model.shopify_source.stg_shopify__customer": {"raw_sql": "with source as (\n\n select * from {{ ref('stg_shopify__customer_tmp') }}\n\n),\n\nrenamed as (\n\n select\n \n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_shopify__customer_tmp')),\n staging_columns=get_customer_columns()\n )\n }}\n\n --The below script allows for pass through columns.\n {% if var('customer_pass_through_columns') %}\n ,\n {{ var('customer_pass_through_columns') | join (\", \")}}\n\n {% endif %}\n\n {{ fivetran_utils.source_relation(\n union_schema_variable='shopify_union_schemas', \n union_database_variable='shopify_union_databases') \n }}\n\n from source\n\n)\n\nselect * from renamed", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.shopify_source.get_customer_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.source_relation"], "nodes": ["model.shopify_source.stg_shopify__customer_tmp", "model.shopify_source.stg_shopify__customer_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_stg_shopify", "fqn": ["shopify_source", "stg_shopify__customer"], "unique_id": "model.shopify_source.stg_shopify__customer", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "stg_shopify__customer.sql", "original_file_path": "models/stg_shopify__customer.sql", "name": "stg_shopify__customer", "alias": "stg_shopify__customer", "checksum": {"name": "sha256", "checksum": "e43df3b376bae7b581cfb9514f59c82263bbba83447e9bd440a214e8c2dca709"}, "tags": [], "refs": [["stg_shopify__customer_tmp"], ["stg_shopify__customer_tmp"]], "sources": [], "metrics": [], "description": "Each record represents a customer in Shopify.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "has_accepted_marketing": {"name": "has_accepted_marketing", "description": "Whether the customer has consented to receive marketing material via email.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_timestamp": {"name": "created_timestamp", "description": "The date and time when the customer was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "default_address_id": {"name": "default_address_id", "description": "The default address for the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email": {"name": "email", "description": "The unique email address of the customer. Attempting to assign the same email address to multiple customers returns an error.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_name": {"name": "first_name", "description": "The customer's first name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "customer_id": {"name": "customer_id", "description": "A unique identifier for the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_name": {"name": "last_name", "description": "The customer's last name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "orders_count": {"name": "orders_count", "description": "The number of orders associated with this customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "phone": {"name": "phone", "description": "The unique phone number (E.164 format) for this customer. Attempting to assign the same phone number to multiple customers returns an error.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "account_state": {"name": "account_state", "description": "The state of the customer's account with a shop.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_tax_exempt": {"name": "is_tax_exempt", "description": "Whether the customer is exempt from paying taxes on their order. If true, then taxes won't be applied to an order at checkout. If false, then taxes will be applied at checkout.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_spent": {"name": "total_spent", "description": "The total amount of money that the customer has spent across their order history.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_timestamp": {"name": "updated_timestamp", "description": "The date and time when the customer information was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_verified_email": {"name": "is_verified_email", "description": "Whether the customer has verified their email address.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify_source://models/stg_shopify.yml", "compiled_path": "target/compiled/shopify_source/models/stg_shopify__customer.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify", "materialized": "table"}, "created_at": 1665702405.010729, "compiled_sql": "with source as (\n\n select * from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__customer_tmp`\n\n),\n\nrenamed as (\n\n select\n \n \n cast(null as \n timestamp\n) as \n \n _fivetran_synced\n \n , \n cast(null as boolean) as has_accepted_marketing , \n cast(null as \n timestamp\n) as created_timestamp , \n cast(null as \n numeric\n) as \n \n default_address_id\n \n , \n cast(null as \n string\n) as \n \n email\n \n , \n cast(null as \n string\n) as \n \n first_name\n \n , \n cast(null as \n numeric\n) as customer_id , \n cast(null as \n string\n) as \n \n last_name\n \n , \n cast(null as \n numeric\n) as \n \n orders_count\n \n , \n cast(null as \n string\n) as \n \n phone\n \n , \n cast(null as \n string\n) as account_state , \n cast(null as boolean) as is_tax_exempt , \n cast(null as \n float64\n) as \n \n total_spent\n \n , \n cast(null as \n timestamp\n) as updated_timestamp , \n cast(null as boolean) as is_verified_email \n\n\n\n --The below script allows for pass through columns.\n \n\n \n\n\n, cast('' as \n string\n) as source_relation\n\n\n\n\n from source\n\n)\n\nselect * from renamed", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__customer`"}, "model.shopify_source.stg_shopify__order_line_refund": {"raw_sql": "--To disable this model, set the shopify__using_order_line_refund variable within your dbt_project.yml file to False.\n{{ config(enabled=var('shopify__using_order_line_refund', True)) }}\n\nwith source as (\n\n select * from {{ ref('stg_shopify__order_line_refund_tmp') }}\n\n),\n\nrenamed as (\n\n select\n \n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_shopify__order_line_refund_tmp')),\n staging_columns=get_order_line_refund_columns()\n )\n }}\n\n --The below script allows for pass through columns.\n {% if var('order_line_refund_pass_through_columns') %}\n ,\n {{ var('order_line_refund_pass_through_columns') | join (\", \")}}\n\n {% endif %}\n\n {{ fivetran_utils.source_relation(\n union_schema_variable='shopify_union_schemas', \n union_database_variable='shopify_union_databases') \n }}\n\n from source\n\n)\n\nselect * from renamed", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.shopify_source.get_order_line_refund_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.source_relation"], "nodes": ["model.shopify_source.stg_shopify__order_line_refund_tmp", "model.shopify_source.stg_shopify__order_line_refund_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_stg_shopify", "fqn": ["shopify_source", "stg_shopify__order_line_refund"], "unique_id": "model.shopify_source.stg_shopify__order_line_refund", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "stg_shopify__order_line_refund.sql", "original_file_path": "models/stg_shopify__order_line_refund.sql", "name": "stg_shopify__order_line_refund", "alias": "stg_shopify__order_line_refund", "checksum": {"name": "sha256", "checksum": "0d7b02b07f95694dd5358ec919659f16bdccf708f906546b99f448355b1253cd"}, "tags": [], "refs": [["stg_shopify__order_line_refund_tmp"], ["stg_shopify__order_line_refund_tmp"]], "sources": [], "metrics": [], "description": "Each record represents a line item from an order in Shopify.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_line_refund_id": {"name": "order_line_refund_id", "description": "The unique identifier of the line item in the refund.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "location_id": {"name": "location_id", "description": "TThe unique identifier of the location where the items will be restockedBD", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_line_id": {"name": "order_line_id", "description": "The ID of the related line item in the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "quantity": {"name": "quantity", "description": "The quantity of the associated line item that was returned.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refund_id": {"name": "refund_id", "description": "The ID of the related refund.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "restock_type": {"name": "restock_type", "description": "How this refund line item affects inventory levels.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "subtotal": {"name": "subtotal", "description": "Subtotal amount of the order line refund", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_tax": {"name": "total_tax", "description": "The total tax applied to the refund.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify_source://models/stg_shopify.yml", "compiled_path": "target/compiled/shopify_source/models/stg_shopify__order_line_refund.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify", "materialized": "table", "enabled": true}, "created_at": 1665702405.012216, "compiled_sql": "--To disable this model, set the shopify__using_order_line_refund variable within your dbt_project.yml file to False.\n\n\nwith source as (\n\n select * from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__order_line_refund_tmp`\n\n),\n\nrenamed as (\n\n select\n \n \n cast(null as \n timestamp\n) as \n \n _fivetran_synced\n \n , \n cast(null as \n numeric\n) as order_line_refund_id , \n cast(null as \n numeric\n) as \n \n location_id\n \n , \n cast(null as \n numeric\n) as \n \n order_line_id\n \n , \n cast(null as \n numeric\n) as \n \n subtotal\n \n , \n cast(null as \n numeric\n) as \n \n total_tax\n \n , \n cast(null as \n float64\n) as \n \n quantity\n \n , \n cast(null as \n numeric\n) as \n \n refund_id\n \n , \n cast(null as \n string\n) as \n \n restock_type\n \n \n\n\n\n --The below script allows for pass through columns.\n \n\n \n\n\n, cast('' as \n string\n) as source_relation\n\n\n\n\n from source\n\n)\n\nselect * from renamed", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__order_line_refund`"}, "model.shopify_source.stg_shopify__customer_tmp": {"raw_sql": "{{\n fivetran_utils.union_data(\n table_identifier='customer', \n database_variable='shopify_database', \n schema_variable='shopify_schema', \n default_database=target.database,\n default_schema='shopify',\n default_variable='customer_source',\n union_schema_variable='shopify_union_schemas',\n union_database_variable='shopify_union_databases'\n )\n}}", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.union_data"], "nodes": ["seed.shopify_holistic_reporting_integration_tests.shopify_customer_data"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_stg_shopify", "fqn": ["shopify_source", "tmp", "stg_shopify__customer_tmp"], "unique_id": "model.shopify_source.stg_shopify__customer_tmp", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "tmp/stg_shopify__customer_tmp.sql", "original_file_path": "models/tmp/stg_shopify__customer_tmp.sql", "name": "stg_shopify__customer_tmp", "alias": "stg_shopify__customer_tmp", "checksum": {"name": "sha256", "checksum": "1f896e84164292f48db1c4eddfd6b3afef9ce4661ad2ab160c8721c8e620026c"}, "tags": [], "refs": [["shopify_customer_data"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/tmp/stg_shopify__customer_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify", "materialized": "view"}, "created_at": 1665702404.6792011, "compiled_sql": "\n\n\n\n select * \n from `dbt-package-testing`.`linkedin_integration_tests`.`shopify_customer_data`\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__customer_tmp`"}, "model.shopify_source.stg_shopify__order_line_tmp": {"raw_sql": "{{\n fivetran_utils.union_data(\n table_identifier='order_line', \n database_variable='shopify_database', \n schema_variable='shopify_schema', \n default_database=target.database,\n default_schema='shopify',\n default_variable='order_line_source',\n union_schema_variable='shopify_union_schemas',\n union_database_variable='shopify_union_databases'\n )\n}}", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.union_data"], "nodes": ["seed.shopify_holistic_reporting_integration_tests.shopify_order_line_data"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_stg_shopify", "fqn": ["shopify_source", "tmp", "stg_shopify__order_line_tmp"], "unique_id": "model.shopify_source.stg_shopify__order_line_tmp", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "tmp/stg_shopify__order_line_tmp.sql", "original_file_path": "models/tmp/stg_shopify__order_line_tmp.sql", "name": "stg_shopify__order_line_tmp", "alias": "stg_shopify__order_line_tmp", "checksum": {"name": "sha256", "checksum": "778359b2c17590b95d7b5709bfdd28b50d323b905e4277c74203416f08ee458e"}, "tags": [], "refs": [["shopify_order_line_data"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/tmp/stg_shopify__order_line_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify", "materialized": "view"}, "created_at": 1665702404.688013, "compiled_sql": "\n\n\n\n select * \n from `dbt-package-testing`.`linkedin_integration_tests`.`shopify_order_line_data`\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__order_line_tmp`"}, "model.shopify_source.stg_shopify__refund_tmp": {"raw_sql": "--To disable this model, set the shopify__using_refund variable within your dbt_project.yml file to False.\n{{ config(enabled=var('shopify__using_refund', True)) }}\n\n{{\n fivetran_utils.union_data(\n table_identifier='refund', \n database_variable='shopify_database', \n schema_variable='shopify_schema', \n default_database=target.database,\n default_schema='shopify',\n default_variable='refund_source',\n union_schema_variable='shopify_union_schemas',\n union_database_variable='shopify_union_databases'\n )\n}}", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.union_data"], "nodes": ["seed.shopify_holistic_reporting_integration_tests.shopify_refund_data"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_stg_shopify", "fqn": ["shopify_source", "tmp", "stg_shopify__refund_tmp"], "unique_id": "model.shopify_source.stg_shopify__refund_tmp", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "tmp/stg_shopify__refund_tmp.sql", "original_file_path": "models/tmp/stg_shopify__refund_tmp.sql", "name": "stg_shopify__refund_tmp", "alias": "stg_shopify__refund_tmp", "checksum": {"name": "sha256", "checksum": "2bcf1d64f126acc4d271984df2b6332286bf10a7345962f7037c391d8ecdbdbd"}, "tags": [], "refs": [["shopify_refund_data"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/tmp/stg_shopify__refund_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify", "materialized": "view", "enabled": true}, "created_at": 1665702404.691766, "compiled_sql": "--To disable this model, set the shopify__using_refund variable within your dbt_project.yml file to False.\n\n\n\n\n\n\n select * \n from `dbt-package-testing`.`linkedin_integration_tests`.`shopify_refund_data`\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__refund_tmp`"}, "model.shopify_source.stg_shopify__product_tmp": {"raw_sql": "{{\n fivetran_utils.union_data(\n table_identifier='product', \n database_variable='shopify_database', \n schema_variable='shopify_schema', \n default_database=target.database,\n default_schema='shopify',\n default_variable='product_source',\n union_schema_variable='shopify_union_schemas',\n union_database_variable='shopify_union_databases'\n )\n}}", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.union_data"], "nodes": ["seed.shopify_holistic_reporting_integration_tests.shopify_product_data"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_stg_shopify", "fqn": ["shopify_source", "tmp", "stg_shopify__product_tmp"], "unique_id": "model.shopify_source.stg_shopify__product_tmp", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "tmp/stg_shopify__product_tmp.sql", "original_file_path": "models/tmp/stg_shopify__product_tmp.sql", "name": "stg_shopify__product_tmp", "alias": "stg_shopify__product_tmp", "checksum": {"name": "sha256", "checksum": "4c88fa0dabe17fa99b7509af7b3518c844df1747e28e6c7ac4f0a8262424e91a"}, "tags": [], "refs": [["shopify_product_data"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/tmp/stg_shopify__product_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify", "materialized": "view"}, "created_at": 1665702404.695369, "compiled_sql": "\n\n\n\n select * \n from `dbt-package-testing`.`linkedin_integration_tests`.`shopify_product_data`\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__product_tmp`"}, "model.shopify_source.stg_shopify__order_adjustment_tmp": {"raw_sql": "--To disable this model, set the shopify__using_order_adjustment variable within your dbt_project.yml file to False.\n{{ config(enabled=var('shopify__using_order_adjustment', True)) }}\n\n{{\n fivetran_utils.union_data(\n table_identifier='order_adjustment', \n database_variable='shopify_database', \n schema_variable='shopify_schema', \n default_database=target.database,\n default_schema='shopify',\n default_variable='order_adjustment_source',\n union_schema_variable='shopify_union_schemas',\n union_database_variable='shopify_union_databases'\n )\n}}", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.union_data"], "nodes": ["seed.shopify_holistic_reporting_integration_tests.shopify_order_adjustment_data"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_stg_shopify", "fqn": ["shopify_source", "tmp", "stg_shopify__order_adjustment_tmp"], "unique_id": "model.shopify_source.stg_shopify__order_adjustment_tmp", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "tmp/stg_shopify__order_adjustment_tmp.sql", "original_file_path": "models/tmp/stg_shopify__order_adjustment_tmp.sql", "name": "stg_shopify__order_adjustment_tmp", "alias": "stg_shopify__order_adjustment_tmp", "checksum": {"name": "sha256", "checksum": "e3d5e7ba5a680437560ef21796b014718c45d20c52fbf4ac950d8eb687348d96"}, "tags": [], "refs": [["shopify_order_adjustment_data"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/tmp/stg_shopify__order_adjustment_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify", "materialized": "view", "enabled": true}, "created_at": 1665702404.69854, "compiled_sql": "--To disable this model, set the shopify__using_order_adjustment variable within your dbt_project.yml file to False.\n\n\n\n\n\n\n select * \n from `dbt-package-testing`.`linkedin_integration_tests`.`shopify_order_adjustment_data`\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__order_adjustment_tmp`"}, "model.shopify_source.stg_shopify__order_line_refund_tmp": {"raw_sql": "--To disable this model, set the shopify__using_order_line_refund variable within your dbt_project.yml file to False.\n{{ config(enabled=var('shopify__using_order_line_refund', True)) }}\n\n{{\n fivetran_utils.union_data(\n table_identifier='order_line_refund', \n database_variable='shopify_database', \n schema_variable='shopify_schema', \n default_database=target.database,\n default_schema='shopify',\n default_variable='order_line_refund_source',\n union_schema_variable='shopify_union_schemas',\n union_database_variable='shopify_union_databases'\n )\n}}", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.union_data"], "nodes": ["seed.shopify_holistic_reporting_integration_tests.shopify_order_line_refund_data"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_stg_shopify", "fqn": ["shopify_source", "tmp", "stg_shopify__order_line_refund_tmp"], "unique_id": "model.shopify_source.stg_shopify__order_line_refund_tmp", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "tmp/stg_shopify__order_line_refund_tmp.sql", "original_file_path": "models/tmp/stg_shopify__order_line_refund_tmp.sql", "name": "stg_shopify__order_line_refund_tmp", "alias": "stg_shopify__order_line_refund_tmp", "checksum": {"name": "sha256", "checksum": "33bb981405f33c32bbe9c2107a9ba93fd70b9e59578befc3c9e7f78a68c27eb2"}, "tags": [], "refs": [["shopify_order_line_refund_data"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/tmp/stg_shopify__order_line_refund_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify", "materialized": "view", "enabled": true}, "created_at": 1665702404.702008, "compiled_sql": "--To disable this model, set the shopify__using_order_line_refund variable within your dbt_project.yml file to False.\n\n\n\n\n\n\n select * \n from `dbt-package-testing`.`linkedin_integration_tests`.`shopify_order_line_refund_data`\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__order_line_refund_tmp`"}, "model.shopify_source.stg_shopify__transaction_tmp": {"raw_sql": "{{\n fivetran_utils.union_data(\n table_identifier='transaction', \n database_variable='shopify_database', \n schema_variable='shopify_schema', \n default_database=target.database,\n default_schema='shopify',\n default_variable='transaction_source',\n union_schema_variable='shopify_union_schemas',\n union_database_variable='shopify_union_databases'\n )\n}}", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.union_data"], "nodes": ["seed.shopify_holistic_reporting_integration_tests.shopify_transaction_data"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_stg_shopify", "fqn": ["shopify_source", "tmp", "stg_shopify__transaction_tmp"], "unique_id": "model.shopify_source.stg_shopify__transaction_tmp", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "tmp/stg_shopify__transaction_tmp.sql", "original_file_path": "models/tmp/stg_shopify__transaction_tmp.sql", "name": "stg_shopify__transaction_tmp", "alias": "stg_shopify__transaction_tmp", "checksum": {"name": "sha256", "checksum": "9a4cf0c7a2495c01fd10f0d88655aaffe63ef8b3cc94883e10507b034285f978"}, "tags": [], "refs": [["shopify_transaction_data"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/tmp/stg_shopify__transaction_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify", "materialized": "view"}, "created_at": 1665702404.705564, "compiled_sql": "\n\n\n\n select * \n from `dbt-package-testing`.`linkedin_integration_tests`.`shopify_transaction_data`\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__transaction_tmp`"}, "model.shopify_source.stg_shopify__product_variant_tmp": {"raw_sql": "{{\n fivetran_utils.union_data(\n table_identifier='product_variant', \n database_variable='shopify_database', \n schema_variable='shopify_schema', \n default_database=target.database,\n default_schema='shopify',\n default_variable='product_variant_source',\n union_schema_variable='shopify_union_schemas',\n union_database_variable='shopify_union_databases'\n )\n}}", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.union_data"], "nodes": ["seed.shopify_holistic_reporting_integration_tests.shopify_product_variant_data"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_stg_shopify", "fqn": ["shopify_source", "tmp", "stg_shopify__product_variant_tmp"], "unique_id": "model.shopify_source.stg_shopify__product_variant_tmp", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "tmp/stg_shopify__product_variant_tmp.sql", "original_file_path": "models/tmp/stg_shopify__product_variant_tmp.sql", "name": "stg_shopify__product_variant_tmp", "alias": "stg_shopify__product_variant_tmp", "checksum": {"name": "sha256", "checksum": "cbb9a84c332f17d90ad953536a449714fac6f77f871da604d43ffb846f6d5621"}, "tags": [], "refs": [["shopify_product_variant_data"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/tmp/stg_shopify__product_variant_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify", "materialized": "view"}, "created_at": 1665702404.7093241, "compiled_sql": "\n\n\n\n select * \n from `dbt-package-testing`.`linkedin_integration_tests`.`shopify_product_variant_data`\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__product_variant_tmp`"}, "model.shopify_source.stg_shopify__order_tmp": {"raw_sql": "{{\n fivetran_utils.union_data(\n table_identifier='order', \n database_variable='shopify_database', \n schema_variable='shopify_schema', \n default_database=target.database,\n default_schema='shopify',\n default_variable='order_source',\n union_schema_variable='shopify_union_schemas',\n union_database_variable='shopify_union_databases'\n )\n}}", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.union_data"], "nodes": ["seed.shopify_holistic_reporting_integration_tests.shopify_order_data"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_stg_shopify", "fqn": ["shopify_source", "tmp", "stg_shopify__order_tmp"], "unique_id": "model.shopify_source.stg_shopify__order_tmp", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "tmp/stg_shopify__order_tmp.sql", "original_file_path": "models/tmp/stg_shopify__order_tmp.sql", "name": "stg_shopify__order_tmp", "alias": "stg_shopify__order_tmp", "checksum": {"name": "sha256", "checksum": "f4fd2563557b13c2b54531a7fa9995e496aa1b39432d729a010ddcb7e10001ae"}, "tags": [], "refs": [["shopify_order_data"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/tmp/stg_shopify__order_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify", "materialized": "view"}, "created_at": 1665702404.712638, "compiled_sql": "\n\n\n\n select * \n from `dbt-package-testing`.`linkedin_integration_tests`.`shopify_order_data`\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__order_tmp`"}, "model.klaviyo_source.stg_klaviyo__person": {"raw_sql": "with base as (\n\n select * \n from {{ ref('stg_klaviyo__person_tmp') }}\n\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_klaviyo__person_tmp')),\n staging_columns=get_person_columns()\n )\n }}\n {{ fivetran_utils.source_relation(\n union_schema_variable='klaviyo_union_schemas', \n union_database_variable='klaviyo_union_databases') \n }}\n from base\n),\n\nfinal as (\n \n select \n id as person_id,\n address_1,\n address_2,\n city,\n country,\n zip,\n created as created_at,\n email,\n first_name || ' ' || last_name as full_name,\n latitude,\n longitude,\n organization,\n phone_number,\n region, -- state in USA\n timezone,\n title,\n updated as updated_at,\n source_relation\n \n {{ fivetran_utils.fill_pass_through_columns('klaviyo__person_pass_through_columns') }}\n\n from fields\n where not coalesce(_fivetran_deleted, false)\n)\n\nselect * from final", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.klaviyo_source.get_person_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.source_relation", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["model.klaviyo_source.stg_klaviyo__person_tmp", "model.klaviyo_source.stg_klaviyo__person_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_klaviyo", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_stg_klaviyo", "fqn": ["klaviyo_source", "stg_klaviyo__person"], "unique_id": "model.klaviyo_source.stg_klaviyo__person", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "stg_klaviyo__person.sql", "original_file_path": "models/stg_klaviyo__person.sql", "name": "stg_klaviyo__person", "alias": "stg_klaviyo__person", "checksum": {"name": "sha256", "checksum": "0c4d31fb3c257dff6d4c5123f3352ee790db81b766ac4f3be3b1cdb06d19b45f"}, "tags": [], "refs": [["stg_klaviyo__person_tmp"], ["stg_klaviyo__person_tmp"]], "sources": [], "metrics": [], "description": "Table storing the profiles of all people/users interacted with. Custom columns can be passed through to downstream models via the `klaviyo__person_pass_through_columns` variable (see README for details).\n", "columns": {"person_id": {"name": "person_id", "description": "Unique ID of the user if you use your own unique identifier. Otherwise, Klaviyo recommends using the email as the primary key. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "address_1": {"name": "address_1", "description": "First line of the person's address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "address_2": {"name": "address_2", "description": "Second line of the person's address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "city": {"name": "city", "description": "City they live in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "country": {"name": "country", "description": "Country they live in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "zip": {"name": "zip", "description": "Postal code where they live.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "Timestamp of when the person's profile was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email": {"name": "email", "description": "The email address and the unique identifier for a profile.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "full_name": {"name": "full_name", "description": "Person's full name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "latitude": {"name": "latitude", "description": "Latitude of the person's location.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "longitude": {"name": "longitude", "description": "Longitude of the person's location.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization": {"name": "organization", "description": "Business organization they belong to.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "phone_number": {"name": "phone_number", "description": "Associated phone number.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "region": {"name": "region", "description": "Region or state they live in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "timezone": {"name": "timezone", "description": "Timezone they are situated in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "title": {"name": "title", "description": "Title at their business or organization.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the person profile was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_relation": {"name": "source_relation", "description": "The source where this data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioining together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "klaviyo_source://models/stg_klaviyo.yml", "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo__person.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "stg_klaviyo"}, "created_at": 1665702405.142082, "compiled_sql": "with base as (\n\n select * \n from `dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__person_tmp`\n\n),\n\nfields as (\n\n select\n \n cast(null as boolean) as \n \n _fivetran_deleted\n \n , \n cast(null as \n timestamp\n) as \n \n _fivetran_synced\n \n , \n cast(null as \n string\n) as \n \n address_1\n \n , \n cast(null as \n string\n) as \n \n address_2\n \n , \n cast(null as \n string\n) as \n \n city\n \n , \n cast(null as \n string\n) as \n \n country\n \n , \n cast(null as \n timestamp\n) as \n \n created\n \n , \n cast(null as \n string\n) as \n \n email\n \n , \n cast(null as \n string\n) as \n \n first_name\n \n , \n cast(null as \n string\n) as \n \n id\n \n , \n cast(null as \n string\n) as \n \n last_name\n \n , \n cast(null as \n float64\n) as \n \n latitude\n \n , \n cast(null as \n float64\n) as \n \n longitude\n \n , \n cast(null as \n string\n) as \n \n organization\n \n , \n cast(null as \n string\n) as \n \n phone_number\n \n , \n cast(null as \n string\n) as \n \n region\n \n , \n cast(null as \n string\n) as \n \n timezone\n \n , \n cast(null as \n string\n) as \n \n title\n \n , \n cast(null as \n timestamp\n) as \n \n updated\n \n , \n cast(null as \n string\n) as \n \n zip\n \n \n\n\n \n\n\n, cast('' as \n string\n) as source_relation\n\n\n\n from base\n),\n\nfinal as (\n \n select \n id as person_id,\n address_1,\n address_2,\n city,\n country,\n zip,\n created as created_at,\n email,\n first_name || ' ' || last_name as full_name,\n latitude,\n longitude,\n organization,\n phone_number,\n region, -- state in USA\n timezone,\n title,\n updated as updated_at,\n source_relation\n \n \n\n\n\n\n\n from fields\n where not coalesce(_fivetran_deleted, false)\n)\n\nselect * from final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__person`"}, "model.klaviyo_source.stg_klaviyo__campaign": {"raw_sql": "with base as (\n\n select * \n from {{ ref('stg_klaviyo__campaign_tmp') }}\n\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_klaviyo__campaign_tmp')),\n staging_columns=get_campaign_columns()\n )\n }}\n {{ fivetran_utils.source_relation(\n union_schema_variable='klaviyo_union_schemas', \n union_database_variable='klaviyo_union_databases') \n }}\n from base\n),\n\nfinal as (\n \n select\n campaign_type,\n created as created_at,\n email_template_id,\n from_email,\n from_name,\n id as campaign_id,\n is_segmented,\n name as campaign_name,\n send_time as scheduled_to_send_at,\n sent_at,\n coalesce(status, lower(status_label)) as status,\n status_id,\n subject,\n updated as updated_at,\n source_relation\n\n from fields\n\n where not coalesce(_fivetran_deleted, false)\n)\n\nselect * from final", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.klaviyo_source.get_campaign_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.source_relation"], "nodes": ["model.klaviyo_source.stg_klaviyo__campaign_tmp", "model.klaviyo_source.stg_klaviyo__campaign_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_klaviyo", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_stg_klaviyo", "fqn": ["klaviyo_source", "stg_klaviyo__campaign"], "unique_id": "model.klaviyo_source.stg_klaviyo__campaign", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "stg_klaviyo__campaign.sql", "original_file_path": "models/stg_klaviyo__campaign.sql", "name": "stg_klaviyo__campaign", "alias": "stg_klaviyo__campaign", "checksum": {"name": "sha256", "checksum": "3bb055bc8484630176011790a666821ae220126184e05eaff411aa44406048e2"}, "tags": [], "refs": [["stg_klaviyo__campaign_tmp"], ["stg_klaviyo__campaign_tmp"]], "sources": [], "metrics": [], "description": "Table capturing email campaigns in Klaviyo.\n", "columns": {"campaign_type": {"name": "campaign_type", "description": "Type of campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "Timestamp of when the campaign was created, in UTC.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email_template_id": {"name": "email_template_id", "description": "Foreign key referencing the ID of the `email_template` object that will be the content of this campaign. Note the Email Template is copied when creating this campaign, so future changes to that Email Template will not alter the content of this campaign.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "from_email": {"name": "from_email", "description": "The email address your email will be sent from and will be used in the reply-to header.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "from_name": {"name": "from_name", "description": "The name or label associated with the email address you're sending from.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Unique ID of the campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_segmented": {"name": "is_segmented", "description": "Boolean that is true if the campaign is directed at a Klaviyo segment (not a list).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_name": {"name": "campaign_name", "description": "A name for this campaign. If not specified, this will default to the subject of the campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "scheduled_to_send_at": {"name": "scheduled_to_send_at", "description": "Timestamp of when the campaign is scheduled to be sent in the future, if [\"smart send time\"](https://help.klaviyo.com/hc/en-us/articles/360029794371-Smart-Send-Time-in-Klaviyo#how-to-utilize-smart-send-time3) is used. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "sent_at": {"name": "sent_at", "description": "Timestamp of when the campaign was first sent out to users.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status": {"name": "status", "description": "Current status of the campaign. Either \"draft\", \"scheduled\", \"sent\", or \"cancelled\".", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status_id": {"name": "status_id", "description": "Corresponding ID to the current status.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "subject": {"name": "subject", "description": "The subject line of the campaign's email.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the campaign was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_relation": {"name": "source_relation", "description": "The source where this data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioining together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "klaviyo_source://models/stg_klaviyo.yml", "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo__campaign.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "stg_klaviyo"}, "created_at": 1665702405.1050382, "compiled_sql": "with base as (\n\n select * \n from `dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__campaign_tmp`\n\n),\n\nfields as (\n\n select\n \n cast(null as boolean) as \n \n _fivetran_deleted\n \n , \n cast(null as \n timestamp\n) as \n \n _fivetran_synced\n \n , \n cast(null as \n string\n) as \n \n campaign_type\n \n , \n cast(null as \n timestamp\n) as \n \n created\n \n , \n cast(null as \n string\n) as \n \n email_template_id\n \n , \n cast(null as \n string\n) as \n \n from_email\n \n , \n cast(null as \n string\n) as \n \n from_name\n \n , \n cast(null as \n string\n) as \n \n id\n \n , \n cast(null as boolean) as \n \n is_segmented\n \n , \n cast(null as \n string\n) as \n \n name\n \n , \n cast(null as \n timestamp\n) as \n \n send_time\n \n , \n cast(null as \n timestamp\n) as \n \n sent_at\n \n , \n cast(null as \n string\n) as \n \n status\n \n , \n cast(null as \n string\n) as \n \n status_id\n \n , \n cast(null as \n string\n) as \n \n status_label\n \n , \n cast(null as \n string\n) as \n \n subject\n \n , \n cast(null as \n timestamp\n) as \n \n updated\n \n \n\n\n \n\n\n, cast('' as \n string\n) as source_relation\n\n\n\n from base\n),\n\nfinal as (\n \n select\n campaign_type,\n created as created_at,\n email_template_id,\n from_email,\n from_name,\n id as campaign_id,\n is_segmented,\n name as campaign_name,\n send_time as scheduled_to_send_at,\n sent_at,\n coalesce(status, lower(status_label)) as status,\n status_id,\n subject,\n updated as updated_at,\n source_relation\n\n from fields\n\n where not coalesce(_fivetran_deleted, false)\n)\n\nselect * from final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__campaign`"}, "model.klaviyo_source.stg_klaviyo__metric": {"raw_sql": "with base as (\n\n select * \n from {{ ref('stg_klaviyo__metric_tmp') }}\n\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_klaviyo__metric_tmp')),\n staging_columns=get_metric_columns()\n )\n }}\n {{ fivetran_utils.source_relation(\n union_schema_variable='klaviyo_union_schemas', \n union_database_variable='klaviyo_union_databases') \n }}\n from base\n),\n\nfinal as (\n \n select \n created as created_at,\n id as metric_id,\n integration_id,\n name as metric_name,\n updated as updated_at,\n source_relation\n\n from fields\n\n where not coalesce(_fivetran_deleted, false)\n)\n\nselect * from final", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.klaviyo_source.get_metric_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.source_relation"], "nodes": ["model.klaviyo_source.stg_klaviyo__metric_tmp", "model.klaviyo_source.stg_klaviyo__metric_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_klaviyo", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_stg_klaviyo", "fqn": ["klaviyo_source", "stg_klaviyo__metric"], "unique_id": "model.klaviyo_source.stg_klaviyo__metric", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "stg_klaviyo__metric.sql", "original_file_path": "models/stg_klaviyo__metric.sql", "name": "stg_klaviyo__metric", "alias": "stg_klaviyo__metric", "checksum": {"name": "sha256", "checksum": "d131ba8b5c6b489c12dc687514ef82b359aecaa82175b66d77fa44344b4eb58f"}, "tags": [], "refs": [["stg_klaviyo__metric_tmp"], ["stg_klaviyo__metric_tmp"]], "sources": [], "metrics": [], "description": "Table of tracked metrics across integrations in Klaviyo.", "columns": {"created_at": {"name": "created_at", "description": "Timestamp of when the metric was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "metric_id": {"name": "metric_id", "description": "Unique ID of the metric being tracked.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "integration_id": {"name": "integration_id", "description": "Foreign key referencing the INTEGRATION that the metric is being pulled from.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "metric_name": {"name": "metric_name", "description": "Name of the metric (same as `EVENT.type`)", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the metric was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_relation": {"name": "source_relation", "description": "The source where this data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioining together multiple sources, this will be an empty string.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "klaviyo_source://models/stg_klaviyo.yml", "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo__metric.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "stg_klaviyo"}, "created_at": 1665702405.143073, "compiled_sql": "with base as (\n\n select * \n from `dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__metric_tmp`\n\n),\n\nfields as (\n\n select\n \n cast(null as boolean) as \n \n _fivetran_deleted\n \n , \n cast(null as \n timestamp\n) as \n \n _fivetran_synced\n \n , \n cast(null as \n timestamp\n) as \n \n created\n \n , \n cast(null as \n string\n) as \n \n id\n \n , \n cast(null as \n string\n) as \n \n integration_id\n \n , \n cast(null as \n string\n) as \n \n name\n \n , \n cast(null as \n timestamp\n) as \n \n updated\n \n \n\n\n \n\n\n, cast('' as \n string\n) as source_relation\n\n\n\n from base\n),\n\nfinal as (\n \n select \n created as created_at,\n id as metric_id,\n integration_id,\n name as metric_name,\n updated as updated_at,\n source_relation\n\n from fields\n\n where not coalesce(_fivetran_deleted, false)\n)\n\nselect * from final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__metric`"}, "model.klaviyo_source.stg_klaviyo__integration": {"raw_sql": "with base as (\n\n select * \n from {{ ref('stg_klaviyo__integration_tmp') }}\n\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_klaviyo__integration_tmp')),\n staging_columns=get_integration_columns()\n )\n }}\n {{ fivetran_utils.source_relation(\n union_schema_variable='klaviyo_union_schemas', \n union_database_variable='klaviyo_union_databases') \n }}\n from base\n),\n\nfinal as (\n \n select \n category,\n id as integration_id,\n name as integration_name,\n source_relation\n\n from fields\n where not coalesce(_fivetran_deleted, false)\n)\n\nselect * from final", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.klaviyo_source.get_integration_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.source_relation"], "nodes": ["model.klaviyo_source.stg_klaviyo__integration_tmp", "model.klaviyo_source.stg_klaviyo__integration_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_klaviyo", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_stg_klaviyo", "fqn": ["klaviyo_source", "stg_klaviyo__integration"], "unique_id": "model.klaviyo_source.stg_klaviyo__integration", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "stg_klaviyo__integration.sql", "original_file_path": "models/stg_klaviyo__integration.sql", "name": "stg_klaviyo__integration", "alias": "stg_klaviyo__integration", "checksum": {"name": "sha256", "checksum": "cf1d2569260342f615850f5d782fb0e166d1b70ea3a703fb2248d6f457023cf8"}, "tags": [], "refs": [["stg_klaviyo__integration_tmp"], ["stg_klaviyo__integration_tmp"]], "sources": [], "metrics": [], "description": "Table storing third-party platforms integrated into Klaviyo.", "columns": {"category": {"name": "category", "description": "Use-case category of the integrated platform.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "integration_id": {"name": "integration_id", "description": "Unique ID of the integration.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "integration_name": {"name": "integration_name", "description": "Name of the integrated platform.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_relation": {"name": "source_relation", "description": "The source where this data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioining together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "klaviyo_source://models/stg_klaviyo.yml", "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo__integration.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "stg_klaviyo"}, "created_at": 1665702405.139513, "compiled_sql": "with base as (\n\n select * \n from `dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__integration_tmp`\n\n),\n\nfields as (\n\n select\n \n cast(null as boolean) as \n \n _fivetran_deleted\n \n , \n cast(null as \n timestamp\n) as \n \n _fivetran_synced\n \n , \n cast(null as \n string\n) as \n \n category\n \n , \n cast(null as \n string\n) as \n \n id\n \n , \n cast(null as \n string\n) as \n \n name\n \n \n\n\n \n\n\n, cast('' as \n string\n) as source_relation\n\n\n\n from base\n),\n\nfinal as (\n \n select \n category,\n id as integration_id,\n name as integration_name,\n source_relation\n\n from fields\n where not coalesce(_fivetran_deleted, false)\n)\n\nselect * from final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__integration`"}, "model.klaviyo_source.stg_klaviyo__flow": {"raw_sql": "with base as (\n\n select * \n from {{ ref('stg_klaviyo__flow_tmp') }}\n\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_klaviyo__flow_tmp')),\n staging_columns=get_flow_columns()\n )\n }}\n {{ fivetran_utils.source_relation(\n union_schema_variable='klaviyo_union_schemas', \n union_database_variable='klaviyo_union_databases') \n }}\n from base\n),\n\nfinal as (\n \n select \n created as created_at,\n id as flow_id,\n name as flow_name,\n status,\n {% if target.type == 'snowflake'%}\n \"TRIGGER\" \n {% else %}\n trigger\n {% endif %}\n as flow_trigger,\n updated as updated_at,\n customer_filter as person_filter,\n source_relation\n\n from fields\n where not coalesce(_fivetran_deleted, false)\n)\n\nselect * from final", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.klaviyo_source.get_flow_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.source_relation"], "nodes": ["model.klaviyo_source.stg_klaviyo__flow_tmp", "model.klaviyo_source.stg_klaviyo__flow_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_klaviyo", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_stg_klaviyo", "fqn": ["klaviyo_source", "stg_klaviyo__flow"], "unique_id": "model.klaviyo_source.stg_klaviyo__flow", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "stg_klaviyo__flow.sql", "original_file_path": "models/stg_klaviyo__flow.sql", "name": "stg_klaviyo__flow", "alias": "stg_klaviyo__flow", "checksum": {"name": "sha256", "checksum": "a74ad01e8fbca823f7ec229f1d0c59171c4a1200e314cb06e0ac75da0bc72792"}, "tags": [], "refs": [["stg_klaviyo__flow_tmp"], ["stg_klaviyo__flow_tmp"]], "sources": [], "metrics": [], "description": "Table of automated, triggered flow sequences in Klaviyo.", "columns": {"created_at": {"name": "created_at", "description": "Timestamp of when the flow was first created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_id": {"name": "flow_id", "description": "Unique ID of the flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_name": {"name": "flow_name", "description": "Name of the flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status": {"name": "status", "description": "Current status of the flow. Either 'manual', 'live', or 'draft'. Read more [here](https://help.klaviyo.com/hc/en-us/articles/115002774932-Getting-Started-with-Flows#the-flow-action-status9).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_trigger": {"name": "flow_trigger", "description": "JSON of metric, segment, list, and/or date-property filters that will trigger this flow. These are applied to the **event level**.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the flow was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "person_filter": {"name": "person_filter", "description": "JSON of flow filters placed on the **person level** that will trigger this flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_relation": {"name": "source_relation", "description": "The source where this data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioining together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "klaviyo_source://models/stg_klaviyo.yml", "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo__flow.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "stg_klaviyo"}, "created_at": 1665702405.138697, "compiled_sql": "with base as (\n\n select * \n from `dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__flow_tmp`\n\n),\n\nfields as (\n\n select\n \n cast(null as boolean) as \n \n _fivetran_deleted\n \n , \n cast(null as \n timestamp\n) as \n \n _fivetran_synced\n \n , \n cast(null as \n timestamp\n) as \n \n created\n \n , \n cast(null as \n string\n) as \n \n id\n \n , \n cast(null as \n string\n) as \n \n name\n \n , \n cast(null as \n string\n) as \n \n status\n \n , \n cast(null as \n string\n) as \n \n \n \n `trigger`\n \n \n \n , \n cast(null as \n timestamp\n) as \n \n updated\n \n , \n cast(null as \n string\n) as \n \n customer_filter\n \n \n\n\n \n\n\n, cast('' as \n string\n) as source_relation\n\n\n\n from base\n),\n\nfinal as (\n \n select \n created as created_at,\n id as flow_id,\n name as flow_name,\n status,\n \n trigger\n \n as flow_trigger,\n updated as updated_at,\n customer_filter as person_filter,\n source_relation\n\n from fields\n where not coalesce(_fivetran_deleted, false)\n)\n\nselect * from final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__flow`"}, "model.klaviyo_source.stg_klaviyo__event": {"raw_sql": "with base as (\n\n select * \n from {{ ref('stg_klaviyo__event_tmp') }}\n\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_klaviyo__event_tmp')),\n staging_columns=get_event_columns()\n )\n }}\n {{ fivetran_utils.source_relation(\n union_schema_variable='klaviyo_union_schemas', \n union_database_variable='klaviyo_union_databases') \n }}\n from base\n),\n\nrename as (\n \n select \n _variation as variation_id,\n campaign_id,\n cast(timestamp as {{ dbt_utils.type_timestamp() }} ) as occurred_at,\n flow_id,\n flow_message_id,\n id as event_id,\n metric_id,\n person_id,\n type,\n uuid,\n property_value as numeric_value,\n _fivetran_synced,\n source_relation\n\n {{ fivetran_utils.fill_pass_through_columns('klaviyo__event_pass_through_columns') }}\n\n from fields\n where not coalesce(_fivetran_deleted, false)\n),\n\nfinal as (\n \n select \n *,\n cast( {{ dbt_utils.date_trunc('day', 'occurred_at') }} as date) as occurred_on,\n {{ dbt_utils.surrogate_key(['event_id', 'source_relation']) }} as unique_event_id\n\n from rename\n\n)\n\nselect * from final", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.klaviyo_source.get_event_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.source_relation", "macro.dbt_utils.type_timestamp", "macro.fivetran_utils.fill_pass_through_columns", "macro.dbt_utils.date_trunc", "macro.dbt_utils.surrogate_key"], "nodes": ["model.klaviyo_source.stg_klaviyo__event_tmp", "model.klaviyo_source.stg_klaviyo__event_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_klaviyo", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_stg_klaviyo", "fqn": ["klaviyo_source", "stg_klaviyo__event"], "unique_id": "model.klaviyo_source.stg_klaviyo__event", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "stg_klaviyo__event.sql", "original_file_path": "models/stg_klaviyo__event.sql", "name": "stg_klaviyo__event", "alias": "stg_klaviyo__event", "checksum": {"name": "sha256", "checksum": "3f6b83c7355226d28545f2ef688933906d57e1acdd0b840bb6a504cae3b3bba5"}, "tags": [], "refs": [["stg_klaviyo__event_tmp"], ["stg_klaviyo__event_tmp"]], "sources": [], "metrics": [], "description": "Table of events (and metrics) triggered in Klaviyo or via its integrations. Custom columns can be passed through to downstream models via the `klaviyo__event_pass_through_columns` variable (see README for details).\n", "columns": {"variation_id": {"name": "variation_id", "description": "Unique ID of the attributed flow or campaign variation group. This does not map onto another table. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Foreign key referencing the CAMPAIGN that the event is attributed to.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "occurred_at": {"name": "occurred_at", "description": "Timestamp of when the event was triggered.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_id": {"name": "flow_id", "description": "Foreign key referencing the FLOW that the event is attributed to.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_message_id": {"name": "flow_message_id", "description": "Unique ID of the FLOW_MESSAGE that the event is attributed to. This does not map onto another table.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "event_id": {"name": "event_id", "description": "Unique ID of the event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "metric_id": {"name": "metric_id", "description": "Foreign key referencing the metric being captured.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "person_id": {"name": "person_id", "description": "Foreign key referencing the PERSON who triggered the event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "type": {"name": "type", "description": "Type of event that was triggered. This is the same as the METRIC name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "uuid": {"name": "uuid", "description": "Universally Unique Identifier of the event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "numeric_value": {"name": "numeric_value", "description": "Numeric value associated with the event (ie the dollars associated with a purchase).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "occurred_on": {"name": "occurred_on", "description": "Calendar date (UTC) on which the event occurred.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_relation": {"name": "source_relation", "description": "The source where this data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioining together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "unique_event_id": {"name": "unique_event_id", "description": "The unique identifier for the combination of event_id and source_relation columns.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "klaviyo_source://models/stg_klaviyo.yml", "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo__event.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "stg_klaviyo"}, "created_at": 1665702405.137428, "compiled_sql": "with base as (\n\n select * \n from `dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__event_tmp`\n\n),\n\nfields as (\n\n select\n \n cast(null as boolean) as \n \n _fivetran_deleted\n \n , \n cast(null as \n timestamp\n) as \n \n _fivetran_synced\n \n , \n cast(null as \n string\n) as \n \n _variation\n \n , \n cast(null as \n string\n) as \n \n campaign_id\n \n , \n cast(null as \n timestamp\n) as \n \n datetime\n \n , \n cast(null as \n string\n) as \n \n flow_id\n \n , \n cast(null as \n string\n) as \n \n flow_message_id\n \n , \n cast(null as \n string\n) as \n \n id\n \n , \n cast(null as \n string\n) as \n \n metric_id\n \n , \n cast(null as \n string\n) as \n \n person_id\n \n , \n cast(null as \n timestamp\n) as \n \n timestamp\n \n , \n cast(null as \n string\n) as \n \n type\n \n , \n cast(null as \n string\n) as \n \n uuid\n \n , \n cast(null as \n string\n) as \n \n property_value\n \n \n\n\n \n\n\n, cast('' as \n string\n) as source_relation\n\n\n\n from base\n),\n\nrename as (\n \n select \n _variation as variation_id,\n campaign_id,\n cast(timestamp as \n timestamp\n ) as occurred_at,\n flow_id,\n flow_message_id,\n id as event_id,\n metric_id,\n person_id,\n type,\n uuid,\n property_value as numeric_value,\n _fivetran_synced,\n source_relation\n\n \n\n\n\n\n\n from fields\n where not coalesce(_fivetran_deleted, false)\n),\n\nfinal as (\n \n select \n *,\n cast( timestamp_trunc(\n cast(occurred_at as timestamp),\n day\n ) as date) as occurred_on,\n to_hex(md5(cast(coalesce(cast(event_id as \n string\n), '') || '-' || coalesce(cast(source_relation as \n string\n), '') as \n string\n))) as unique_event_id\n\n from rename\n\n)\n\nselect * from final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__event`"}, "model.klaviyo_source.stg_klaviyo__event_tmp": {"raw_sql": "{{\n fivetran_utils.union_data(\n table_identifier='event', \n database_variable='klaviyo_database', \n schema_variable='klaviyo_schema', \n default_database=target.database,\n default_schema='klaviyo',\n default_variable='event_table',\n union_schema_variable='klaviyo_union_schemas',\n union_database_variable='klaviyo_union_databases'\n )\n}}", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.union_data"], "nodes": ["seed.shopify_holistic_reporting_integration_tests.event"]}, "config": {"enabled": true, "alias": null, "schema": "stg_klaviyo", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_stg_klaviyo", "fqn": ["klaviyo_source", "tmp", "stg_klaviyo__event_tmp"], "unique_id": "model.klaviyo_source.stg_klaviyo__event_tmp", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "tmp/stg_klaviyo__event_tmp.sql", "original_file_path": "models/tmp/stg_klaviyo__event_tmp.sql", "name": "stg_klaviyo__event_tmp", "alias": "stg_klaviyo__event_tmp", "checksum": {"name": "sha256", "checksum": "0aa5096828da6b1f75fb7a93d5f7621f024adb2ef241014a075abae8511fb337"}, "tags": [], "refs": [["event"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/tmp/stg_klaviyo__event_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "stg_klaviyo"}, "created_at": 1665702404.813214, "compiled_sql": "\n\n\n\n select * \n from `dbt-package-testing`.`linkedin_integration_tests`.`event`\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__event_tmp`"}, "model.klaviyo_source.stg_klaviyo__metric_tmp": {"raw_sql": "{{\n fivetran_utils.union_data(\n table_identifier='metric', \n database_variable='klaviyo_database', \n schema_variable='klaviyo_schema', \n default_database=target.database,\n default_schema='klaviyo',\n default_variable='metric',\n union_schema_variable='klaviyo_union_schemas',\n union_database_variable='klaviyo_union_databases'\n )\n}}", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.union_data"], "nodes": ["seed.shopify_holistic_reporting_integration_tests.metric"]}, "config": {"enabled": true, "alias": null, "schema": "stg_klaviyo", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_stg_klaviyo", "fqn": ["klaviyo_source", "tmp", "stg_klaviyo__metric_tmp"], "unique_id": "model.klaviyo_source.stg_klaviyo__metric_tmp", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "tmp/stg_klaviyo__metric_tmp.sql", "original_file_path": "models/tmp/stg_klaviyo__metric_tmp.sql", "name": "stg_klaviyo__metric_tmp", "alias": "stg_klaviyo__metric_tmp", "checksum": {"name": "sha256", "checksum": "1f887542c817cae88b22c9632e93da3ae5fa6c02dadc22e8901484b55e4c5f2d"}, "tags": [], "refs": [["metric"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/tmp/stg_klaviyo__metric_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "stg_klaviyo"}, "created_at": 1665702404.816493, "compiled_sql": "\n\n\n\n select * \n from `dbt-package-testing`.`linkedin_integration_tests`.`metric`\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__metric_tmp`"}, "model.klaviyo_source.stg_klaviyo__campaign_tmp": {"raw_sql": "{{\n fivetran_utils.union_data(\n table_identifier='campaign', \n database_variable='klaviyo_database', \n schema_variable='klaviyo_schema', \n default_database=target.database,\n default_schema='klaviyo',\n default_variable='campaign',\n union_schema_variable='klaviyo_union_schemas',\n union_database_variable='klaviyo_union_databases'\n )\n}}", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.union_data"], "nodes": ["seed.shopify_holistic_reporting_integration_tests.campaign"]}, "config": {"enabled": true, "alias": null, "schema": "stg_klaviyo", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_stg_klaviyo", "fqn": ["klaviyo_source", "tmp", "stg_klaviyo__campaign_tmp"], "unique_id": "model.klaviyo_source.stg_klaviyo__campaign_tmp", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "tmp/stg_klaviyo__campaign_tmp.sql", "original_file_path": "models/tmp/stg_klaviyo__campaign_tmp.sql", "name": "stg_klaviyo__campaign_tmp", "alias": "stg_klaviyo__campaign_tmp", "checksum": {"name": "sha256", "checksum": "f494e0b1c1093180196545a7c05c0f8f7f8ed074e63328057021091c1d776530"}, "tags": [], "refs": [["campaign"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/tmp/stg_klaviyo__campaign_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "stg_klaviyo"}, "created_at": 1665702404.820361, "compiled_sql": "\n\n\n\n select * \n from `dbt-package-testing`.`linkedin_integration_tests`.`campaign`\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__campaign_tmp`"}, "model.klaviyo_source.stg_klaviyo__integration_tmp": {"raw_sql": "{{\n fivetran_utils.union_data(\n table_identifier='integration', \n database_variable='klaviyo_database', \n schema_variable='klaviyo_schema', \n default_database=target.database,\n default_schema='klaviyo',\n default_variable='integration',\n union_schema_variable='klaviyo_union_schemas',\n union_database_variable='klaviyo_union_databases'\n )\n}}", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.union_data"], "nodes": ["seed.shopify_holistic_reporting_integration_tests.integration"]}, "config": {"enabled": true, "alias": null, "schema": "stg_klaviyo", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_stg_klaviyo", "fqn": ["klaviyo_source", "tmp", "stg_klaviyo__integration_tmp"], "unique_id": "model.klaviyo_source.stg_klaviyo__integration_tmp", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "tmp/stg_klaviyo__integration_tmp.sql", "original_file_path": "models/tmp/stg_klaviyo__integration_tmp.sql", "name": "stg_klaviyo__integration_tmp", "alias": "stg_klaviyo__integration_tmp", "checksum": {"name": "sha256", "checksum": "174b16d87563e123fb0d813d3749c31fb80fc08df48143729e28f34bce0a2e04"}, "tags": [], "refs": [["integration"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/tmp/stg_klaviyo__integration_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "stg_klaviyo"}, "created_at": 1665702404.8235729, "compiled_sql": "\n\n\n\n select * \n from `dbt-package-testing`.`linkedin_integration_tests`.`integration`\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__integration_tmp`"}, "model.klaviyo_source.stg_klaviyo__flow_tmp": {"raw_sql": "{{\n fivetran_utils.union_data(\n table_identifier='flow', \n database_variable='klaviyo_database', \n schema_variable='klaviyo_schema', \n default_database=target.database,\n default_schema='klaviyo',\n default_variable='flow',\n union_schema_variable='klaviyo_union_schemas',\n union_database_variable='klaviyo_union_databases'\n )\n}}", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.union_data"], "nodes": ["seed.shopify_holistic_reporting_integration_tests.flow"]}, "config": {"enabled": true, "alias": null, "schema": "stg_klaviyo", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_stg_klaviyo", "fqn": ["klaviyo_source", "tmp", "stg_klaviyo__flow_tmp"], "unique_id": "model.klaviyo_source.stg_klaviyo__flow_tmp", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "tmp/stg_klaviyo__flow_tmp.sql", "original_file_path": "models/tmp/stg_klaviyo__flow_tmp.sql", "name": "stg_klaviyo__flow_tmp", "alias": "stg_klaviyo__flow_tmp", "checksum": {"name": "sha256", "checksum": "4437a7971622b8cd114313ee2b1a59b992ba862c49f0086851d5d60082617b0c"}, "tags": [], "refs": [["flow"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/tmp/stg_klaviyo__flow_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "stg_klaviyo"}, "created_at": 1665702404.826895, "compiled_sql": "\n\n\n\n select * \n from `dbt-package-testing`.`linkedin_integration_tests`.`flow`\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__flow_tmp`"}, "model.klaviyo_source.stg_klaviyo__person_tmp": {"raw_sql": "{{\n fivetran_utils.union_data(\n table_identifier='person', \n database_variable='klaviyo_database', \n schema_variable='klaviyo_schema', \n default_database=target.database,\n default_schema='klaviyo',\n default_variable='person',\n union_schema_variable='klaviyo_union_schemas',\n union_database_variable='klaviyo_union_databases'\n )\n}}", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.union_data"], "nodes": ["seed.shopify_holistic_reporting_integration_tests.person"]}, "config": {"enabled": true, "alias": null, "schema": "stg_klaviyo", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_stg_klaviyo", "fqn": ["klaviyo_source", "tmp", "stg_klaviyo__person_tmp"], "unique_id": "model.klaviyo_source.stg_klaviyo__person_tmp", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "tmp/stg_klaviyo__person_tmp.sql", "original_file_path": "models/tmp/stg_klaviyo__person_tmp.sql", "name": "stg_klaviyo__person_tmp", "alias": "stg_klaviyo__person_tmp", "checksum": {"name": "sha256", "checksum": "ec768db1c8d1d5eb47e967bf23bb95726133d2a298373f757930302de96e2910"}, "tags": [], "refs": [["person"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/tmp/stg_klaviyo__person_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "stg_klaviyo"}, "created_at": 1665702404.83108, "compiled_sql": "\n\n\n\n select * \n from `dbt-package-testing`.`linkedin_integration_tests`.`person`\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__person_tmp`"}, "model.klaviyo.klaviyo__person_campaign_flow": {"raw_sql": "with events as (\n select *\n from {{ ref('klaviyo__events') }}\n),\n\npivot_out_events as (\n \n select \n person_id,\n last_touch_campaign_id,\n last_touch_flow_id,\n campaign_name,\n flow_name,\n variation_id,\n source_relation,\n min(occurred_at) as first_event_at,\n max(occurred_at) as last_event_at\n\n -- sum up the numeric value associated with events (most likely will mean revenue)\n {% for rm in var('klaviyo__sum_revenue_metrics') %}\n , sum(case when lower(type) = '{{ rm | lower }}' then \n coalesce({{ fivetran_utils.try_cast(\"numeric_value\", \"numeric\") }}, 0)\n else 0 end) \n as {{ 'sum_revenue_' ~ rm | replace(' ', '_') | replace('(', '') | replace(')', '') | lower }} -- removing special characters that I have seen in different integration events\n {% endfor %}\n\n -- count up the number of instances of each metric\n {% for cm in var('klaviyo__count_metrics') %}\n , sum(case when lower(type) = '{{ cm | lower }}' then 1 else 0 end) \n as {{ 'count_' ~ cm | replace(' ', '_') | replace('(', '') | replace(')', '') | lower }} -- removing special characters that I have seen in different integration events\n {% endfor %}\n\n from events\n {{ dbt_utils.group_by(n=7) }}\n)\n\nselect *\nfrom pivot_out_events", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.try_cast", "macro.dbt_utils.group_by"], "nodes": ["model.klaviyo.klaviyo__events"]}, "config": {"enabled": true, "alias": null, "schema": "klaviyo", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_klaviyo", "fqn": ["klaviyo", "klaviyo__person_campaign_flow"], "unique_id": "model.klaviyo.klaviyo__person_campaign_flow", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "klaviyo__person_campaign_flow.sql", "original_file_path": "models/klaviyo__person_campaign_flow.sql", "name": "klaviyo__person_campaign_flow", "alias": "klaviyo__person_campaign_flow", "checksum": {"name": "sha256", "checksum": "89abb4c1b2f90ada510aba4f45cb935f457c0e0a776a6f761826e5b270bc7817"}, "tags": [], "refs": [["klaviyo__events"]], "sources": [], "metrics": [], "description": "Table that aggregates event metrics to the person-campaign or -flow grain (but note that if a user interacts with 2 different variations of a flow/campaign somehow, they will have 2 records). Also note that organic interactions (someone with null campaign_id/flow_id) are included in this table. \n**Counts** of the instances of the events, as well as **sums** of the numeric value associated with events (i.e. revenue) will be pivoted out into columns, as configured by the `klaviyo__count_metrics` and `klaviyo__sum_revenue_metrics` variables, respectively. See the dbt_project.yml file for the default metrics used. These columns will be prefixed with `count_` and `sum_revenue_`.\n", "columns": {"person_id": {"name": "person_id", "description": "Foreign key referencing the PERSON who interacted with the flow/message.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_campaign_id": {"name": "last_touch_campaign_id", "description": "Foreign key referencing the CAMPAIGN attributed with these metrics (by the package's attribution model).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_flow_id": {"name": "last_touch_flow_id", "description": "Foreign key referencing the FLOW attributed with these metrics (by the package's attribution model).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_name": {"name": "campaign_name", "description": "A name for this campaign. If not specified, this will default to the subject of the campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_name": {"name": "flow_name", "description": "Name of the flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variation_id": {"name": "variation_id", "description": "Unique ID of the attributed flow or campaign variation group. This does not map onto another table. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_event_at": {"name": "first_event_at", "description": "Timestamp of the first ever interaction between this campaign/flow and a person. In other words, the first event trigger attributed to the campaign/flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_event_at": {"name": "last_event_at", "description": "Timestamp of the most recent interaction between this campaign/flow and a person. In other words, the last event trigger attributed to the campaign/flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_relation": {"name": "source_relation", "description": "The source where this data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioining together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "klaviyo://models/klaviyo.yml", "compiled_path": "target/compiled/klaviyo/models/klaviyo__person_campaign_flow.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "klaviyo"}, "created_at": 1665702405.187114, "compiled_sql": "with events as (\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_klaviyo`.`klaviyo__events`\n),\n\npivot_out_events as (\n \n select \n person_id,\n last_touch_campaign_id,\n last_touch_flow_id,\n campaign_name,\n flow_name,\n variation_id,\n source_relation,\n min(occurred_at) as first_event_at,\n max(occurred_at) as last_event_at\n\n -- sum up the numeric value associated with events (most likely will mean revenue)\n \n , sum(case when lower(type) = 'refunded order' then \n coalesce(\n \n safe_cast(numeric_value as numeric)\n\n, 0)\n else 0 end) \n as sum_revenue_refunded_order -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'placed order' then \n coalesce(\n \n safe_cast(numeric_value as numeric)\n\n, 0)\n else 0 end) \n as sum_revenue_placed_order -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'ordered product' then \n coalesce(\n \n safe_cast(numeric_value as numeric)\n\n, 0)\n else 0 end) \n as sum_revenue_ordered_product -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'checkout started' then \n coalesce(\n \n safe_cast(numeric_value as numeric)\n\n, 0)\n else 0 end) \n as sum_revenue_checkout_started -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'cancelled order' then \n coalesce(\n \n safe_cast(numeric_value as numeric)\n\n, 0)\n else 0 end) \n as sum_revenue_cancelled_order -- removing special characters that I have seen in different integration events\n \n\n -- count up the number of instances of each metric\n \n , sum(case when lower(type) = 'active on site' then 1 else 0 end) \n as count_active_on_site -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'viewed product' then 1 else 0 end) \n as count_viewed_product -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'ordered product' then 1 else 0 end) \n as count_ordered_product -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'placed order' then 1 else 0 end) \n as count_placed_order -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'refunded order' then 1 else 0 end) \n as count_refunded_order -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'cancelled order' then 1 else 0 end) \n as count_cancelled_order -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'fulfilled order' then 1 else 0 end) \n as count_fulfilled_order -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'received email' then 1 else 0 end) \n as count_received_email -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'clicked email' then 1 else 0 end) \n as count_clicked_email -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'opened email' then 1 else 0 end) \n as count_opened_email -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'bounced email' then 1 else 0 end) \n as count_bounced_email -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'marked email as spam' then 1 else 0 end) \n as count_marked_email_as_spam -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'dropped email' then 1 else 0 end) \n as count_dropped_email -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'subscribed to list' then 1 else 0 end) \n as count_subscribed_to_list -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'unsubscribed to list' then 1 else 0 end) \n as count_unsubscribed_to_list -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'unsubscribed' then 1 else 0 end) \n as count_unsubscribed -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'updated email preferences' then 1 else 0 end) \n as count_updated_email_preferences -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'subscribed to back in stock' then 1 else 0 end) \n as count_subscribed_to_back_in_stock -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'merged profile' then 1 else 0 end) \n as count_merged_profile -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'received sms' then 1 else 0 end) \n as count_received_sms -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'clicked sms' then 1 else 0 end) \n as count_clicked_sms -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'consented to receive sms' then 1 else 0 end) \n as count_consented_to_receive_sms -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'sent sms' then 1 else 0 end) \n as count_sent_sms -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'unsubscribed from sms' then 1 else 0 end) \n as count_unsubscribed_from_sms -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'failed to deliver sms' then 1 else 0 end) \n as count_failed_to_deliver_sms -- removing special characters that I have seen in different integration events\n \n\n from events\n group by 1,2,3,4,5,6,7\n)\n\nselect *\nfrom pivot_out_events", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_klaviyo`.`klaviyo__person_campaign_flow`"}, "model.klaviyo.klaviyo__persons": {"raw_sql": "with person as (\n\n select *\n from {{ var('person') }}\n),\n\nperson_metrics as (\n\n select *\n from {{ ref('int_klaviyo__person_metrics') }}\n),\n\nperson_join as (\n\n select\n person.*,\n {{ dbt_utils.star(from=ref('int_klaviyo__person_metrics'), except=[\"person_id\", \"source_relation\"]) }}\n\n from person\n left join person_metrics on (\n person.person_id = person_metrics.person_id\n and person.source_relation = person_metrics.source_relation\n )\n\n)\n\nselect *\nfrom person_join", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": ["model.klaviyo_source.stg_klaviyo__person", "model.klaviyo.int_klaviyo__person_metrics", "model.klaviyo.int_klaviyo__person_metrics"]}, "config": {"enabled": true, "alias": null, "schema": "klaviyo", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_klaviyo", "fqn": ["klaviyo", "klaviyo__persons"], "unique_id": "model.klaviyo.klaviyo__persons", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "klaviyo__persons.sql", "original_file_path": "models/klaviyo__persons.sql", "name": "klaviyo__persons", "alias": "klaviyo__persons", "checksum": {"name": "sha256", "checksum": "4228e8c8280040f57997ecd7d0cd1c726cee6789721533903c2f75ad6cefc473"}, "tags": [], "refs": [["stg_klaviyo__person"], ["int_klaviyo__person_metrics"], ["int_klaviyo__person_metrics"]], "sources": [], "metrics": [], "description": "Table of unique person profiles, enhanced with event, campaign, flow, and revenue metrics. \n**Counts** of instances of triggered events and **sums** of the numeric value (i.e. revenue) associated with events (total vs organic/not attributed to flows or campaigns) will be pivoted out into columns, as configured by the `klaviyo__count_metrics` and `klaviyo__sum_revenue_metrics`variables, respectively. See the dbt_project.yml file for the default metrics used. These columns will be prefixed with `total_count_`, `total_sum_revenue_` (organic + attributed), and `organic_sum_revenue_` (not attributed to a campaign or flow). \n", "columns": {"person_id": {"name": "person_id", "description": "Unique ID of the user if you use your own unique identifier. Otherwise, Klaviyo recommends using the email as the primary key. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "address_1": {"name": "address_1", "description": "First line of the person's address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "address_2": {"name": "address_2", "description": "Second line of the person's address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "city": {"name": "city", "description": "City they live in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "country": {"name": "country", "description": "Country they live in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "zip": {"name": "zip", "description": "Postal code where they live.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "Timestamp of when the person's profile was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email": {"name": "email", "description": "The email address and the unique identifier for a profile.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "full_name": {"name": "full_name", "description": "Person's full name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "latitude": {"name": "latitude", "description": "Latitude of the person's location.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "longitude": {"name": "longitude", "description": "Longitude of the person's location.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization": {"name": "organization", "description": "Business organization they belong to.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "phone_number": {"name": "phone_number", "description": "Associated phone number.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "region": {"name": "region", "description": "Region or state they live in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "timezone": {"name": "timezone", "description": "Timezone they are situated in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "title": {"name": "title", "description": "Title at their business or organization.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the person profile was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "count_total_campaigns": {"name": "count_total_campaigns", "description": "Count of the number of campaigns this person has interacted with.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "count_total_flows": {"name": "count_total_flows", "description": "Count of the number of flows this person has interacted with.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_event_at": {"name": "first_event_at", "description": "Timestamp of when the user first triggered an event (not limited to campaign and flow interactions).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_event_at": {"name": "last_event_at", "description": "Timestamp of when the user last triggered an event (not limited to campaign and flow interactions).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_campaign_touch_at": {"name": "first_campaign_touch_at", "description": "Timestamp of when the user first interacted with a campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_campaign_touch_at": {"name": "last_campaign_touch_at", "description": "Timestamp of when the user last interacted with a campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_flow_touch_at": {"name": "first_flow_touch_at", "description": "Timestamp of when the user first interacted with a flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_flow_touch_at": {"name": "last_flow_touch_at", "description": "Timestamp of when the user last interacted with a flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_relation": {"name": "source_relation", "description": "The source where this data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioining together multiple sources, this will be an empty string.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "klaviyo://models/klaviyo.yml", "compiled_path": "target/compiled/klaviyo/models/klaviyo__persons.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "klaviyo"}, "created_at": 1665702405.195345, "compiled_sql": "with person as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__person`\n),\n\nperson_metrics as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_int_klaviyo`.`int_klaviyo__person_metrics`\n),\n\nperson_join as (\n\n select\n person.*,\n *\n\n from person\n left join person_metrics on (\n person.person_id = person_metrics.person_id\n and person.source_relation = person_metrics.source_relation\n )\n\n)\n\nselect *\nfrom person_join", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_klaviyo`.`klaviyo__persons`"}, "model.klaviyo.klaviyo__flows": {"raw_sql": "with flow as (\n\n select *\n from {{ var('flow') }}\n),\n\nflow_metrics as (\n\n select *\n from {{ ref('int_klaviyo__campaign_flow_metrics') }}\n),\n\nflow_join as (\n \n {% set exclude_fields = ['last_touch_campaign_id', 'last_touch_flow_id', 'source_relation'] %}\n\n select\n flow.*, -- has flow_id and source_relation\n {{ dbt_utils.star(from=ref('int_klaviyo__campaign_flow_metrics'), except=exclude_fields) }}\n\n from flow\n left join flow_metrics on (\n flow.flow_id = flow_metrics.last_touch_flow_id\n and\n flow.source_relation = flow_metrics.source_relation\n )\n),\n\nfinal as (\n\n select \n *,\n {{ dbt_utils.surrogate_key(['flow_id','variation_id']) }} as flow_variation_key\n\n from flow_join\n)\n\nselect *\nfrom final", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt_utils.star", "macro.dbt_utils.surrogate_key"], "nodes": ["model.klaviyo_source.stg_klaviyo__flow", "model.klaviyo.int_klaviyo__campaign_flow_metrics", "model.klaviyo.int_klaviyo__campaign_flow_metrics"]}, "config": {"enabled": true, "alias": null, "schema": "klaviyo", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_klaviyo", "fqn": ["klaviyo", "klaviyo__flows"], "unique_id": "model.klaviyo.klaviyo__flows", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "klaviyo__flows.sql", "original_file_path": "models/klaviyo__flows.sql", "name": "klaviyo__flows", "alias": "klaviyo__flows", "checksum": {"name": "sha256", "checksum": "e51636d4194dd04fc1bd023c6aa0a982fa517a29f6734d611756bda94c123e0e"}, "tags": [], "refs": [["stg_klaviyo__flow"], ["int_klaviyo__campaign_flow_metrics"], ["int_klaviyo__campaign_flow_metrics"]], "sources": [], "metrics": [], "description": "Table of unique flow versions. A flow with 2 variations will have 2 distinct rows. **Counts** of the unique users and instances of the events, as well as **sums** of the numeric value associated with events (i.e. revenue) will be pivoted out into columns, as configured by the `klaviyo__count_metrics` and `klaviyo__sum_revenue_metrics` variables, respectively. See the dbt_project.yml file for the default metrics used. These columns will be prefixed with `count_`, `unique_count_`, and `sum_revenue_`.\n", "columns": {"flow_variation_key": {"name": "flow_variation_key", "description": "Unique key hashed on the flow and variation IDs.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "Timestamp of when the flow was first created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_id": {"name": "flow_id", "description": "Unique ID of the flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_name": {"name": "flow_name", "description": "Name of the flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status": {"name": "status", "description": "Current status of the flow. Either 'manual', 'live', or 'draft'. Read more [here](https://help.klaviyo.com/hc/en-us/articles/115002774932-Getting-Started-with-Flows#the-flow-action-status9).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_trigger": {"name": "flow_trigger", "description": "JSON of metric, segment, list, and/or date-property filters that will trigger this flow. These are applied to the **event level**.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the flow was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "person_filter": {"name": "person_filter", "description": "JSON of flow filters placed on the **person level** that will trigger this flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variation_id": {"name": "variation_id", "description": "Unique ID of the attributed flow variation group. This does not map onto another table. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_count_unique_people": {"name": "total_count_unique_people", "description": "The count of the distinct people that have interacted with this flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_event_at": {"name": "first_event_at", "description": "Timestamp of the first ever interaction between this flow and a person.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_event_at": {"name": "last_event_at", "description": "Timestamp of the most recent interaction between this flow and a person.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_relation": {"name": "source_relation", "description": "The source where this data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioining together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "klaviyo://models/klaviyo.yml", "compiled_path": "target/compiled/klaviyo/models/klaviyo__flows.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "klaviyo"}, "created_at": 1665702405.1917791, "compiled_sql": "with flow as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__flow`\n),\n\nflow_metrics as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_int_klaviyo`.`int_klaviyo__campaign_flow_metrics`\n),\n\nflow_join as (\n \n \n\n select\n flow.*, -- has flow_id and source_relation\n *\n\n from flow\n left join flow_metrics on (\n flow.flow_id = flow_metrics.last_touch_flow_id\n and\n flow.source_relation = flow_metrics.source_relation\n )\n),\n\nfinal as (\n\n select \n *,\n to_hex(md5(cast(coalesce(cast(flow_id as \n string\n), '') || '-' || coalesce(cast(variation_id as \n string\n), '') as \n string\n))) as flow_variation_key\n\n from flow_join\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_klaviyo`.`klaviyo__flows`"}, "model.klaviyo.klaviyo__campaigns": {"raw_sql": "with campaign as (\n\n select *\n from {{ var('campaign') }}\n),\n\ncampaign_metrics as (\n\n select *\n from {{ ref('int_klaviyo__campaign_flow_metrics') }}\n),\n\ncampaign_join as (\n \n {% set exclude_fields = [ 'last_touch_campaign_id', 'last_touch_flow_id', 'source_relation'] %}\n\n select\n campaign.*, -- has campaign_id and source_relation\n {{ dbt_utils.star(from=ref('int_klaviyo__campaign_flow_metrics'), except=exclude_fields) }}\n\n from campaign\n left join campaign_metrics on (\n campaign.campaign_id = campaign_metrics.last_touch_campaign_id\n and\n campaign.source_relation = campaign_metrics.source_relation\n )\n),\n\nfinal as (\n\n select \n *,\n {{ dbt_utils.surrogate_key(['campaign_id','variation_id']) }} as campaign_variation_key\n\n from campaign_join\n)\n\nselect *\nfrom final", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt_utils.star", "macro.dbt_utils.surrogate_key"], "nodes": ["model.klaviyo_source.stg_klaviyo__campaign", "model.klaviyo.int_klaviyo__campaign_flow_metrics", "model.klaviyo.int_klaviyo__campaign_flow_metrics"]}, "config": {"enabled": true, "alias": null, "schema": "klaviyo", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_klaviyo", "fqn": ["klaviyo", "klaviyo__campaigns"], "unique_id": "model.klaviyo.klaviyo__campaigns", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "klaviyo__campaigns.sql", "original_file_path": "models/klaviyo__campaigns.sql", "name": "klaviyo__campaigns", "alias": "klaviyo__campaigns", "checksum": {"name": "sha256", "checksum": "3f86c2f589802530165ac6e6244681db0f42091784c29a6ae17b752f5ed4cd6f"}, "tags": [], "refs": [["stg_klaviyo__campaign"], ["int_klaviyo__campaign_flow_metrics"], ["int_klaviyo__campaign_flow_metrics"]], "sources": [], "metrics": [], "description": "Table of unique campaign versions. A campaign with 2 variations will have 2 distinct rows. **Counts** of the unique users and instances of the events, as well as **sums** of the numeric value associated with events (i.e. revenue) will be pivoted out into columns, as configured by the `klaviyo__count_metrics` and `klaviyo__sum_revenue_metrics` variables, respectively. See the dbt_project.yml file for the default metrics used. These columns will be prefixed with `count_`, `unique_count_`, and `sum_revenue_`.\n", "columns": {"campaign_variation_key": {"name": "campaign_variation_key", "description": "Unique key hashed on the campaign and variation IDs.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_type": {"name": "campaign_type", "description": "Type of campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "Timestamp of when the campaign was created, in UTC.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email_template_id": {"name": "email_template_id", "description": "Foreign key referencing the ID of the `email_template` object that will be the content of this campaign. Note the Email Template is copied when creating this campaign, so future changes to that Email Template will not alter the content of this campaign.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "from_email": {"name": "from_email", "description": "The email address your email will be sent from and will be used in the reply-to header.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "from_name": {"name": "from_name", "description": "The name or label associated with the email address you're sending from.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Unique ID of the campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_segmented": {"name": "is_segmented", "description": "Boolean that is true if the campaign is directed at a Klaviyo segment (not a list).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_name": {"name": "campaign_name", "description": "A name for this campaign. If not specified, this will default to the subject of the campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "scheduled_to_send_at": {"name": "scheduled_to_send_at", "description": "Timestamp of when the campaign is scheduled to be sent in the future, if [\"smart send time\"](https://help.klaviyo.com/hc/en-us/articles/360029794371-Smart-Send-Time-in-Klaviyo#how-to-utilize-smart-send-time3) is used. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "sent_at": {"name": "sent_at", "description": "Timestamp of when the campaign was first sent out to users.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status": {"name": "status", "description": "Current status of the campaign. Either \"draft\", \"scheduled\", \"sent\", or \"cancelled\".", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status_id": {"name": "status_id", "description": "Corresponding ID to the current status.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "subject": {"name": "subject", "description": "The subject line of the campaign's email.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the campaign was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variation_id": {"name": "variation_id", "description": "Unique ID of the attributed campaign variation group. This does not map onto another table. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_count_unique_people": {"name": "total_count_unique_people", "description": "The count of the distinct people that have interacted with this campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_event_at": {"name": "first_event_at", "description": "Timestamp of the first ever interaction between this campaign and a person.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_event_at": {"name": "last_event_at", "description": "Timestamp of the most recent interaction between this campaign and a person.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_relation": {"name": "source_relation", "description": "The source where this data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioining together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "klaviyo://models/klaviyo.yml", "compiled_path": "target/compiled/klaviyo/models/klaviyo__campaigns.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "klaviyo"}, "created_at": 1665702405.189868, "compiled_sql": "with campaign as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__campaign`\n),\n\ncampaign_metrics as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_int_klaviyo`.`int_klaviyo__campaign_flow_metrics`\n),\n\ncampaign_join as (\n \n \n\n select\n campaign.*, -- has campaign_id and source_relation\n *\n\n from campaign\n left join campaign_metrics on (\n campaign.campaign_id = campaign_metrics.last_touch_campaign_id\n and\n campaign.source_relation = campaign_metrics.source_relation\n )\n),\n\nfinal as (\n\n select \n *,\n to_hex(md5(cast(coalesce(cast(campaign_id as \n string\n), '') || '-' || coalesce(cast(variation_id as \n string\n), '') as \n string\n))) as campaign_variation_key\n\n from campaign_join\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_klaviyo`.`klaviyo__campaigns`"}, "model.klaviyo.klaviyo__events": {"raw_sql": "{{\n config(\n materialized='incremental',\n unique_key='unique_event_id',\n partition_by={\n \"field\": \"occurred_on\",\n \"data_type\": \"date\"\n } if target.type == 'bigquery' else none,\n incremental_strategy = 'merge' if target.type not in ('snowflake', 'postgres', 'redshift') else 'delete+insert',\n file_format = 'delta'\n )\n}}\n-- ^ the incremental strategy is split into delete+insert for snowflake since there is a bit of\n-- overlap in transformed data blocks for incremental runs (we look back an extra hour, see lines 23 - 30)\n-- this configuration solution was taken from https://docs.getdbt.com/reference/resource-configs/snowflake-configs#merge-behavior-incremental-models\n\nwith events as (\n\n select *\n from {{ ref('int_klaviyo__event_attribution') }}\n\n {% if is_incremental() %}\n\n -- most events (from all kinds of integrations) at least once every hour\n where _fivetran_synced >= cast(coalesce( \n (\n select {{ dbt_utils.dateadd(datepart = 'hour', \n interval = -1,\n from_date_or_timestamp = 'max(_fivetran_synced)' ) }} \n from {{ this }}\n ), '2012-01-01') as {{ dbt_utils.type_timestamp() }} ) -- klaviyo was founded in 2012, so let's default the min date to then\n {% endif %}\n),\n\nevent_fields as (\n\n -- excluding some fields to rename them and/or make them null if needed\n {% set exclude_fields = ['touch_session', 'last_touch_id', 'session_start_at', 'session_event_type', 'type', 'session_touch_type'] %}\n -- as of the patch release of dbt-utils v0.7.3, the snowflake uppercasing is not needed anymore so we have deleted the snowflake conditional in the exclusion\n\n select \n {{ dbt_utils.star(from=ref('int_klaviyo__event_attribution'), except=exclude_fields) }},\n\n type, -- need to pull this out because it gets removed by dbt_utils.star, due to being a substring of 'session_event_type' and 'session_touch_type'\n\n -- split out campaign and flow IDs\n case \n when session_touch_type = 'campaign' then last_touch_id \n else null end as last_touch_campaign_id,\n case \n when session_touch_type = 'flow' then last_touch_id \n else null end as last_touch_flow_id,\n\n -- only make these non-null if the event indeed qualified for attribution\n case \n when last_touch_id is not null then session_start_at \n else null end as last_touch_at,\n case \n when last_touch_id is not null then session_event_type \n else null end as last_touch_event_type,\n case \n when last_touch_id is not null then session_touch_type \n else null end as last_touch_type -- flow vs campaign\n\n \n from events\n),\n\ncampaign as (\n\n select *\n from {{ var('campaign') }}\n),\n\nflow as (\n\n select *\n from {{ var('flow') }}\n),\n\nperson as (\n\n select *\n from {{ var('person') }}\n),\n\n-- just pulling this to join with INTEGRATION\nmetric as (\n\n select *\n from {{ var('metric') }}\n),\n\nintegration as (\n\n select *\n from {{ var('integration') }}\n),\n\njoin_fields as (\n\n select\n event_fields.*,\n campaign.campaign_name,\n campaign.campaign_type,\n campaign.subject as campaign_subject_line,\n flow.flow_name, \n person.city as person_city,\n person.country as person_country,\n person.region as person_region,\n person.email as person_email,\n person.timezone as person_timezone,\n integration.integration_name,\n integration.category as integration_category\n\n from event_fields\n left join campaign on (\n event_fields.last_touch_campaign_id = campaign.campaign_id\n and\n event_fields.source_relation = campaign.source_relation\n )\n left join flow on (\n event_fields.last_touch_flow_id = flow.flow_id\n and\n event_fields.source_relation = flow.source_relation \n )\n left join person on (\n event_fields.person_id = person.person_id\n and\n event_fields.source_relation = person.source_relation\n )\n left join metric on (\n event_fields.metric_id = metric.metric_id\n and\n event_fields.source_relation = metric.source_relation\n )\n left join integration on (\n metric.integration_id = integration.integration_id\n and\n metric.source_relation = integration.source_relation\n )\n)\n\nselect * from join_fields", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt.is_incremental", "macro.dbt_utils.star"], "nodes": ["model.klaviyo.int_klaviyo__event_attribution", "model.klaviyo.int_klaviyo__event_attribution", "model.klaviyo_source.stg_klaviyo__campaign", "model.klaviyo_source.stg_klaviyo__flow", "model.klaviyo_source.stg_klaviyo__person", "model.klaviyo_source.stg_klaviyo__metric", "model.klaviyo_source.stg_klaviyo__integration"]}, "config": {"enabled": true, "alias": null, "schema": "klaviyo", "database": null, "tags": [], "meta": {}, "materialized": "incremental", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": "unique_event_id", "on_schema_change": "ignore", "grants": {}, "partition_by": {"field": "occurred_on", "data_type": "date"}, "incremental_strategy": "merge", "file_format": "delta", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_klaviyo", "fqn": ["klaviyo", "klaviyo__events"], "unique_id": "model.klaviyo.klaviyo__events", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "klaviyo__events.sql", "original_file_path": "models/klaviyo__events.sql", "name": "klaviyo__events", "alias": "klaviyo__events", "checksum": {"name": "sha256", "checksum": "57d9d0880b095c3d94680250844b52ad63a63755b2b25870f6ba491933308951"}, "tags": [], "refs": [["int_klaviyo__event_attribution"], ["int_klaviyo__event_attribution"], ["stg_klaviyo__campaign"], ["stg_klaviyo__flow"], ["stg_klaviyo__person"], ["stg_klaviyo__metric"], ["stg_klaviyo__integration"]], "sources": [], "metrics": [], "description": "Table of Klaviyo events, enriched with attribution data (see `int_klaviyo__event_attribution` for details), and information regarding the event's associated user, flow, campaign, and platform/integration. \nNote: this model has an incremental materialization. Custom event-columns specified by the `klaviyo__event_pass_through_columns` variable will appear here as well.\n", "columns": {"variation_id": {"name": "variation_id", "description": "Unique ID of the attributed flow or campaign variation group. This does not map onto another table. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Foreign key referencing the CAMPAIGN that the event is attributed to.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "occurred_at": {"name": "occurred_at", "description": "Timestamp of when the event was triggered.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_id": {"name": "flow_id", "description": "Foreign key referencing the FLOW that the event is attributed to.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_message_id": {"name": "flow_message_id", "description": "Unique ID of the FLOW_MESSAGE that the event is attributed to. This does not map onto another table.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "event_id": {"name": "event_id", "description": "Unique ID of the event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "metric_id": {"name": "metric_id", "description": "Foreign key referencing the metric being captured.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "person_id": {"name": "person_id", "description": "Foreign key referencing the PERSON who triggered the event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "type": {"name": "type", "description": "Type of event that was triggered. This is the same as the METRIC name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "uuid": {"name": "uuid", "description": "Universally Unique Identifier of the event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "numeric_value": {"name": "numeric_value", "description": "Numeric value associated with the event (ie the dollars associated with a purchase).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "touch_type": {"name": "touch_type", "description": "Type of touch/message that the event itself is already attributed to in Klaviyo. Either 'flow', 'campaign', or null. Note that the package will refer to campaign and flow interactions as \"touches\".\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "occurred_on": {"name": "occurred_on", "description": "Calendar date (UTC) on which the event occurred.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "touch_id": {"name": "touch_id", "description": "Coalescing of the Klaviyo-attributed campaign_id and flow_id.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_at": {"name": "last_touch_at", "description": "Timestamp of when, relative to the current event, this person last interacted with a campaign or flow according to Klaviyo. This will be null if the event is not attributed to any flow or campaign. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_event_type": {"name": "last_touch_event_type", "description": "The type of event through which, relative to the current event, the person last interacted with a campaign or flow. This information is used to determine which lookback window to use (email vs sms). This will be null if the event is not attributed to any flow or campaign.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_type": {"name": "last_touch_type", "description": "What kind of touch the event was attributed to by the package -- 'campaign', 'flow', or null.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_campaign_id": {"name": "last_touch_campaign_id", "description": "Foreign key referencing the CAMPAIGN that the event is attributed to by the package.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_flow_id": {"name": "last_touch_flow_id", "description": "Foreign key referencing the FLOW that the event is attributed to by the package.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_name": {"name": "campaign_name", "description": "A name for this campaign. If not specified, this will default to the subject of the campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_type": {"name": "campaign_type", "description": "Type of campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_subject_line": {"name": "campaign_subject_line", "description": "Type of campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_name": {"name": "flow_name", "description": "Name of the flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "person_city": {"name": "person_city", "description": "City that the person who triggered this event lives in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "person_country": {"name": "person_country", "description": "Country that the person who triggered this event lives in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "person_region": {"name": "person_region", "description": "Region or state that the person who triggered this event lives in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "person_email": {"name": "person_email", "description": "The email address and the unique identifier for the person who triggered the event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "person_timezone": {"name": "person_timezone", "description": "Timezone that the person who triggered this event is situated in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "integration_name": {"name": "integration_name", "description": "Name of the platform that triggered the event (either Klaviyo, the API, or another integration).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "integration_category": {"name": "integration_category", "description": "Use-case category of the platform that sent the event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "UTC Timestamp that indicates the start time of the Fivetran job that synced this event row.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "unique_event_id": {"name": "unique_event_id", "description": "The unique identifier for the combination of event_id and source_relation columns.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_relation": {"name": "source_relation", "description": "The source where this data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioining together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "klaviyo://models/klaviyo.yml", "compiled_path": "target/compiled/klaviyo/models/klaviyo__events.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "incremental", "schema": "klaviyo", "unique_key": "unique_event_id", "partition_by": {"field": "occurred_on", "data_type": "date"}, "incremental_strategy": "merge", "file_format": "delta"}, "created_at": 1665702405.185419, "compiled_sql": "\n-- ^ the incremental strategy is split into delete+insert for snowflake since there is a bit of\n-- overlap in transformed data blocks for incremental runs (we look back an extra hour, see lines 23 - 30)\n-- this configuration solution was taken from https://docs.getdbt.com/reference/resource-configs/snowflake-configs#merge-behavior-incremental-models\n\nwith events as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_int_klaviyo`.`int_klaviyo__event_attribution`\n\n \n),\n\nevent_fields as (\n\n -- excluding some fields to rename them and/or make them null if needed\n \n -- as of the patch release of dbt-utils v0.7.3, the snowflake uppercasing is not needed anymore so we have deleted the snowflake conditional in the exclusion\n\n select \n *,\n\n type, -- need to pull this out because it gets removed by dbt_utils.star, due to being a substring of 'session_event_type' and 'session_touch_type'\n\n -- split out campaign and flow IDs\n case \n when session_touch_type = 'campaign' then last_touch_id \n else null end as last_touch_campaign_id,\n case \n when session_touch_type = 'flow' then last_touch_id \n else null end as last_touch_flow_id,\n\n -- only make these non-null if the event indeed qualified for attribution\n case \n when last_touch_id is not null then session_start_at \n else null end as last_touch_at,\n case \n when last_touch_id is not null then session_event_type \n else null end as last_touch_event_type,\n case \n when last_touch_id is not null then session_touch_type \n else null end as last_touch_type -- flow vs campaign\n\n \n from events\n),\n\ncampaign as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__campaign`\n),\n\nflow as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__flow`\n),\n\nperson as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__person`\n),\n\n-- just pulling this to join with INTEGRATION\nmetric as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__metric`\n),\n\nintegration as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__integration`\n),\n\njoin_fields as (\n\n select\n event_fields.*,\n campaign.campaign_name,\n campaign.campaign_type,\n campaign.subject as campaign_subject_line,\n flow.flow_name, \n person.city as person_city,\n person.country as person_country,\n person.region as person_region,\n person.email as person_email,\n person.timezone as person_timezone,\n integration.integration_name,\n integration.category as integration_category\n\n from event_fields\n left join campaign on (\n event_fields.last_touch_campaign_id = campaign.campaign_id\n and\n event_fields.source_relation = campaign.source_relation\n )\n left join flow on (\n event_fields.last_touch_flow_id = flow.flow_id\n and\n event_fields.source_relation = flow.source_relation \n )\n left join person on (\n event_fields.person_id = person.person_id\n and\n event_fields.source_relation = person.source_relation\n )\n left join metric on (\n event_fields.metric_id = metric.metric_id\n and\n event_fields.source_relation = metric.source_relation\n )\n left join integration on (\n metric.integration_id = integration.integration_id\n and\n metric.source_relation = integration.source_relation\n )\n)\n\nselect * from join_fields", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_klaviyo`.`klaviyo__events`"}, "model.klaviyo.int_klaviyo__campaign_flow_metrics": {"raw_sql": "with person_campaign_flow as (\n\n select *\n from {{ ref('klaviyo__person_campaign_flow') }}\n),\n\n{%- set pcf_columns = adapter.get_columns_in_relation(ref('klaviyo__person_campaign_flow')) %}\n\n-- aggregating to the campaign/flow - variation level. so a flow with A/B versions will have 2 rows\nagg_metrics as (\n\n select\n last_touch_campaign_id,\n last_touch_flow_id,\n variation_id,\n source_relation,\n count(distinct person_id) as total_count_unique_people,\n min(first_event_at) as first_event_at,\n max(last_event_at) as last_event_at\n \n {% for col in pcf_columns if col.name|lower not in ['last_touch_campaign_id', 'person_id', 'last_touch_flow_id', 'source_relation',\n 'campaign_name', 'flow_name','variation_id', 'first_event_at', 'last_event_at'] %}\n -- sum up any person-level metrics to the flow/campaign level\n , sum( {{ col.name }} ) as {{ col.name }}\n\n {% if 'sum_revenue' not in col.name|lower %} -- only look at 'count' metrics for unique people counts\n -- get unique number of people who did each kind of event\n -- each record in person_campaign_flow is at the person-campaign/flow-variation level, \n -- so we can just sum up 0s and 1s to get totals at the campaign/flow-variation grain.\n , sum(case when {{ col.name }} > 0 then 1 else 0 end) as {{ 'unique_' ~ col.name }}\n\n {% endif %}\n {% endfor -%}\n\n from person_campaign_flow\n group by 1,2,3,4\n)\n\nselect * from agg_metrics", "compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["model.klaviyo.klaviyo__person_campaign_flow", "model.klaviyo.klaviyo__person_campaign_flow"]}, "config": {"enabled": true, "alias": null, "schema": "int_klaviyo", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_int_klaviyo", "fqn": ["klaviyo", "intermediate", "int_klaviyo__campaign_flow_metrics"], "unique_id": "model.klaviyo.int_klaviyo__campaign_flow_metrics", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "intermediate/int_klaviyo__campaign_flow_metrics.sql", "original_file_path": "models/intermediate/int_klaviyo__campaign_flow_metrics.sql", "name": "int_klaviyo__campaign_flow_metrics", "alias": "int_klaviyo__campaign_flow_metrics", "checksum": {"name": "sha256", "checksum": "05f2223e2d8ab2cbcb57045b3008aee2e9c74f1803cb5e3b658b8b92b7b22e9d"}, "tags": [], "refs": [["klaviyo__person_campaign_flow"], ["klaviyo__person_campaign_flow"]], "sources": [], "metrics": [], "description": "Table that draws from the `klaviyo__person_campaign_flow` model to aggregate event metrics to the campaign or flow AND variation grain. A campaign with A/B versions will have 2 records. **Counts** of the unique users and instances of the events, as well as **sums** of the numeric value associated with events (i.e. revenue) will be pivoted out into columns, as configured by the `klaviyo__count_metrics` and `klaviyo__sum_revenue_metrics` variables, respectively. See the dbt_project.yml file for the default metrics used. These columns will be prefixed with `count_`, `unique_count_`, and `sum_revenue_`.\n", "columns": {"last_touch_campaign_id": {"name": "last_touch_campaign_id", "description": "Foreign key referencing the CAMPAIGN attributed with these metrics (by the package's attribution model).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_flow_id": {"name": "last_touch_flow_id", "description": "Foreign key referencing the FLOW attributed with these metrics (by the package's attribution model).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variation_id": {"name": "variation_id", "description": "Unique ID of the attributed flow or campaign variation group. This does not map onto another table. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_count_unique_people": {"name": "total_count_unique_people", "description": "The count of the distinct people that have interacted with this campaign or flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_event_at": {"name": "first_event_at", "description": "Timestamp of the first ever interaction between this campaign/flow and a person.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_event_at": {"name": "last_event_at", "description": "Timestamp of the most recent interaction between this campaign/flow and a person.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_relation": {"name": "source_relation", "description": "The source where this data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioining together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "klaviyo://models/intermediate/int_klaviyo.yml", "compiled_path": "target/compiled/klaviyo/models/intermediate/int_klaviyo__campaign_flow_metrics.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "int_klaviyo"}, "created_at": 1665702405.2199821, "compiled_sql": "with person_campaign_flow as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_klaviyo`.`klaviyo__person_campaign_flow`\n),\n\n-- aggregating to the campaign/flow - variation level. so a flow with A/B versions will have 2 rows\nagg_metrics as (\n\n select\n last_touch_campaign_id,\n last_touch_flow_id,\n variation_id,\n source_relation,\n count(distinct person_id) as total_count_unique_people,\n min(first_event_at) as first_event_at,\n max(last_event_at) as last_event_at\n \n from person_campaign_flow\n group by 1,2,3,4\n)\n\nselect * from agg_metrics", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_int_klaviyo`.`int_klaviyo__campaign_flow_metrics`"}, "model.klaviyo.int_klaviyo__person_metrics": {"raw_sql": "with person_campaign_flow as (\n\n select *\n from {{ ref('klaviyo__person_campaign_flow') }}\n),\n\n{%- set pcf_columns = adapter.get_columns_in_relation(ref('klaviyo__person_campaign_flow')) %}\n\nagg_metrics as (\n\n select\n person_id,\n source_relation,\n count(distinct last_touch_campaign_id) as count_total_campaigns,\n count(distinct last_touch_flow_id) as count_total_flows,\n min(first_event_at) as first_event_at, -- first ever event occurred at\n max(last_event_at) as last_event_at, -- last ever event occurred at\n min(distinct case when last_touch_campaign_id is not null then first_event_at end) as first_campaign_touch_at,\n max(distinct case when last_touch_campaign_id is not null then last_event_at end) as last_campaign_touch_at,\n min(distinct case when last_touch_flow_id is not null then first_event_at end) as first_flow_touch_at,\n max(distinct case when last_touch_flow_id is not null then last_event_at end) as last_flow_touch_at\n\n {% for col in pcf_columns if col.name|lower not in ['last_touch_campaign_id', 'person_id', 'last_touch_flow_id', 'source_relation',\n 'campaign_name', 'flow_name','variation_id', 'first_event_at', 'last_event_at'] %}\n -- sum up any count/sum_revenue metrics -> prefix with `total` since we're pulling out organic sums as well\n , sum( {{ col.name }} ) as {{ 'total_' ~ col.name }}\n\n -- let's pull out the organic (not attributed to a flow or campaign) revenue sums\n {% if 'sum_revenue' in col.name|lower %}\n , sum( case when coalesce(last_touch_campaign_id, last_touch_flow_id) is null then {{ col.name }} else 0 end ) as {{ 'organic_' ~ col.name }}\n {% endif %}\n\n {% endfor -%}\n\n from person_campaign_flow\n group by 1,2\n\n)\n\nselect * from agg_metrics", "compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["model.klaviyo.klaviyo__person_campaign_flow", "model.klaviyo.klaviyo__person_campaign_flow"]}, "config": {"enabled": true, "alias": null, "schema": "int_klaviyo", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_int_klaviyo", "fqn": ["klaviyo", "intermediate", "int_klaviyo__person_metrics"], "unique_id": "model.klaviyo.int_klaviyo__person_metrics", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "intermediate/int_klaviyo__person_metrics.sql", "original_file_path": "models/intermediate/int_klaviyo__person_metrics.sql", "name": "int_klaviyo__person_metrics", "alias": "int_klaviyo__person_metrics", "checksum": {"name": "sha256", "checksum": "a17b4d3bfd7f6a19bc40dc8199f22c30594994645f31cc2bd72280e8ac429259"}, "tags": [], "refs": [["klaviyo__person_campaign_flow"], ["klaviyo__person_campaign_flow"]], "sources": [], "metrics": [], "description": "Table that draws from the `klaviyo__person_campaign_flow` model to aggregate event metrics to the person grain. \n**Counts** of instances of the events and **sums** of the numeric value (i.e. revenue) associated with events (total vs organic/not attributed to flows or campaigns) will be pivoted out into columns, as configured by the `klaviyo__count_metrics` and `klaviyo__sum_revenue_metrics`variables, respectively. See the dbt_project.yml file for the default metrics used. \nThese columns will be prefixed with `total_count_`, `total_sum_revenue_` (organic + attributed), and `organic_sum_revenue_` (not attributed to a campaign or flow). \n", "columns": {"person_id": {"name": "person_id", "description": "Unique ID of the person.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "count_total_campaigns": {"name": "count_total_campaigns", "description": "Count of the number of campaigns this person has interacted with.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "count_total_flows": {"name": "count_total_flows", "description": "Count of the number of flows this person has interacted with.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_event_at": {"name": "first_event_at", "description": "Timestamp of when the user first triggered an event (not limited to campaign and flow interactions).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_event_at": {"name": "last_event_at", "description": "Timestamp of when the user last triggered an event (not limited to campaign and flow interactions).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_campaign_touch_at": {"name": "first_campaign_touch_at", "description": "Timestamp of when the user first interacted with a campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_campaign_touch_at": {"name": "last_campaign_touch_at", "description": "Timestamp of when the user last interacted with a campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_flow_touch_at": {"name": "first_flow_touch_at", "description": "Timestamp of when the user first interacted with a flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_flow_touch_at": {"name": "last_flow_touch_at", "description": "Timestamp of when the user last interacted with a flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_relation": {"name": "source_relation", "description": "The source where this data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioining together multiple sources, this will be an empty string.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "klaviyo://models/intermediate/int_klaviyo.yml", "compiled_path": "target/compiled/klaviyo/models/intermediate/int_klaviyo__person_metrics.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "int_klaviyo"}, "created_at": 1665702405.221685, "compiled_sql": "with person_campaign_flow as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_klaviyo`.`klaviyo__person_campaign_flow`\n),\n\nagg_metrics as (\n\n select\n person_id,\n source_relation,\n count(distinct last_touch_campaign_id) as count_total_campaigns,\n count(distinct last_touch_flow_id) as count_total_flows,\n min(first_event_at) as first_event_at, -- first ever event occurred at\n max(last_event_at) as last_event_at, -- last ever event occurred at\n min(distinct case when last_touch_campaign_id is not null then first_event_at end) as first_campaign_touch_at,\n max(distinct case when last_touch_campaign_id is not null then last_event_at end) as last_campaign_touch_at,\n min(distinct case when last_touch_flow_id is not null then first_event_at end) as first_flow_touch_at,\n max(distinct case when last_touch_flow_id is not null then last_event_at end) as last_flow_touch_at\n\n from person_campaign_flow\n group by 1,2\n\n)\n\nselect * from agg_metrics", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_int_klaviyo`.`int_klaviyo__person_metrics`"}, "model.klaviyo.int_klaviyo__event_attribution": {"raw_sql": "{{\n config(\n materialized='incremental',\n unique_key='unique_event_id',\n partition_by={\n \"field\": \"occurred_on\",\n \"data_type\": \"date\"\n } if target.type == 'bigquery' else none,\n incremental_strategy = 'merge' if target.type not in ('postgres', 'redshift') else 'delete+insert',\n file_format = 'delta'\n )\n}}\n\nwith events as (\n\n select \n *,\n -- no event will be attributed to both a campaign and flow\n coalesce(campaign_id, flow_id) as touch_id,\n case \n when campaign_id is not null then 'campaign' \n when flow_id is not null then 'flow' \n else null end as touch_type -- defintion: touch = interaction with campaign/flow\n\n from {{ var('event_table') }}\n\n {% if is_incremental() %}\n -- grab **ALL** events for users who have any events in this new increment\n where person_id in (\n\n select distinct person_id\n from {{ var('event_table') }}\n\n -- most events (from all kinds of integrations) at least once every hour\n -- https://help.klaviyo.com/hc/en-us/articles/115005253208\n where _fivetran_synced >= cast(coalesce( \n (\n select {{ dbt_utils.dateadd(datepart = 'hour', \n interval = -1,\n from_date_or_timestamp = 'max(_fivetran_synced)' ) }} \n from {{ this }}\n ), '2012-01-01') as {{ dbt_utils.type_timestamp() }} ) -- klaviyo was founded in 2012, so let's default the min date to then\n )\n {% endif %}\n),\n\n-- sessionize events based on attribution eligibility -- is it the right kind of event, and does it have a campaign or flow?\ncreate_sessions as (\n select\n *,\n -- default klaviyo__event_attribution_filter limits attribution-eligible events to to email opens, email clicks, and sms opens\n -- https://help.klaviyo.com/hc/en-us/articles/115005248128\n\n -- events that come with flow/campaign attributions (and are eligible event types) will create new sessions.\n -- non-attributed events that come in afterward will be batched into the same attribution-session\n sum(case when touch_id is not null\n {% if var('klaviyo__eligible_attribution_events') != [] %}\n and lower(type) in {{ \"('\" ~ (var('klaviyo__eligible_attribution_events') | join(\"', '\")) ~ \"')\" }}\n {% endif %}\n then 1 else 0 end) over (\n partition by person_id, source_relation order by occurred_at asc rows between unbounded preceding and current row) as touch_session \n\n from events\n\n),\n\n-- \"session start\" refers to the event in a \"touch session\" that is already attributed with a campaign or flow by Klaviyo\n-- a new event that is attributed with a campaign/flow will trigger a new session, so there will only be one already-attributed event per each session \n-- events that are missing attributions will borrow data from the event that triggered the session, if they are in the lookback window (see `attribute` CTE)\nlast_touches as (\n\n select \n *,\n -- when did the touch session begin?\n min(occurred_at) over(partition by person_id, source_relation, touch_session) as session_start_at,\n\n -- get the kind of metric/event that triggered the attribution session, in order to decide \n -- to use the sms or email lookback value. \n first_value(type) over(\n partition by person_id, source_relation, touch_session order by occurred_at asc rows between unbounded preceding and current row) as session_event_type\n\n from create_sessions\n),\n\nattribute as (\n\n select \n *,\n -- klaviyo uses different lookback windows for email and sms events\n -- default email lookback = 5 days (120 hours) -> https://help.klaviyo.com/hc/en-us/articles/115005248128#conversion-tracking1\n -- default sms lookback: 1 day (24 hours -> https://help.klaviyo.com/hc/en-us/articles/115005248128#sms-conversion-tracking7\n\n coalesce(touch_id, -- use pre-attributed flow/campaign if provided\n case \n when {{ dbt_utils.datediff('session_start_at', 'occurred_at', 'hour') }} <= (\n case \n when lower(session_event_type) like '%sms%' then {{ var('klaviyo__sms_attribution_lookback') }}\n else {{ var('klaviyo__email_attribution_lookback') }} end\n ) -- if the events fall within the lookback window, attribute\n then first_value(touch_id) over (\n partition by person_id, source_relation, touch_session order by occurred_at asc rows between unbounded preceding and current row)\n else null end) as last_touch_id -- session qualified for attribution -> we will call this \"last touch\"\n\n from last_touches \n),\n\nfinal as (\n\n select\n *,\n\n -- get whether the event is attributed to a flow or campaign\n coalesce(touch_type, first_value(touch_type) over(\n partition by person_id, source_relation, touch_session order by occurred_at asc rows between unbounded preceding and current row)) \n\n as session_touch_type -- if the session events qualified for attribution, extract the type of touch they are attributed to\n\n from attribute \n)\n\nselect * from final", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt.is_incremental", "macro.dbt_utils.datediff"], "nodes": ["model.klaviyo_source.stg_klaviyo__event"]}, "config": {"enabled": true, "alias": null, "schema": "int_klaviyo", "database": null, "tags": [], "meta": {}, "materialized": "incremental", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": "unique_event_id", "on_schema_change": "ignore", "grants": {}, "partition_by": {"field": "occurred_on", "data_type": "date"}, "incremental_strategy": "merge", "file_format": "delta", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_int_klaviyo", "fqn": ["klaviyo", "intermediate", "int_klaviyo__event_attribution"], "unique_id": "model.klaviyo.int_klaviyo__event_attribution", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "intermediate/int_klaviyo__event_attribution.sql", "original_file_path": "models/intermediate/int_klaviyo__event_attribution.sql", "name": "int_klaviyo__event_attribution", "alias": "int_klaviyo__event_attribution", "checksum": {"name": "sha256", "checksum": "0f50b3c667fde764eb0671135da6a44202089275d90ab399b5583c33bc71613e"}, "tags": [], "refs": [["stg_klaviyo__event"]], "sources": [], "metrics": [], "description": "Table enriching events with an additional layer of last-touch attribution. Though Klaviyo already performs attribution on events each day, this extra step is necessary, as certain kinds of events/metrics never get attributed to flows or campaigns via Klaviyo's internal model. \nBy default, the package performs attribution [in line with Klaviyo](https://help.klaviyo.com/hc/en-us/articles/115005248128). It considers email opens and clicks, and SMS opens as the events eligible to be credited with conversions. This attribution-eligibility can be configured by the `klaviyo__eligible_attribution_events` variable. Note that this refers to the events eligible to credit campaigns and flows with conversions, _not_ the events eligible to receive attribution (all kinds of events are privy to this).\nSimilar to Klaviyo, the package by default considers the conversion period/lookback window for email events to be 120 hours (5 days) and 24 hours for SMS events. These can be configured through the `klaviyo__email_attribution_lookback` and `klaviyo__sms_attribution_lookback` variables, respectively (in integer-hours).\nNote: this model has an incremental materialization. Custom event-columns specified by the `klaviyo__event_pass_through_columns` variable will appear here as well.\n", "columns": {"variation_id": {"name": "variation_id", "description": "Unique ID of the attributed flow or campaign variation group. This does not map onto another table. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Foreign key referencing the CAMPAIGN that the event is attributed to.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "occurred_at": {"name": "occurred_at", "description": "Timestamp of when the event was triggered.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_id": {"name": "flow_id", "description": "Foreign key referencing the FLOW that the event is attributed to.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_message_id": {"name": "flow_message_id", "description": "Unique ID of the FLOW_MESSAGE that the event is attributed to. This does not map onto another table.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "event_id": {"name": "event_id", "description": "Unique ID of the event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "metric_id": {"name": "metric_id", "description": "Foreign key referencing the metric being captured.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "person_id": {"name": "person_id", "description": "Foreign key referencing the PERSON who triggered the event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "type": {"name": "type", "description": "Type of event that was triggered. This is the same as the METRIC name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "uuid": {"name": "uuid", "description": "Universally Unique Identifier of the event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "numeric_value": {"name": "numeric_value", "description": "Numeric value associated with the event (ie the dollars associated with a purchase).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "touch_type": {"name": "touch_type", "description": "Type of touch/message that the event itself is already attributed to in Klaviyo. Either 'flow', 'campaign', or null. Note that the package will refer to campaign and flow interactions as \"touches\".\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "occurred_on": {"name": "occurred_on", "description": "Calendar date (UTC) on which the event occurred.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "touch_id": {"name": "touch_id", "description": "Coalescing of the Klaviyo-attributed campaign_id and flow_id.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "touch_session": {"name": "touch_session", "description": "ID used to batch an individual person's events into attribution-groups. Each event that comes attributed to a campaign or flow begins a new session/batch, in which the following events without a flow/campaign_id have the same `touch_session` (and may be attributed to the same flow/campaign).\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "session_start_at": {"name": "session_start_at", "description": "Timestamp of when, relative to the current event, this person last interacted with a campaign or flow according to Klaviyo. This is the beginning of the event's touch-session.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "session_event_type": {"name": "session_event_type", "description": "The type of event through which, relative to the current event, the person last interacted with a campaign or flow. This information is used to determine which lookback window to use (email vs sms).\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_id": {"name": "last_touch_id", "description": "The campaign or flow that the package attributed the event to.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_type": {"name": "last_touch_type", "description": "What kind of touch the event was attributed to by the package -- 'campaign', 'flow', or null.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "UTC Timestamp that indicates the start time of the Fivetran job that synced this event row.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "unique_event_id": {"name": "unique_event_id", "description": "The unique identifier for the combination of event_id and source_relation columns.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_relation": {"name": "source_relation", "description": "The source where this data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioining together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "klaviyo://models/intermediate/int_klaviyo.yml", "compiled_path": "target/compiled/klaviyo/models/intermediate/int_klaviyo__event_attribution.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "incremental", "schema": "int_klaviyo", "unique_key": "unique_event_id", "partition_by": {"field": "occurred_on", "data_type": "date"}, "incremental_strategy": "merge", "file_format": "delta"}, "created_at": 1665702405.21888, "compiled_sql": "\n\nwith events as (\n\n select \n *,\n -- no event will be attributed to both a campaign and flow\n coalesce(campaign_id, flow_id) as touch_id,\n case \n when campaign_id is not null then 'campaign' \n when flow_id is not null then 'flow' \n else null end as touch_type -- defintion: touch = interaction with campaign/flow\n\n from `dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__event`\n\n \n),\n\n-- sessionize events based on attribution eligibility -- is it the right kind of event, and does it have a campaign or flow?\ncreate_sessions as (\n select\n *,\n -- default klaviyo__event_attribution_filter limits attribution-eligible events to to email opens, email clicks, and sms opens\n -- https://help.klaviyo.com/hc/en-us/articles/115005248128\n\n -- events that come with flow/campaign attributions (and are eligible event types) will create new sessions.\n -- non-attributed events that come in afterward will be batched into the same attribution-session\n sum(case when touch_id is not null\n \n and lower(type) in ('opened email', 'clicked email', 'clicked sms')\n \n then 1 else 0 end) over (\n partition by person_id, source_relation order by occurred_at asc rows between unbounded preceding and current row) as touch_session \n\n from events\n\n),\n\n-- \"session start\" refers to the event in a \"touch session\" that is already attributed with a campaign or flow by Klaviyo\n-- a new event that is attributed with a campaign/flow will trigger a new session, so there will only be one already-attributed event per each session \n-- events that are missing attributions will borrow data from the event that triggered the session, if they are in the lookback window (see `attribute` CTE)\nlast_touches as (\n\n select \n *,\n -- when did the touch session begin?\n min(occurred_at) over(partition by person_id, source_relation, touch_session) as session_start_at,\n\n -- get the kind of metric/event that triggered the attribution session, in order to decide \n -- to use the sms or email lookback value. \n first_value(type) over(\n partition by person_id, source_relation, touch_session order by occurred_at asc rows between unbounded preceding and current row) as session_event_type\n\n from create_sessions\n),\n\nattribute as (\n\n select \n *,\n -- klaviyo uses different lookback windows for email and sms events\n -- default email lookback = 5 days (120 hours) -> https://help.klaviyo.com/hc/en-us/articles/115005248128#conversion-tracking1\n -- default sms lookback: 1 day (24 hours -> https://help.klaviyo.com/hc/en-us/articles/115005248128#sms-conversion-tracking7\n\n coalesce(touch_id, -- use pre-attributed flow/campaign if provided\n case \n when datetime_diff(\n cast(occurred_at as datetime),\n cast(session_start_at as datetime),\n hour\n ) <= (\n case \n when lower(session_event_type) like '%sms%' then 24\n else 120 end\n ) -- if the events fall within the lookback window, attribute\n then first_value(touch_id) over (\n partition by person_id, source_relation, touch_session order by occurred_at asc rows between unbounded preceding and current row)\n else null end) as last_touch_id -- session qualified for attribution -> we will call this \"last touch\"\n\n from last_touches \n),\n\nfinal as (\n\n select\n *,\n\n -- get whether the event is attributed to a flow or campaign\n coalesce(touch_type, first_value(touch_type) over(\n partition by person_id, source_relation, touch_session order by occurred_at asc rows between unbounded preceding and current row)) \n\n as session_touch_type -- if the session events qualified for attribution, extract the type of touch they are attributed to\n\n from attribute \n)\n\nselect * from final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_int_klaviyo`.`int_klaviyo__event_attribution`"}, "model.shopify.shopify__customer_cohorts": {"raw_sql": "with calendar as (\n\n select *\n from {{ ref('shopify__calendar') }}\n where cast({{ dbt_utils.date_trunc('month','date_day') }} as date) = date_day\n\n), customers as (\n\n select *\n from {{ ref('shopify__customers') }}\n\n), orders as (\n\n select *\n from {{ ref('shopify__orders') }}\n\n), customer_calendar as (\n\n select\n calendar.date_day as date_month,\n customers.customer_id,\n customers.first_order_timestamp,\n customers.source_relation,\n {{ dbt_utils.date_trunc('month', 'first_order_timestamp') }} as cohort_month\n from calendar\n inner join customers\n on cast({{ dbt_utils.date_trunc('month', 'first_order_timestamp') }} as date) <= calendar.date_day\n\n), orders_joined as (\n\n select \n customer_calendar.date_month, \n customer_calendar.customer_id, \n customer_calendar.first_order_timestamp,\n customer_calendar.cohort_month,\n customer_calendar.source_relation,\n coalesce(count(distinct orders.order_id), 0) as order_count_in_month,\n coalesce(sum(orders.order_adjusted_total), 0) as total_price_in_month,\n coalesce(sum(orders.line_item_count), 0) as line_item_count_in_month\n from customer_calendar\n left join orders\n on customer_calendar.customer_id = orders.customer_id\n and customer_calendar.source_relation = orders.source_relation\n and customer_calendar.date_month = cast({{ dbt_utils.date_trunc('month', 'created_timestamp') }} as date)\n group by 1,2,3,4,5\n\n), windows as (\n\n {% set partition_string = 'partition by customer_id, source_relation order by date_month rows between unbounded preceding and current row' %}\n\n select\n *,\n sum(total_price_in_month) over ({{ partition_string }}) as total_price_lifetime,\n sum(order_count_in_month) over ({{ partition_string }}) as order_count_lifetime,\n sum(line_item_count_in_month) over ({{ partition_string }}) as line_item_count_lifetime,\n row_number() over (partition by customer_id, source_relation order by date_month asc) as cohort_month_number\n from orders_joined\n \n), surrogate_key as (\n\n select \n *, \n {{ dbt_utils.surrogate_key(['date_month','customer_id','source_relation']) }} as customer_cohort_id\n from windows\n\n)\n\nselect *\nfrom surrogate_key", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt_utils.date_trunc", "macro.dbt_utils.surrogate_key"], "nodes": ["model.shopify.shopify__calendar", "model.shopify.shopify__customers", "model.shopify.shopify__orders"]}, "config": {"enabled": true, "alias": null, "schema": "shopify", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_shopify", "fqn": ["shopify", "shopify__customer_cohorts"], "unique_id": "model.shopify.shopify__customer_cohorts", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify", "path": "shopify__customer_cohorts.sql", "original_file_path": "models/shopify__customer_cohorts.sql", "name": "shopify__customer_cohorts", "alias": "shopify__customer_cohorts", "checksum": {"name": "sha256", "checksum": "4179fd82cc1aafd2c0e61ad2e4d8d0a2d4a6daf2afbb91a70bc77cc7311cf1aa"}, "tags": [], "refs": [["shopify__calendar"], ["shopify__customers"], ["shopify__orders"]], "sources": [], "metrics": [], "description": "Each record represents a customer's performance in a calendar month.", "columns": {"cohort_month": {"name": "cohort_month", "description": "The month the cohort belongs to, i.e the first month the customer had an order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "cohort_month_number": {"name": "cohort_month_number", "description": "The 'number' of the `date_month` of the record, i.e. how many months from their start month this cohort occurred", "meta": {}, "data_type": null, "quote": null, "tags": []}, "customer_cohort_id": {"name": "customer_cohort_id", "description": "Unique key representing a customer in a given month.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "customer_id": {"name": "customer_id", "description": "The ID of the related customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "date_month": {"name": "date_month", "description": "The calendar month the customer stats relate to.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_order_timestamp": {"name": "first_order_timestamp", "description": "The timestamp of the customer's first order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "line_item_count_in_month": {"name": "line_item_count_in_month", "description": "Number of line items purchased in the `date_month`", "meta": {}, "data_type": null, "quote": null, "tags": []}, "line_item_count_lifetime": {"name": "line_item_count_lifetime", "description": "Number of line items purchased up until and including this `date_month`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_count_in_month": {"name": "order_count_in_month", "description": "Number of orders purchased in the `date_month`", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_count_lifetime": {"name": "order_count_lifetime", "description": "Number of orders purchased up until and including this `date_month`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_price_in_month": {"name": "total_price_in_month", "description": "Total amount (in currency) purchased in the `date_month`", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_price_lifetime": {"name": "total_price_lifetime", "description": "Total amount (in currency) up until and including this `date_month`.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify://models/shopify.yml", "compiled_path": "target/compiled/shopify/models/shopify__customer_cohorts.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "shopify", "materialized": "table"}, "created_at": 1665702405.236348, "compiled_sql": "with calendar as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_shopify`.`shopify__calendar`\n where cast(timestamp_trunc(\n cast(date_day as timestamp),\n month\n ) as date) = date_day\n\n), customers as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_shopify`.`shopify__customers`\n\n), orders as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_shopify`.`shopify__orders`\n\n), customer_calendar as (\n\n select\n calendar.date_day as date_month,\n customers.customer_id,\n customers.first_order_timestamp,\n customers.source_relation,\n timestamp_trunc(\n cast(first_order_timestamp as timestamp),\n month\n ) as cohort_month\n from calendar\n inner join customers\n on cast(timestamp_trunc(\n cast(first_order_timestamp as timestamp),\n month\n ) as date) <= calendar.date_day\n\n), orders_joined as (\n\n select \n customer_calendar.date_month, \n customer_calendar.customer_id, \n customer_calendar.first_order_timestamp,\n customer_calendar.cohort_month,\n customer_calendar.source_relation,\n coalesce(count(distinct orders.order_id), 0) as order_count_in_month,\n coalesce(sum(orders.order_adjusted_total), 0) as total_price_in_month,\n coalesce(sum(orders.line_item_count), 0) as line_item_count_in_month\n from customer_calendar\n left join orders\n on customer_calendar.customer_id = orders.customer_id\n and customer_calendar.source_relation = orders.source_relation\n and customer_calendar.date_month = cast(timestamp_trunc(\n cast(created_timestamp as timestamp),\n month\n ) as date)\n group by 1,2,3,4,5\n\n), windows as (\n\n \n\n select\n *,\n sum(total_price_in_month) over (partition by customer_id, source_relation order by date_month rows between unbounded preceding and current row) as total_price_lifetime,\n sum(order_count_in_month) over (partition by customer_id, source_relation order by date_month rows between unbounded preceding and current row) as order_count_lifetime,\n sum(line_item_count_in_month) over (partition by customer_id, source_relation order by date_month rows between unbounded preceding and current row) as line_item_count_lifetime,\n row_number() over (partition by customer_id, source_relation order by date_month asc) as cohort_month_number\n from orders_joined\n \n), surrogate_key as (\n\n select \n *, \n to_hex(md5(cast(coalesce(cast(date_month as \n string\n), '') || '-' || coalesce(cast(customer_id as \n string\n), '') || '-' || coalesce(cast(source_relation as \n string\n), '') as \n string\n))) as customer_cohort_id\n from windows\n\n)\n\nselect *\nfrom surrogate_key", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_shopify`.`shopify__customer_cohorts`"}, "model.shopify.shopify__orders": {"raw_sql": "with orders as (\n\n select *\n from {{ var('shopify_order') }}\n\n), order_lines as (\n\n select *\n from {{ ref('shopify__orders__order_line_aggregates') }}\n\n{% if var('shopify__using_order_adjustment', true) %}\n), order_adjustments as (\n\n select *\n from {{ var('shopify_order_adjustment') }}\n\n), order_adjustments_aggregates as (\n select\n order_id,\n source_relation,\n sum(amount) as order_adjustment_amount,\n sum(tax_amount) as order_adjustment_tax_amount\n from order_adjustments\n group by 1,2\n{% endif %}\n\n{% if fivetran_utils.enabled_vars(vars=[\"shopify__using_order_line_refund\", \"shopify__using_refund\"]) %}\n), refunds as (\n\n select *\n from {{ ref('shopify__orders__order_refunds') }}\n\n), refund_aggregates as (\n select\n order_id,\n source_relation,\n sum(subtotal) as refund_subtotal,\n sum(total_tax) as refund_total_tax\n from refunds\n group by 1,2\n{% endif %}\n\n), joined as (\n\n select\n orders.*,\n coalesce(cast({{ fivetran_utils.json_parse(\"total_shipping_price_set\",[\"shop_money\",\"amount\"]) }} as {{ dbt_utils.type_float() }}) ,0) as shipping_cost,\n \n {% if var('shopify__using_order_adjustment', true) %}\n order_adjustments_aggregates.order_adjustment_amount,\n order_adjustments_aggregates.order_adjustment_tax_amount,\n {% endif %}\n\n {% if fivetran_utils.enabled_vars(vars=[\"shopify__using_order_line_refund\", \"shopify__using_refund\"]) %}\n refund_aggregates.refund_subtotal,\n refund_aggregates.refund_total_tax,\n {% endif %}\n (orders.total_price\n {% if var('shopify__using_order_adjustment', true) %}\n + coalesce(order_adjustments_aggregates.order_adjustment_amount,0) + coalesce(order_adjustments_aggregates.order_adjustment_tax_amount,0) \n {% endif %}\n {% if fivetran_utils.enabled_vars(vars=[\"shopify__using_order_line_refund\", \"shopify__using_refund\"]) %}\n - coalesce(refund_aggregates.refund_subtotal,0) - coalesce(refund_aggregates.refund_total_tax,0)\n {% endif %} ) as order_adjusted_total,\n order_lines.line_item_count\n from orders\n left join order_lines\n on orders.order_id = order_lines.order_id\n and orders.source_relation = order_lines.source_relation\n\n {% if fivetran_utils.enabled_vars(vars=[\"shopify__using_order_line_refund\", \"shopify__using_refund\"]) %}\n left join refund_aggregates\n on orders.order_id = refund_aggregates.order_id\n and orders.source_relation = refund_aggregates.source_relation\n {% endif %}\n {% if var('shopify__using_order_adjustment', true) %}\n left join order_adjustments_aggregates\n on orders.order_id = order_adjustments_aggregates.order_id\n and orders.source_relation = order_adjustments_aggregates.source_relation\n {% endif %}\n\n), windows as (\n\n select \n *,\n row_number() over (partition by customer_id, source_relation order by created_timestamp) as customer_order_seq_number\n from joined\n\n), new_vs_repeat as (\n\n select \n *,\n case \n when customer_order_seq_number = 1 then 'new'\n else 'repeat'\n end as new_vs_repeat\n from windows\n\n)\n\nselect *\nfrom new_vs_repeat", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.json_parse", "macro.dbt_utils.type_float"], "nodes": ["model.shopify_source.stg_shopify__order", "model.shopify.shopify__orders__order_line_aggregates", "model.shopify_source.stg_shopify__order_adjustment", "model.shopify.shopify__orders__order_refunds"]}, "config": {"enabled": true, "alias": null, "schema": "shopify", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_shopify", "fqn": ["shopify", "shopify__orders"], "unique_id": "model.shopify.shopify__orders", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify", "path": "shopify__orders.sql", "original_file_path": "models/shopify__orders.sql", "name": "shopify__orders", "alias": "shopify__orders", "checksum": {"name": "sha256", "checksum": "314b165b27050181ab0f5a6e4bcd722c3f6918af348f575dd942f4c6aee4eb0c"}, "tags": [], "refs": [["stg_shopify__order"], ["shopify__orders__order_line_aggregates"], ["stg_shopify__order_adjustment"], ["shopify__orders__order_refunds"]], "sources": [], "metrics": [], "description": "Each record represents an order in Shopify.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "app_id": {"name": "app_id", "description": "The ID of the app that created the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_address_1": {"name": "billing_address_address_1", "description": "The street address of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_address_2": {"name": "billing_address_address_2", "description": "An optional additional field for the street address of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_city": {"name": "billing_address_city", "description": "The city, town, or village of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_company": {"name": "billing_address_company", "description": "The company of the person associated with the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_country": {"name": "billing_address_country", "description": "The name of the country of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_country_code": {"name": "billing_address_country_code", "description": "The two-letter code (ISO 3166-1 format) for the country of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_first_name": {"name": "billing_address_first_name", "description": "The first name of the person associated with the payment method.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_last_name": {"name": "billing_address_last_name", "description": "The last name of the person associated with the payment method.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_latitude": {"name": "billing_address_latitude", "description": "The latitude of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_longitude": {"name": "billing_address_longitude", "description": "The longitude of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_name": {"name": "billing_address_name", "description": "The full name of the person associated with the payment method.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_phone": {"name": "billing_address_phone", "description": "The phone number at the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_province": {"name": "billing_address_province", "description": "The name of the region (province, state, prefecture, \u2026) of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_province_code": {"name": "billing_address_province_code", "description": "The two-letter abbreviation of the region of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_zip": {"name": "billing_address_zip", "description": "The postal code (zip, postcode, Eircode, \u2026) of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "browser_ip": {"name": "browser_ip", "description": "The IP address of the browser used by the customer when they placed the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "has_buyer_accepted_marketing": {"name": "has_buyer_accepted_marketing", "description": "Whether the customer consented to receive email updates from the shop.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "cancel_reason": {"name": "cancel_reason", "description": "The reason why the order was canceled.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "cancelled_timestamp": {"name": "cancelled_timestamp", "description": "The date and time when the order was canceled.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "cart_token": {"name": "cart_token", "description": "The ID of the cart that's associated with the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "closed_timestamp": {"name": "closed_timestamp", "description": "The date and time when the order was closed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_timestamp": {"name": "created_timestamp", "description": "The autogenerated date and time when the order was created in Shopify.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "The three-letter code for the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "customer_id": {"name": "customer_id", "description": "The ID of the order's customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email": {"name": "email", "description": "The customer's email address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "financial_status": {"name": "financial_status", "description": "The status of payments associated with the order. Can only be set when the order is created", "meta": {}, "data_type": null, "quote": null, "tags": []}, "fulfillment_status": {"name": "fulfillment_status", "description": "The order's status in terms of fulfilled line items.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_id": {"name": "order_id", "description": "The ID of the order, used for API purposes. This is different from the order_number property, which is the ID used by the shop owner and customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "landing_site_base_url": {"name": "landing_site_base_url", "description": "The URL for the page where the buyer landed when they entered the shop.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "location_id": {"name": "location_id", "description": "The ID of the physical location where the order was processed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "name": {"name": "name", "description": "The order name, generated by combining the order_number property with the order prefix and suffix that are set in the merchant's general settings.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "note": {"name": "note", "description": "An optional note that a shop owner can attach to the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "number": {"name": "number", "description": "The order's position in the shop's count of orders. Numbers are sequential and start at 1.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_number": {"name": "order_number", "description": "The order 's position in the shop's count of orders starting at 1001. Order numbers are sequential and start at 1001.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "processed_timestamp": {"name": "processed_timestamp", "description": "The date and time when an order was processed. This value is the date that appears on your orders and that's used in the analytic reports.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "processing_method": {"name": "processing_method", "description": "How the payment was processed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "referring_site": {"name": "referring_site", "description": "The website where the customer clicked a link to the shop.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_address_1": {"name": "shipping_address_address_1", "description": "The street address of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_address_2": {"name": "shipping_address_address_2", "description": "An optional additional field for the street address of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_city": {"name": "shipping_address_city", "description": "The city, town, or village of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_company": {"name": "shipping_address_company", "description": "The company of the person associated with the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_country": {"name": "shipping_address_country", "description": "The name of the country of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_country_code": {"name": "shipping_address_country_code", "description": "The two-letter code (ISO 3166-1 format) for the country of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_first_name": {"name": "shipping_address_first_name", "description": "The first name of the person associated with the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_last_name": {"name": "shipping_address_last_name", "description": "The last name of the person associated with the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_latitude": {"name": "shipping_address_latitude", "description": "The latitude of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_longitude": {"name": "shipping_address_longitude", "description": "The longitude of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_name": {"name": "shipping_address_name", "description": "The full name of the person associated with the payment method.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_phone": {"name": "shipping_address_phone", "description": "The phone number at the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_province": {"name": "shipping_address_province", "description": "The name of the region (province, state, prefecture, \u2026) of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_province_code": {"name": "shipping_address_province_code", "description": "The two-letter abbreviation of the region of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_zip": {"name": "shipping_address_zip", "description": "The postal code (zip, postcode, Eircode, \u2026) of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_name": {"name": "source_name", "description": "Where the order originated. Can be set only during order creation, and is not writeable afterwards.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "subtotal_price": {"name": "subtotal_price", "description": "The price of the order in the shop currency after discounts but before shipping, taxes, and tips.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "has_taxes_included": {"name": "has_taxes_included", "description": "Whether taxes are included in the order subtotal.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_test_order": {"name": "is_test_order", "description": "Whether this is a test order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "token": {"name": "token", "description": "A unique token for the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_discounts": {"name": "total_discounts", "description": "The total discounts applied to the price of the order in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_line_items_price": {"name": "total_line_items_price", "description": "The sum of all line item prices in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_price": {"name": "total_price", "description": "The sum of all line item prices, discounts, shipping, taxes, and tips in the shop currency. Must be positive.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_tax": {"name": "total_tax", "description": "The sum of all the taxes applied to the order in th shop currency. Must be positive).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_weight": {"name": "total_weight", "description": "The sum of all line item weights in grams.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_timestamp": {"name": "updated_timestamp", "description": "The date and time (ISO 8601 format) when the order was last modified.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "user_id": {"name": "user_id", "description": "The ID of the user logged into Shopify POS who processed the order, if applicable.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "line_item_count": {"name": "line_item_count", "description": "Number of line items included in the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "customer_order_seq_number": {"name": "customer_order_seq_number", "description": "The sequential number of the order as it relates to the customer", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_vs_repeat": {"name": "new_vs_repeat", "description": "Whether the order was a new or repeat order for the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_cost": {"name": "shipping_cost", "description": "The shipping cost of the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_adjustment_amount": {"name": "order_adjustment_amount", "description": "Total adjustment amount applied to the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_adjustment_tax_amount": {"name": "order_adjustment_tax_amount", "description": "Total tax applied to the adjustment on the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refund_subtotal": {"name": "refund_subtotal", "description": "Total refund amount applied to the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refund_total_tax": {"name": "refund_total_tax", "description": "Total tax applied to the refund on the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_adjusted_total": {"name": "order_adjusted_total", "description": "Order total adjusted for refunds and other adjustments. The calculation used for this field is as follows: total price listed on the original order (including shipping costs and discounts) + adjustments + adjustments tax - total refunds - refunds tax The order_adjusted_total will equate to the total sales - refunds listed within the transactions table for the order (after currency exchange).\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "index": {"name": "index", "description": "Field representing the index of the order line in relation to the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "pre_tax_price": {"name": "pre_tax_price", "description": "The pre tax price of the order line.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "checkout_token": {"name": "checkout_token", "description": "The checkout token applied to the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_shipping_price_set": {"name": "total_shipping_price_set", "description": "The total shipping price set to the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify://models/shopify.yml", "compiled_path": "target/compiled/shopify/models/shopify__orders.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "shopify", "materialized": "table"}, "created_at": 1665702405.246819, "compiled_sql": "with __dbt__cte__shopify__orders__order_line_aggregates as (\nwith order_line as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__order_line`\n\n), aggregated as (\n\n select \n order_id,\n source_relation,\n count(*) as line_item_count\n from order_line\n group by 1,2\n\n)\n\nselect *\nfrom aggregated\n), __dbt__cte__shopify__orders__order_refunds as (\n\n\nwith refunds as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__refund`\n\n), order_line_refunds as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__order_line_refund`\n \n), refund_join as (\n\n select \n refunds.refund_id,\n refunds.created_at,\n refunds.order_id,\n refunds.user_id,\n refunds.source_relation,\n order_line_refunds.order_line_refund_id,\n order_line_refunds.order_line_id,\n order_line_refunds.restock_type,\n order_line_refunds.quantity,\n order_line_refunds.subtotal,\n order_line_refunds.total_tax\n from refunds\n left join order_line_refunds\n on refunds.refund_id = order_line_refunds.refund_id\n and refunds.source_relation = order_line_refunds.source_relation\n\n)\n\nselect *\nfrom refund_join\n),orders as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__order`\n\n), order_lines as (\n\n select *\n from __dbt__cte__shopify__orders__order_line_aggregates\n\n\n), order_adjustments as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__order_adjustment`\n\n), order_adjustments_aggregates as (\n select\n order_id,\n source_relation,\n sum(amount) as order_adjustment_amount,\n sum(tax_amount) as order_adjustment_tax_amount\n from order_adjustments\n group by 1,2\n\n\n\n), refunds as (\n\n select *\n from __dbt__cte__shopify__orders__order_refunds\n\n), refund_aggregates as (\n select\n order_id,\n source_relation,\n sum(subtotal) as refund_subtotal,\n sum(total_tax) as refund_total_tax\n from refunds\n group by 1,2\n\n\n), joined as (\n\n select\n orders.*,\n coalesce(cast(\n\n \n json_extract_scalar(total_shipping_price_set, '$.shop_money.amount')\n\n as \n float64\n) ,0) as shipping_cost,\n \n \n order_adjustments_aggregates.order_adjustment_amount,\n order_adjustments_aggregates.order_adjustment_tax_amount,\n \n\n \n refund_aggregates.refund_subtotal,\n refund_aggregates.refund_total_tax,\n \n (orders.total_price\n \n + coalesce(order_adjustments_aggregates.order_adjustment_amount,0) + coalesce(order_adjustments_aggregates.order_adjustment_tax_amount,0) \n \n \n - coalesce(refund_aggregates.refund_subtotal,0) - coalesce(refund_aggregates.refund_total_tax,0)\n ) as order_adjusted_total,\n order_lines.line_item_count\n from orders\n left join order_lines\n on orders.order_id = order_lines.order_id\n and orders.source_relation = order_lines.source_relation\n\n \n left join refund_aggregates\n on orders.order_id = refund_aggregates.order_id\n and orders.source_relation = refund_aggregates.source_relation\n \n \n left join order_adjustments_aggregates\n on orders.order_id = order_adjustments_aggregates.order_id\n and orders.source_relation = order_adjustments_aggregates.source_relation\n \n\n), windows as (\n\n select \n *,\n row_number() over (partition by customer_id, source_relation order by created_timestamp) as customer_order_seq_number\n from joined\n\n), new_vs_repeat as (\n\n select \n *,\n case \n when customer_order_seq_number = 1 then 'new'\n else 'repeat'\n end as new_vs_repeat\n from windows\n\n)\n\nselect *\nfrom new_vs_repeat", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.shopify.shopify__orders__order_line_aggregates", "sql": " __dbt__cte__shopify__orders__order_line_aggregates as (\nwith order_line as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__order_line`\n\n), aggregated as (\n\n select \n order_id,\n source_relation,\n count(*) as line_item_count\n from order_line\n group by 1,2\n\n)\n\nselect *\nfrom aggregated\n)"}, {"id": "model.shopify.shopify__orders__order_refunds", "sql": " __dbt__cte__shopify__orders__order_refunds as (\n\n\nwith refunds as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__refund`\n\n), order_line_refunds as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__order_line_refund`\n \n), refund_join as (\n\n select \n refunds.refund_id,\n refunds.created_at,\n refunds.order_id,\n refunds.user_id,\n refunds.source_relation,\n order_line_refunds.order_line_refund_id,\n order_line_refunds.order_line_id,\n order_line_refunds.restock_type,\n order_line_refunds.quantity,\n order_line_refunds.subtotal,\n order_line_refunds.total_tax\n from refunds\n left join order_line_refunds\n on refunds.refund_id = order_line_refunds.refund_id\n and refunds.source_relation = order_line_refunds.source_relation\n\n)\n\nselect *\nfrom refund_join\n)"}], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_shopify`.`shopify__orders`"}, "model.shopify.shopify__products": {"raw_sql": "with products as (\n\n select *\n from {{ var('shopify_product') }}\n\n), order_lines as (\n\n select *\n from {{ ref('shopify__order_lines') }}\n\n), orders as (\n\n select *\n from {{ ref('shopify__orders')}}\n\n), order_lines_aggregated as (\n\n select \n order_lines.product_id, \n order_lines.source_relation,\n sum(order_lines.quantity) as quantity_sold,\n sum(order_lines.pre_tax_price) as subtotal_sold,\n\n {% if fivetran_utils.enabled_vars(vars=[\"shopify__using_order_line_refund\", \"shopify__using_refund\"]) %}\n sum(order_lines.quantity_net_refunds) as quantity_sold_net_refunds,\n sum(order_lines.subtotal_net_refunds) as subtotal_sold_net_refunds,\n {% endif %}\n\n min(orders.created_timestamp) as first_order_timestamp,\n max(orders.created_timestamp) as most_recent_order_timestamp\n from order_lines\n left join orders\n using (order_id, source_relation)\n group by 1,2\n\n), joined as (\n\n select\n products.*,\n coalesce(order_lines_aggregated.quantity_sold,0) as quantity_sold,\n coalesce(order_lines_aggregated.subtotal_sold,0) as subtotal_sold,\n\n {% if fivetran_utils.enabled_vars(vars=[\"shopify__using_order_line_refund\", \"shopify__using_refund\"]) %}\n coalesce(order_lines_aggregated.quantity_sold_net_refunds,0) as quantity_sold_net_refunds,\n coalesce(order_lines_aggregated.subtotal_sold_net_refunds,0) as subtotal_sold_net_refunds,\n {% endif %}\n \n order_lines_aggregated.first_order_timestamp,\n order_lines_aggregated.most_recent_order_timestamp\n from products\n left join order_lines_aggregated\n using (product_id, source_relation)\n\n)\n\nselect *\nfrom joined", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars"], "nodes": ["model.shopify_source.stg_shopify__product", "model.shopify.shopify__order_lines", "model.shopify.shopify__orders"]}, "config": {"enabled": true, "alias": null, "schema": "shopify", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_shopify", "fqn": ["shopify", "shopify__products"], "unique_id": "model.shopify.shopify__products", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify", "path": "shopify__products.sql", "original_file_path": "models/shopify__products.sql", "name": "shopify__products", "alias": "shopify__products", "checksum": {"name": "sha256", "checksum": "e699f3d418cc215e557b5a7ad0705f82470c62c8b54b3fbb29a2896c507ba033"}, "tags": [], "refs": [["stg_shopify__product"], ["shopify__order_lines"], ["shopify__orders"]], "sources": [], "metrics": [], "description": "Each record represents a product in Shopify.", "columns": {"_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Whether the record has been deleted in the source system.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_timestamp": {"name": "created_timestamp", "description": "The date and time when the product was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "handle": {"name": "handle", "description": "A unique human-friendly string for the product. Automatically generated from the product's title.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "product_id": {"name": "product_id", "description": "An unsigned 64-bit integer that's used as a unique identifier for the product. Each id is unique across the Shopify system. No two products will have the same id, even if they're from different shops.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "product_type": {"name": "product_type", "description": "A categorization for the product used for filtering and searching products.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "published_timestamp": {"name": "published_timestamp", "description": "The date and time (ISO 8601 format) when the product was published. Can be set to null to unpublish the product from the Online Store channel.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "published_scope": {"name": "published_scope", "description": "Whether the product is published to the Point of Sale channel.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "title": {"name": "title", "description": "The name of the product.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_timestamp": {"name": "updated_timestamp", "description": "The date and time when the product was last modified.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "vendor": {"name": "vendor", "description": "The name of the product's vendor.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "quantity_sold": {"name": "quantity_sold", "description": "Quantity of the product sold.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "subtotal_sold": {"name": "subtotal_sold", "description": "Total amount of the product sold.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "quantity_sold_net_refunds": {"name": "quantity_sold_net_refunds", "description": "Quantity of the product sold, excluding refunds.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "subtotal_sold_net_refunds": {"name": "subtotal_sold_net_refunds", "description": "Total amount of the product sold, excluding refunds.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_order_timestamp": {"name": "first_order_timestamp", "description": "The timestamp the product was first ordered.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "most_recent_order_timestamp": {"name": "most_recent_order_timestamp", "description": "The timestamp the product was most recently ordered.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify://models/shopify.yml", "compiled_path": "target/compiled/shopify/models/shopify__products.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "shopify", "materialized": "table"}, "created_at": 1665702405.251936, "compiled_sql": "with products as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__product`\n\n), order_lines as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_shopify`.`shopify__order_lines`\n\n), orders as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_shopify`.`shopify__orders`\n\n), order_lines_aggregated as (\n\n select \n order_lines.product_id, \n order_lines.source_relation,\n sum(order_lines.quantity) as quantity_sold,\n sum(order_lines.pre_tax_price) as subtotal_sold,\n\n \n sum(order_lines.quantity_net_refunds) as quantity_sold_net_refunds,\n sum(order_lines.subtotal_net_refunds) as subtotal_sold_net_refunds,\n \n\n min(orders.created_timestamp) as first_order_timestamp,\n max(orders.created_timestamp) as most_recent_order_timestamp\n from order_lines\n left join orders\n using (order_id, source_relation)\n group by 1,2\n\n), joined as (\n\n select\n products.*,\n coalesce(order_lines_aggregated.quantity_sold,0) as quantity_sold,\n coalesce(order_lines_aggregated.subtotal_sold,0) as subtotal_sold,\n\n \n coalesce(order_lines_aggregated.quantity_sold_net_refunds,0) as quantity_sold_net_refunds,\n coalesce(order_lines_aggregated.subtotal_sold_net_refunds,0) as subtotal_sold_net_refunds,\n \n \n order_lines_aggregated.first_order_timestamp,\n order_lines_aggregated.most_recent_order_timestamp\n from products\n left join order_lines_aggregated\n using (product_id, source_relation)\n\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_shopify`.`shopify__products`"}, "model.shopify.shopify__transactions": {"raw_sql": "with transactions as (\n select *\n from {{ var('shopify_transaction') }}\n\n), exchange_rate as (\n\n select\n *,\n coalesce(cast(nullif({{ fivetran_utils.json_parse(\"receipt\",[\"charges\",\"data\",0,\"balance_transaction\",\"exchange_rate\"]) }}, '') as {{ dbt_utils.type_numeric() }} ),1) as exchange_rate,\n coalesce(cast(nullif({{ fivetran_utils.json_parse(\"receipt\",[\"charges\",\"data\",0,\"balance_transaction\",\"exchange_rate\"]) }}, '') as {{ dbt_utils.type_numeric() }} ),1) * amount as currency_exchange_calculated_amount\n from transactions\n\n)\n\nselect *\nfrom exchange_rate", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.json_parse", "macro.dbt_utils.type_numeric"], "nodes": ["model.shopify_source.stg_shopify__transaction"]}, "config": {"enabled": true, "alias": null, "schema": "shopify", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_shopify", "fqn": ["shopify", "shopify__transactions"], "unique_id": "model.shopify.shopify__transactions", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify", "path": "shopify__transactions.sql", "original_file_path": "models/shopify__transactions.sql", "name": "shopify__transactions", "alias": "shopify__transactions", "checksum": {"name": "sha256", "checksum": "88e4a9aa6d2acc8dbe0e1d3f280087b5adb6a730391785680d0bf112b0923906"}, "tags": [], "refs": [["stg_shopify__transaction"]], "sources": [], "metrics": [], "description": "Each record represents a transaction in Shopify.", "columns": {"transaction_id": {"name": "transaction_id", "description": "The ID for the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_id": {"name": "order_id", "description": "The ID for the order that the transaction is associated with.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refund_id": {"name": "refund_id", "description": "The ID associated with a refund in the refund table.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "amount": {"name": "amount", "description": "The amount of money included in the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "authorization": {"name": "authorization", "description": "The authorization code associated with the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_timestamp": {"name": "created_timestamp", "description": "The date and time when the transaction was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "processed_timestamp": {"name": "processed_timestamp", "description": "The date and time when a transaction was processed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "device_id": {"name": "device_id", "description": "The ID for the device.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "gateway": {"name": "gateway", "description": "The name of the gateway the transaction was issued through.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_name": {"name": "source_name", "description": "The origin of the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "message": {"name": "message", "description": "A string generated by the payment provider with additional information about why the transaction succeeded or failed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "The three-letter code (ISO 4217 format) for the currency used for the payment.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "location_id": {"name": "location_id", "description": "The ID of the physical location where the transaction was processed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "parent_id": {"name": "parent_id", "description": "The ID of an associated transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payment_avs_result_code": {"name": "payment_avs_result_code", "description": "The response code from the address verification system.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payment_credit_card_bin": {"name": "payment_credit_card_bin", "description": "The issuer identification number (IIN), formerly known as bank identification number (BIN) of the customer's credit card.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payment_cvv_result_code": {"name": "payment_cvv_result_code", "description": "The response code from the credit card company indicating whether the customer entered the card security code, or card verification value, correctly.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payment_credit_card_number": {"name": "payment_credit_card_number", "description": "The customer's credit card number, with most of the leading digits redacted.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payment_credit_card_company": {"name": "payment_credit_card_company", "description": "The name of the company that issued the customer's credit card.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "kind": {"name": "kind", "description": "The transaction's type.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "receipt": {"name": "receipt", "description": "A transaction receipt attached to the transaction by the gateway.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency_exchange_id": {"name": "currency_exchange_id", "description": "The ID of the adjustment.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency_exchange_adjustment": {"name": "currency_exchange_adjustment", "description": "The difference between the amounts on the associated transaction and the parent transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency_exchange_original_amount": {"name": "currency_exchange_original_amount", "description": "The amount of the parent transaction in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency_exchange_final_amount": {"name": "currency_exchange_final_amount", "description": "The amount of the associated transaction in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency_exchange_currency": {"name": "currency_exchange_currency", "description": "The shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "error_code": {"name": "error_code", "description": "A standardized error code, independent of the payment provider.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status": {"name": "status", "description": "The status of the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "test": {"name": "test", "description": "Whether the transaction is a test transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "user_id": {"name": "user_id", "description": "The ID for the user who was logged into the Shopify POS device when the order was processed, if applicable.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of the date the record was synced by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "exchange_rate": {"name": "exchange_rate", "description": "The exchange rate between the home currency and the currency of sale at the time of the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency_exchange_calculated_amount": {"name": "currency_exchange_calculated_amount", "description": "The total amount of the transaction with the currency exchange rate applied.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify://models/shopify.yml", "compiled_path": "target/compiled/shopify/models/shopify__transactions.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "shopify", "materialized": "table"}, "created_at": 1665702405.2622888, "compiled_sql": "with transactions as (\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__transaction`\n\n), exchange_rate as (\n\n select\n *,\n coalesce(cast(nullif(\n\n \n json_extract_scalar(receipt, '$.charges.data.0.balance_transaction.exchange_rate')\n\n, '') as \n numeric\n ),1) as exchange_rate,\n coalesce(cast(nullif(\n\n \n json_extract_scalar(receipt, '$.charges.data.0.balance_transaction.exchange_rate')\n\n, '') as \n numeric\n ),1) * amount as currency_exchange_calculated_amount\n from transactions\n\n)\n\nselect *\nfrom exchange_rate", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_shopify`.`shopify__transactions`"}, "model.shopify.shopify__customers": {"raw_sql": "with customers as (\n\n select \n {{ dbt_utils.star(from=ref('stg_shopify__customer'), except=[\"orders_count\", \"total_spent\"]) }}\n from {{ var('shopify_customer') }}\n\n), orders as (\n\n select *\n from {{ ref('shopify__customers__order_aggregates' )}}\n\n), joined as (\n\n select \n customers.*,\n orders.first_order_timestamp,\n orders.most_recent_order_timestamp,\n coalesce(orders.average_order_value, 0) as average_order_value,\n coalesce(orders.lifetime_total_spent, 0) as lifetime_total_spent,\n coalesce(orders.lifetime_total_refunded, 0) as lifetime_total_refunded,\n (coalesce(orders.lifetime_total_spent, 0) - coalesce(orders.lifetime_total_refunded, 0)) as lifetime_total_amount,\n coalesce(orders.lifetime_count_orders, 0) as lifetime_count_orders\n from customers\n left join orders\n using (customer_id, source_relation)\n\n)\n\nselect *\nfrom joined", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": ["model.shopify_source.stg_shopify__customer", "model.shopify_source.stg_shopify__customer", "model.shopify.shopify__customers__order_aggregates"]}, "config": {"enabled": true, "alias": null, "schema": "shopify", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_shopify", "fqn": ["shopify", "shopify__customers"], "unique_id": "model.shopify.shopify__customers", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify", "path": "shopify__customers.sql", "original_file_path": "models/shopify__customers.sql", "name": "shopify__customers", "alias": "shopify__customers", "checksum": {"name": "sha256", "checksum": "70e28dce05bc26f7fc7678928e4bf4ab455d399c6f314f54d3c4671be96d3b7e"}, "tags": [], "refs": [["stg_shopify__customer"], ["stg_shopify__customer"], ["shopify__customers__order_aggregates"]], "sources": [], "metrics": [], "description": "Each record represents a customer in Shopify.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "has_accepted_marketing": {"name": "has_accepted_marketing", "description": "Whether the customer has consented to receive marketing material via email.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_timestamp": {"name": "created_timestamp", "description": "The date and time when the customer was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "default_address_id": {"name": "default_address_id", "description": "The default address for the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email": {"name": "email", "description": "The unique email address of the customer. Attempting to assign the same email address to multiple customers returns an error.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_name": {"name": "first_name", "description": "The customer's first name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "customer_id": {"name": "customer_id", "description": "A unique identifier for the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_name": {"name": "last_name", "description": "The customer's last name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "lifetime_count_orders": {"name": "lifetime_count_orders", "description": "The number of orders associated with this customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "phone": {"name": "phone", "description": "The unique phone number (E.164 format) for this customer. Attempting to assign the same phone number to multiple customers returns an error.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "account_state": {"name": "account_state", "description": "The state of the customer's account with a shop.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_tax_exempt": {"name": "is_tax_exempt", "description": "Whether the customer is exempt from paying taxes on their order. If true, then taxes won't be applied to an order at checkout. If false, then taxes will be applied at checkout.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_timestamp": {"name": "updated_timestamp", "description": "The date and time when the customer information was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_verified_email": {"name": "is_verified_email", "description": "Whether the customer has verified their email address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_order_timestamp": {"name": "first_order_timestamp", "description": "The timestamp the customer completed their first order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "most_recent_order_timestamp": {"name": "most_recent_order_timestamp", "description": "The timestamp the customer completed their most recent order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "average_order_value": {"name": "average_order_value", "description": "The average order value for the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "lifetime_total_spent": {"name": "lifetime_total_spent", "description": "The total amount of money that the customer has spent on orders across their order history.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "lifetime_total_refunded": {"name": "lifetime_total_refunded", "description": "The total amount of money that the customer has been refunded on orders across their order history.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "lifetime_total_amount": {"name": "lifetime_total_amount", "description": "The total amount of money (minus refunds) that the customer has spent across their order history.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify://models/shopify.yml", "compiled_path": "target/compiled/shopify/models/shopify__customers.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "shopify", "materialized": "table"}, "created_at": 1665702405.249553, "compiled_sql": "with __dbt__cte__shopify__customers__order_aggregates as (\nwith orders as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__order`\n\n), transactions as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_shopify`.`shopify__transactions`\n where lower(status) = 'success'\n\n), aggregated as (\n\n select\n orders.customer_id,\n orders.source_relation,\n min(orders.created_timestamp) as first_order_timestamp,\n max(orders.created_timestamp) as most_recent_order_timestamp,\n avg(case when lower(transactions.kind) in ('sale','capture') then transactions.currency_exchange_calculated_amount end) as average_order_value,\n sum(case when lower(transactions.kind) in ('sale','capture') then transactions.currency_exchange_calculated_amount end) as lifetime_total_spent,\n sum(case when lower(transactions.kind) in ('refund') then transactions.currency_exchange_calculated_amount end) as lifetime_total_refunded,\n count(distinct orders.order_id) as lifetime_count_orders\n from orders\n left join transactions\n using (order_id, source_relation)\n where customer_id is not null\n group by 1,2\n\n)\n\nselect *\nfrom aggregated\n),customers as (\n\n select \n *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__customer`\n\n), orders as (\n\n select *\n from __dbt__cte__shopify__customers__order_aggregates\n\n), joined as (\n\n select \n customers.*,\n orders.first_order_timestamp,\n orders.most_recent_order_timestamp,\n coalesce(orders.average_order_value, 0) as average_order_value,\n coalesce(orders.lifetime_total_spent, 0) as lifetime_total_spent,\n coalesce(orders.lifetime_total_refunded, 0) as lifetime_total_refunded,\n (coalesce(orders.lifetime_total_spent, 0) - coalesce(orders.lifetime_total_refunded, 0)) as lifetime_total_amount,\n coalesce(orders.lifetime_count_orders, 0) as lifetime_count_orders\n from customers\n left join orders\n using (customer_id, source_relation)\n\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.shopify.shopify__customers__order_aggregates", "sql": " __dbt__cte__shopify__customers__order_aggregates as (\nwith orders as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__order`\n\n), transactions as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_shopify`.`shopify__transactions`\n where lower(status) = 'success'\n\n), aggregated as (\n\n select\n orders.customer_id,\n orders.source_relation,\n min(orders.created_timestamp) as first_order_timestamp,\n max(orders.created_timestamp) as most_recent_order_timestamp,\n avg(case when lower(transactions.kind) in ('sale','capture') then transactions.currency_exchange_calculated_amount end) as average_order_value,\n sum(case when lower(transactions.kind) in ('sale','capture') then transactions.currency_exchange_calculated_amount end) as lifetime_total_spent,\n sum(case when lower(transactions.kind) in ('refund') then transactions.currency_exchange_calculated_amount end) as lifetime_total_refunded,\n count(distinct orders.order_id) as lifetime_count_orders\n from orders\n left join transactions\n using (order_id, source_relation)\n where customer_id is not null\n group by 1,2\n\n)\n\nselect *\nfrom aggregated\n)"}], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_shopify`.`shopify__customers`"}, "model.shopify.shopify__order_lines": {"raw_sql": "with order_lines as (\n\n select *\n from {{ var('shopify_order_line') }}\n\n), product_variants as (\n\n select *\n from {{ var('shopify_product_variant') }}\n\n{% if fivetran_utils.enabled_vars(vars=[\"shopify__using_order_line_refund\", \"shopify__using_refund\"]) %}\n), refunds as (\n\n select *\n from {{ ref('shopify__orders__order_refunds') }}\n\n), refunds_aggregated as (\n \n select\n order_line_id,\n source_relation,\n sum(quantity) as quantity,\n sum(coalesce(subtotal, 0)) as subtotal\n from refunds\n group by 1,2\n{% endif %}\n\n), joined as (\n\n select\n order_lines.*,\n\n {% if fivetran_utils.enabled_vars(vars=[\"shopify__using_order_line_refund\", \"shopify__using_refund\"]) %}\n coalesce(refunds_aggregated.quantity,0) as refunded_quantity,\n coalesce(refunds_aggregated.subtotal,0) as refunded_subtotal,\n order_lines.quantity - coalesce(refunds_aggregated.quantity,0) as quantity_net_refunds,\n order_lines.pre_tax_price - coalesce(refunds_aggregated.subtotal,0) as subtotal_net_refunds,\n {% endif %}\n \n product_variants.created_timestamp as variant_created_at,\n product_variants.updated_timestamp as variant_updated_at,\n product_variants.inventory_item_id,\n product_variants.image_id,\n product_variants.title as variant_title,\n product_variants.price as variant_price,\n product_variants.sku as variant_sku,\n product_variants.position as variant_position,\n product_variants.inventory_policy as variant_inventory_policy,\n product_variants.compare_at_price as variant_compare_at_price,\n product_variants.fulfillment_service as variant_fulfillment_service,\n product_variants.inventory_management as variant_inventory_management,\n product_variants.is_taxable as variant_is_taxable,\n product_variants.barcode as variant_barcode,\n product_variants.grams as variant_grams,\n product_variants.inventory_quantity as variant_inventory_quantity,\n product_variants.weight as variant_weight,\n product_variants.weight_unit as variant_weight_unit,\n product_variants.option_1 as variant_option_1,\n product_variants.option_2 as variant_option_2,\n product_variants.option_3 as variant_option_3,\n product_variants.tax_code as variant_tax_code,\n product_variants.is_requiring_shipping as variant_is_requiring_shipping\n from order_lines\n {% if fivetran_utils.enabled_vars(vars=[\"shopify__using_order_line_refund\", \"shopify__using_refund\"]) %}\n left join refunds_aggregated\n on refunds_aggregated.order_line_id = order_lines.order_line_id\n and refunds_aggregated.source_relation = order_lines.source_relation\n {% endif %}\n left join product_variants\n on product_variants.variant_id = order_lines.variant_id\n and product_variants.source_relation = order_lines.source_relation\n\n)\n\nselect *\nfrom joined", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars"], "nodes": ["model.shopify_source.stg_shopify__order_line", "model.shopify_source.stg_shopify__product_variant", "model.shopify.shopify__orders__order_refunds"]}, "config": {"enabled": true, "alias": null, "schema": "shopify", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_shopify", "fqn": ["shopify", "shopify__order_lines"], "unique_id": "model.shopify.shopify__order_lines", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify", "path": "shopify__order_lines.sql", "original_file_path": "models/shopify__order_lines.sql", "name": "shopify__order_lines", "alias": "shopify__order_lines", "checksum": {"name": "sha256", "checksum": "c9fa8308e1257375b69ec4b40135a4d1ad64fab1d9e0c14b7a353132438df5d8"}, "tags": [], "refs": [["stg_shopify__order_line"], ["stg_shopify__product_variant"], ["shopify__orders__order_refunds"]], "sources": [], "metrics": [], "description": "Each record represents a line item of an order in Shopify.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "fulfillable_quantity": {"name": "fulfillable_quantity", "description": "The amount available to fulfill, calculated as follows: quantity - max(refunded_quantity, fulfilled_quantity) - pending_fulfilled_quantity - open_fulfilled_quantity", "meta": {}, "data_type": null, "quote": null, "tags": []}, "fulfillment_service": {"name": "fulfillment_service", "description": "The service provider that's fulfilling the item.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "fulfillment_status": {"name": "fulfillment_status", "description": "How far along an order is in terms line items fulfilled.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_gift_card": {"name": "is_gift_card", "description": "Whether the item is a gift card. If true, then the item is not taxed or considered for shipping charges.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "grams": {"name": "grams", "description": "The weight of the item in grams.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_line_id": {"name": "order_line_id", "description": "The ID of the line item.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "name": {"name": "name", "description": "The name of the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_id": {"name": "order_id", "description": "The ID of the related order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "price": {"name": "price", "description": "The price of the item before discounts have been applied in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "product_id": {"name": "product_id", "description": "The ID of the product that the line item belongs to. Can be null if the original product associated with the order is deleted at a later date.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "quantity": {"name": "quantity", "description": "The number of items that were purchased.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_requiring_shipping": {"name": "is_requiring_shipping", "description": "Whether the item requires shipping.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "sku": {"name": "sku", "description": "The item's SKU (stock keeping unit).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_taxable": {"name": "is_taxable", "description": "Whether the item was taxable.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "title": {"name": "title", "description": "The title of the product.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_discount": {"name": "total_discount", "description": "The total amount of the discount allocated to the line item in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_id": {"name": "variant_id", "description": "The ID of the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "vendor": {"name": "vendor", "description": "The name of the item's supplier.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refunded_quantity": {"name": "refunded_quantity", "description": "Quantity of the item that has been refunded.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "quantity_net_refunds": {"name": "quantity_net_refunds", "description": "Quantity ordered, excluding refunds.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_barcode": {"name": "variant_barcode", "description": "The barcode, UPC, or ISBN number for the product.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_compare_at_price": {"name": "variant_compare_at_price", "description": "The original price of the item before an adjustment or a sale.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_created_at": {"name": "variant_created_at", "description": "The date and time (ISO 8601 format) when the product variant was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_fulfillment_service": {"name": "variant_fulfillment_service", "description": "The fulfillment service associated with the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_grams": {"name": "variant_grams", "description": "The weight of the product variant in grams.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_image_id": {"name": "variant_image_id", "description": "The unique numeric identifier for a product's image. The image must be associated to the same product as the variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "inventory_item_id": {"name": "inventory_item_id", "description": "The unique identifier for the inventory item, which is used in the Inventory API to query for inventory information.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_inventory_management": {"name": "variant_inventory_management", "description": "The fulfillment service that tracks the number of items in stock for the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_inventory_policy": {"name": "variant_inventory_policy", "description": "Whether customers are allowed to place an order for the product variant when it's out of stock.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_inventory_quantity": {"name": "variant_inventory_quantity", "description": "An aggregate of inventory across all locations. To adjust inventory at a specific location, use the InventoryLevel resource.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_option_1": {"name": "variant_option_1", "description": "The custom properties that a shop owner uses to define product variants. You can define three options for a product variant: option1, option2, option3.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_option_2": {"name": "variant_option_2", "description": "The custom properties that a shop owner uses to define product variants. You can define three options for a product variant: option1, option2, option3.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_option_3": {"name": "variant_option_3", "description": "The custom properties that a shop owner uses to define product variants. You can define three options for a product variant: option1, option2, option3.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_position": {"name": "variant_position", "description": "The order of the product variant in the list of product variants. The first position in the list is 1. The position of variants is indicated by the order in which they are listed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_price": {"name": "variant_price", "description": "The price of the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_is_requiring_shipping": {"name": "variant_is_requiring_shipping", "description": "This property is deprecated. Use the `requires_shipping` property on the InventoryItem resource instead.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_sku": {"name": "variant_sku", "description": "A unique identifier for the product variant in the shop. Required in order to connect to a FulfillmentService.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_is_taxable": {"name": "variant_is_taxable", "description": "Whether a tax is charged when the product variant is sold.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_title": {"name": "variant_title", "description": "The title of the product variant. The title field is a concatenation of the option1, option2, and option3 fields. You can only update title indirectly using the option fields.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_updated_at": {"name": "variant_updated_at", "description": "The date and time when the product variant was last modified. Gets returned in ISO 8601 format.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_weight": {"name": "variant_weight", "description": "The weight of the product variant in the unit system specified with weight_unit.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_weight_unit": {"name": "variant_weight_unit", "description": "The unit of measurement that applies to the product variant's weight. If you don't specify a value for weight_unit, then the shop's default unit of measurement is applied. Valid values: g, kg, oz, and lb.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refunded_subtotal": {"name": "refunded_subtotal", "description": "Subtotal amount of the refund applied to the order line.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "subtotal_net_refunds": {"name": "subtotal_net_refunds", "description": "Subtotal of the order line with refunds subtracted.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "image_id": {"name": "image_id", "description": "Image id of the product variant associated with the order line.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify://models/shopify.yml", "compiled_path": "target/compiled/shopify/models/shopify__order_lines.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "shopify", "materialized": "table"}, "created_at": 1665702405.257921, "compiled_sql": "with __dbt__cte__shopify__orders__order_refunds as (\n\n\nwith refunds as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__refund`\n\n), order_line_refunds as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__order_line_refund`\n \n), refund_join as (\n\n select \n refunds.refund_id,\n refunds.created_at,\n refunds.order_id,\n refunds.user_id,\n refunds.source_relation,\n order_line_refunds.order_line_refund_id,\n order_line_refunds.order_line_id,\n order_line_refunds.restock_type,\n order_line_refunds.quantity,\n order_line_refunds.subtotal,\n order_line_refunds.total_tax\n from refunds\n left join order_line_refunds\n on refunds.refund_id = order_line_refunds.refund_id\n and refunds.source_relation = order_line_refunds.source_relation\n\n)\n\nselect *\nfrom refund_join\n),order_lines as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__order_line`\n\n), product_variants as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__product_variant`\n\n\n), refunds as (\n\n select *\n from __dbt__cte__shopify__orders__order_refunds\n\n), refunds_aggregated as (\n \n select\n order_line_id,\n source_relation,\n sum(quantity) as quantity,\n sum(coalesce(subtotal, 0)) as subtotal\n from refunds\n group by 1,2\n\n\n), joined as (\n\n select\n order_lines.*,\n\n \n coalesce(refunds_aggregated.quantity,0) as refunded_quantity,\n coalesce(refunds_aggregated.subtotal,0) as refunded_subtotal,\n order_lines.quantity - coalesce(refunds_aggregated.quantity,0) as quantity_net_refunds,\n order_lines.pre_tax_price - coalesce(refunds_aggregated.subtotal,0) as subtotal_net_refunds,\n \n \n product_variants.created_timestamp as variant_created_at,\n product_variants.updated_timestamp as variant_updated_at,\n product_variants.inventory_item_id,\n product_variants.image_id,\n product_variants.title as variant_title,\n product_variants.price as variant_price,\n product_variants.sku as variant_sku,\n product_variants.position as variant_position,\n product_variants.inventory_policy as variant_inventory_policy,\n product_variants.compare_at_price as variant_compare_at_price,\n product_variants.fulfillment_service as variant_fulfillment_service,\n product_variants.inventory_management as variant_inventory_management,\n product_variants.is_taxable as variant_is_taxable,\n product_variants.barcode as variant_barcode,\n product_variants.grams as variant_grams,\n product_variants.inventory_quantity as variant_inventory_quantity,\n product_variants.weight as variant_weight,\n product_variants.weight_unit as variant_weight_unit,\n product_variants.option_1 as variant_option_1,\n product_variants.option_2 as variant_option_2,\n product_variants.option_3 as variant_option_3,\n product_variants.tax_code as variant_tax_code,\n product_variants.is_requiring_shipping as variant_is_requiring_shipping\n from order_lines\n \n left join refunds_aggregated\n on refunds_aggregated.order_line_id = order_lines.order_line_id\n and refunds_aggregated.source_relation = order_lines.source_relation\n \n left join product_variants\n on product_variants.variant_id = order_lines.variant_id\n and product_variants.source_relation = order_lines.source_relation\n\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.shopify.shopify__orders__order_refunds", "sql": " __dbt__cte__shopify__orders__order_refunds as (\n\n\nwith refunds as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__refund`\n\n), order_line_refunds as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__order_line_refund`\n \n), refund_join as (\n\n select \n refunds.refund_id,\n refunds.created_at,\n refunds.order_id,\n refunds.user_id,\n refunds.source_relation,\n order_line_refunds.order_line_refund_id,\n order_line_refunds.order_line_id,\n order_line_refunds.restock_type,\n order_line_refunds.quantity,\n order_line_refunds.subtotal,\n order_line_refunds.total_tax\n from refunds\n left join order_line_refunds\n on refunds.refund_id = order_line_refunds.refund_id\n and refunds.source_relation = order_line_refunds.source_relation\n\n)\n\nselect *\nfrom refund_join\n)"}], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_shopify`.`shopify__order_lines`"}, "model.shopify.shopify__calendar": {"raw_sql": "{{ dbt_utils.date_spine(\n datepart=\"day\",\n start_date=\"cast('2019-01-01' as date)\",\n end_date=\"current_date\"\n )\n}}", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt_utils.date_spine"], "nodes": []}, "config": {"enabled": true, "alias": null, "schema": "shopify", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_shopify", "fqn": ["shopify", "utils", "shopify__calendar"], "unique_id": "model.shopify.shopify__calendar", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify", "path": "utils/shopify__calendar.sql", "original_file_path": "models/utils/shopify__calendar.sql", "name": "shopify__calendar", "alias": "shopify__calendar", "checksum": {"name": "sha256", "checksum": "330711091f6b47526ac5e8bc39960b2d171633362c0e10b666931be500abeddd"}, "tags": [], "refs": [], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify/models/utils/shopify__calendar.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "shopify", "materialized": "table"}, "created_at": 1665702404.927511, "compiled_sql": "\n\n\n\n\n\nwith rawdata as (\n\n \n\n \n\n with p as (\n select 0 as generated_number union all select 1\n ), unioned as (\n\n select\n\n \n p0.generated_number * power(2, 0)\n + \n \n p1.generated_number * power(2, 1)\n + \n \n p2.generated_number * power(2, 2)\n + \n \n p3.generated_number * power(2, 3)\n + \n \n p4.generated_number * power(2, 4)\n + \n \n p5.generated_number * power(2, 5)\n + \n \n p6.generated_number * power(2, 6)\n + \n \n p7.generated_number * power(2, 7)\n + \n \n p8.generated_number * power(2, 8)\n + \n \n p9.generated_number * power(2, 9)\n + \n \n p10.generated_number * power(2, 10)\n \n \n + 1\n as generated_number\n\n from\n\n \n p as p0\n cross join \n \n p as p1\n cross join \n \n p as p2\n cross join \n \n p as p3\n cross join \n \n p as p4\n cross join \n \n p as p5\n cross join \n \n p as p6\n cross join \n \n p as p7\n cross join \n \n p as p8\n cross join \n \n p as p9\n cross join \n \n p as p10\n \n \n\n )\n\n select *\n from unioned\n where generated_number <= 1381\n order by generated_number\n\n\n\n),\n\nall_periods as (\n\n select (\n \n\n datetime_add(\n cast( cast('2019-01-01' as date) as datetime),\n interval row_number() over (order by 1) - 1 day\n )\n\n\n ) as date_day\n from rawdata\n\n),\n\nfiltered as (\n\n select *\n from all_periods\n where date_day <= current_date\n\n)\n\nselect * from filtered\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_shopify`.`shopify__calendar`"}, "model.shopify.shopify__orders__order_line_aggregates": {"raw_sql": "with order_line as (\n\n select *\n from {{ var('shopify_order_line') }}\n\n), aggregated as (\n\n select \n order_id,\n source_relation,\n count(*) as line_item_count\n from order_line\n group by 1,2\n\n)\n\nselect *\nfrom aggregated", "compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["model.shopify_source.stg_shopify__order_line"]}, "config": {"enabled": true, "alias": null, "schema": "shopify", "database": null, "tags": [], "meta": {}, "materialized": "ephemeral", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_shopify", "fqn": ["shopify", "intermediate", "shopify__orders__order_line_aggregates"], "unique_id": "model.shopify.shopify__orders__order_line_aggregates", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify", "path": "intermediate/shopify__orders__order_line_aggregates.sql", "original_file_path": "models/intermediate/shopify__orders__order_line_aggregates.sql", "name": "shopify__orders__order_line_aggregates", "alias": "shopify__orders__order_line_aggregates", "checksum": {"name": "sha256", "checksum": "837181b671b2beb8e58924357d213e33d6479a47e16c604db35cbb6ce6489fa8"}, "tags": [], "refs": [["stg_shopify__order_line"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify://models/intermediate/intermediate.yml", "compiled_path": "target/compiled/shopify/models/intermediate/shopify__orders__order_line_aggregates.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "shopify", "materialized": "ephemeral"}, "created_at": 1665702405.277619, "compiled_sql": "with order_line as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__order_line`\n\n), aggregated as (\n\n select \n order_id,\n source_relation,\n count(*) as line_item_count\n from order_line\n group by 1,2\n\n)\n\nselect *\nfrom aggregated", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null}, "model.shopify.shopify__customers__order_aggregates": {"raw_sql": "with orders as (\n\n select *\n from {{ var('shopify_order') }}\n\n), transactions as (\n\n select *\n from {{ ref('shopify__transactions' )}}\n where lower(status) = 'success'\n\n), aggregated as (\n\n select\n orders.customer_id,\n orders.source_relation,\n min(orders.created_timestamp) as first_order_timestamp,\n max(orders.created_timestamp) as most_recent_order_timestamp,\n avg(case when lower(transactions.kind) in ('sale','capture') then transactions.currency_exchange_calculated_amount end) as average_order_value,\n sum(case when lower(transactions.kind) in ('sale','capture') then transactions.currency_exchange_calculated_amount end) as lifetime_total_spent,\n sum(case when lower(transactions.kind) in ('refund') then transactions.currency_exchange_calculated_amount end) as lifetime_total_refunded,\n count(distinct orders.order_id) as lifetime_count_orders\n from orders\n left join transactions\n using (order_id, source_relation)\n where customer_id is not null\n group by 1,2\n\n)\n\nselect *\nfrom aggregated", "compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["model.shopify_source.stg_shopify__order", "model.shopify.shopify__transactions"]}, "config": {"enabled": true, "alias": null, "schema": "shopify", "database": null, "tags": [], "meta": {}, "materialized": "ephemeral", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_shopify", "fqn": ["shopify", "intermediate", "shopify__customers__order_aggregates"], "unique_id": "model.shopify.shopify__customers__order_aggregates", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify", "path": "intermediate/shopify__customers__order_aggregates.sql", "original_file_path": "models/intermediate/shopify__customers__order_aggregates.sql", "name": "shopify__customers__order_aggregates", "alias": "shopify__customers__order_aggregates", "checksum": {"name": "sha256", "checksum": "902e082d29e1b00c443c6d18109a496dc53a1a7e927134bc8a523cdc106076bd"}, "tags": [], "refs": [["stg_shopify__order"], ["shopify__transactions"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify://models/intermediate/intermediate.yml", "compiled_path": "target/compiled/shopify/models/intermediate/shopify__customers__order_aggregates.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "shopify", "materialized": "ephemeral"}, "created_at": 1665702405.277395, "compiled_sql": "with orders as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__order`\n\n), transactions as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_shopify`.`shopify__transactions`\n where lower(status) = 'success'\n\n), aggregated as (\n\n select\n orders.customer_id,\n orders.source_relation,\n min(orders.created_timestamp) as first_order_timestamp,\n max(orders.created_timestamp) as most_recent_order_timestamp,\n avg(case when lower(transactions.kind) in ('sale','capture') then transactions.currency_exchange_calculated_amount end) as average_order_value,\n sum(case when lower(transactions.kind) in ('sale','capture') then transactions.currency_exchange_calculated_amount end) as lifetime_total_spent,\n sum(case when lower(transactions.kind) in ('refund') then transactions.currency_exchange_calculated_amount end) as lifetime_total_refunded,\n count(distinct orders.order_id) as lifetime_count_orders\n from orders\n left join transactions\n using (order_id, source_relation)\n where customer_id is not null\n group by 1,2\n\n)\n\nselect *\nfrom aggregated", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null}, "model.shopify.shopify__orders__order_refunds": {"raw_sql": "{{ config(enabled=fivetran_utils.enabled_vars(['shopify__using_order_line_refund','shopify__using_refund'])) }}\n\nwith refunds as (\n\n select *\n from {{ var('shopify_refund') }}\n\n), order_line_refunds as (\n\n select *\n from {{ var('shopify_order_line_refund') }}\n \n), refund_join as (\n\n select \n refunds.refund_id,\n refunds.created_at,\n refunds.order_id,\n refunds.user_id,\n refunds.source_relation,\n order_line_refunds.order_line_refund_id,\n order_line_refunds.order_line_id,\n order_line_refunds.restock_type,\n order_line_refunds.quantity,\n order_line_refunds.subtotal,\n order_line_refunds.total_tax\n from refunds\n left join order_line_refunds\n on refunds.refund_id = order_line_refunds.refund_id\n and refunds.source_relation = order_line_refunds.source_relation\n\n)\n\nselect *\nfrom refund_join", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars"], "nodes": ["model.shopify_source.stg_shopify__refund", "model.shopify_source.stg_shopify__order_line_refund"]}, "config": {"enabled": true, "alias": null, "schema": "shopify", "database": null, "tags": [], "meta": {}, "materialized": "ephemeral", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_shopify", "fqn": ["shopify", "intermediate", "shopify__orders__order_refunds"], "unique_id": "model.shopify.shopify__orders__order_refunds", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify", "path": "intermediate/shopify__orders__order_refunds.sql", "original_file_path": "models/intermediate/shopify__orders__order_refunds.sql", "name": "shopify__orders__order_refunds", "alias": "shopify__orders__order_refunds", "checksum": {"name": "sha256", "checksum": "1bcc3be258e3bdda4c6845e465f95e7e5b4e0eee823b169e0cd5e7eff4cf7792"}, "tags": [], "refs": [["stg_shopify__refund"], ["stg_shopify__order_line_refund"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify://models/intermediate/intermediate.yml", "compiled_path": "target/compiled/shopify/models/intermediate/shopify__orders__order_refunds.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "shopify", "materialized": "ephemeral", "enabled": true}, "created_at": 1665702405.277806, "compiled_sql": "\n\nwith refunds as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__refund`\n\n), order_line_refunds as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__order_line_refund`\n \n), refund_join as (\n\n select \n refunds.refund_id,\n refunds.created_at,\n refunds.order_id,\n refunds.user_id,\n refunds.source_relation,\n order_line_refunds.order_line_refund_id,\n order_line_refunds.order_line_id,\n order_line_refunds.restock_type,\n order_line_refunds.quantity,\n order_line_refunds.subtotal,\n order_line_refunds.total_tax\n from refunds\n left join order_line_refunds\n on refunds.refund_id = order_line_refunds.refund_id\n and refunds.source_relation = order_line_refunds.source_relation\n\n)\n\nselect *\nfrom refund_join", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null}, "model.shopify_holistic_reporting.shopify_holistic_reporting__customer_enhanced": {"raw_sql": "with shopify_customers as (\n\n select *\n from {{ ref('int__shopify_customer_rollup') }}\n\n), klaviyo_persons as (\n\n select *\n from {{ ref('int__klaviyo_person_rollup') }}\n\n), combine_customer_info as (\n\n select\n coalesce(shopify_customers.email, klaviyo_persons.email) as email,\n\n coalesce(klaviyo_persons.full_name, shopify_customers.full_name) as full_name,\n shopify_customers.customer_ids as shopify_customer_ids,\n klaviyo_persons.person_ids as klaviyo_person_ids,\n coalesce(shopify_customers.phone_numbers, klaviyo_persons.phone_numbers) as phone_number,\n shopify_customers.first_shopify_account_made_at as shopify_customer_first_created_at,\n shopify_customers.last_shopify_account_made_at as shopify_customer_last_created_at,\n klaviyo_persons.first_klaviyo_account_made_at as klaviyo_person_first_created_at,\n klaviyo_persons.last_klaviyo_account_made_at as klaviyo_person_last_created_at,\n shopify_customers.last_updated_at as shopify_customer_last_updated_at,\n klaviyo_persons.last_updated_at as klaviyo_person_last_updated_at,\n shopify_customers.is_verified_email as is_shopify_email_verified,\n\n {{ dbt_utils.star(from=ref('int__shopify_customer_rollup'), relation_alias='shopify_customers', prefix='shopify_',\n except=['source_relation','email', 'full_name', 'customer_ids', 'phone_numbers', 'first_shopify_account_made_at','last_shopify_account_made_at', \n 'last_updated_at', 'is_verified_email'] ) \n }},\n shopify_customers.source_relation as shopify_source_relation,\n\n {{ dbt_utils.star(from=ref('int__klaviyo_person_rollup'), relation_alias='klaviyo_persons', prefix='klaviyo_',\n except=['source_relation','email', 'full_name', 'first_klaviyo_account_made_at', 'last_klaviyo_account_made_at', 'person_ids', 'phone_numbers', 'last_updated_at'] ) \n }},\n klaviyo_persons.source_relation as klaviyo_source_relation\n\n from shopify_customers\n full outer join klaviyo_persons \n on shopify_customers.email = lower(klaviyo_persons.email) -- redshift doesn't like doing 2 lowers here. we lowercase shopify.email in an intermediate model\n\n)\n\nselect *\nfrom combine_customer_info", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": ["model.shopify_holistic_reporting.int__shopify_customer_rollup", "model.shopify_holistic_reporting.int__klaviyo_person_rollup", "model.shopify_holistic_reporting.int__shopify_customer_rollup", "model.shopify_holistic_reporting.int__klaviyo_person_rollup"]}, "config": {"enabled": true, "alias": null, "schema": "shopify_holistic", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_shopify_holistic", "fqn": ["shopify_holistic_reporting", "shopify_holistic_reporting__customer_enhanced"], "unique_id": "model.shopify_holistic_reporting.shopify_holistic_reporting__customer_enhanced", "package_name": "shopify_holistic_reporting", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_holistic_reporting", "path": "shopify_holistic_reporting__customer_enhanced.sql", "original_file_path": "models/shopify_holistic_reporting__customer_enhanced.sql", "name": "shopify_holistic_reporting__customer_enhanced", "alias": "shopify_holistic_reporting__customer_enhanced", "checksum": {"name": "sha256", "checksum": "db442dfeedb2bb460e284b8e3d2742abc3f9ae90d8db670d6019afc567b53a09"}, "tags": [], "refs": [["int__shopify_customer_rollup"], ["int__klaviyo_person_rollup"], ["int__shopify_customer_rollup"], ["int__klaviyo_person_rollup"]], "sources": [], "metrics": [], "description": "Table consolidating customers and their information and activity metrics from across all platforms. A full outer join is performed in order to union together users who may not exist in both sources, and personal information is coalesced to consolidate as much information as possible. Includes any custom columns specified in passthrough variables for both Shopify and Klaviyo.\nFor **Klaviyo** metrics: Counts of instances of triggered events and sums of the numeric value (i.e. revenue) associated with events (total vs organic/not attributed to flows or campaigns) will be pivoted out into columns, as configured by the klaviyo__count_metrics and klaviyo__sum_revenue_metricsvariables, respectively. See the Klaviyo dbt_project.yml file for the default metrics used. These columns will be prefixed with total_count_, total_sum_revenue_ (organic + attributed), and organic_sum_revenue_ (not attributed to a campaign or flow).\nColumns that come _only_ from one source will be prefixed with that source name (ie klaviyo_)\n", "columns": {"shopify_source_relation": {"name": "shopify_source_relation", "description": "The source where this Shopify data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioning together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_source_relation": {"name": "klaviyo_source_relation", "description": "The source where this Klaviyo data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioning together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_has_accepted_marketing": {"name": "shopify_has_accepted_marketing", "description": "Whether the customer has consented to receive marketing material via email.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_customer_first_created_at": {"name": "shopify_customer_first_created_at", "description": "The date and time when the customer account first associated with this email was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_customer_last_created_at": {"name": "shopify_customer_last_created_at", "description": "The date and time when the customer account first associated with this email was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_customer_last_updated_at": {"name": "shopify_customer_last_updated_at", "description": "Timestamp of when the shopify customer was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_default_address_id": {"name": "shopify_default_address_id", "description": "The default address for the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email": {"name": "email", "description": "The unique email address of the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "full_name": {"name": "full_name", "description": "The customer's full name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_customer_ids": {"name": "shopify_customer_ids", "description": "A comma-separated aggregated list of Shopify IDs for the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_lifetime_count_orders": {"name": "shopify_lifetime_count_orders", "description": "The number of orders associated with this customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "phone_number": {"name": "phone_number", "description": "The unique phone number (E.164 format) for this customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_account_state": {"name": "shopify_account_state", "description": "The state of the customer's account with a shop.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_is_tax_exempt": {"name": "shopify_is_tax_exempt", "description": "Whether the customer is exempt from paying taxes on their order. If true, then taxes won't be applied to an order at checkout. If false, then taxes will be applied at checkout.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_last_updated_at": {"name": "shopify_last_updated_at", "description": "The date and time when the customer information was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_shopify_email_verified": {"name": "is_shopify_email_verified", "description": "Whether the customer has verified their email address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_first_order_at": {"name": "shopify_first_order_at", "description": "The timestamp the customer completed their first order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_last_order_at": {"name": "shopify_last_order_at", "description": "The timestamp the customer completed their most recent order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_average_order_value": {"name": "shopify_average_order_value", "description": "The average order value for the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_lifetime_total_spent": {"name": "shopify_lifetime_total_spent", "description": "The total amount of money that the customer has spent on orders across their order history.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_lifetime_total_refunded": {"name": "shopify_lifetime_total_refunded", "description": "The total amount of money that the customer has been refunded on orders across their order history.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_lifetime_total_amount": {"name": "shopify_lifetime_total_amount", "description": "The total amount of money (minus refunds) that the customer has spent across their order history.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_person_id": {"name": "klaviyo_person_id", "description": "Unique ID of the user if you use your own unique identifier. Otherwise, Klaviyo recommends using the email as the primary key. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_address_1": {"name": "klaviyo_address_1", "description": "First line of the person's address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_address_2": {"name": "klaviyo_address_2", "description": "Second line of the person's address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_city": {"name": "klaviyo_city", "description": "City they live in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_country": {"name": "klaviyo_country", "description": "Country they live in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_zip": {"name": "klaviyo_zip", "description": "Postal code where they live.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_person_created_at": {"name": "klaviyo_person_created_at", "description": "Timestamp of when the person's profile was created in Klaviyo.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_latitude": {"name": "klaviyo_latitude", "description": "Latitude of the person's location.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_longitude": {"name": "klaviyo_longitude", "description": "Longitude of the person's location.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_organization": {"name": "klaviyo_organization", "description": "Business organization they belong to.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_region": {"name": "klaviyo_region", "description": "Region or state they live in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_timezone": {"name": "klaviyo_timezone", "description": "Timezone they are situated in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_title": {"name": "klaviyo_title", "description": "Title at their business or organization.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_person_updated_at": {"name": "klaviyo_person_updated_at", "description": "Timestamp of when the person profile was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_count_total_campaigns": {"name": "klaviyo_count_total_campaigns", "description": "Count of the number of campaigns this person has interacted with.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_count_total_flows": {"name": "klaviyo_count_total_flows", "description": "Count of the number of flows this person has interacted with.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_first_event_at": {"name": "klaviyo_first_event_at", "description": "Timestamp of when the user first triggered an event (not limited to campaign and flow interactions).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_last_event_at": {"name": "klaviyo_last_event_at", "description": "Timestamp of when the user last triggered an event (not limited to campaign and flow interactions).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_first_campaign_touch_at": {"name": "klaviyo_first_campaign_touch_at", "description": "Timestamp of when the user first interacted with a campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_last_campaign_touch_at": {"name": "klaviyo_last_campaign_touch_at", "description": "Timestamp of when the user last interacted with a campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_first_flow_touch_at": {"name": "klaviyo_first_flow_touch_at", "description": "Timestamp of when the user first interacted with a flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_last_flow_touch_at": {"name": "klaviyo_last_flow_touch_at", "description": "Timestamp of when the user last interacted with a flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify_holistic_reporting://models/shopify_holistic_reporting.yml", "compiled_path": "target/compiled/shopify_holistic_reporting/models/shopify_holistic_reporting__customer_enhanced.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "shopify_holistic"}, "created_at": 1665702405.292048, "compiled_sql": "with shopify_customers as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_shopify_holistic`.`int__shopify_customer_rollup`\n\n), klaviyo_persons as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_shopify_holistic`.`int__klaviyo_person_rollup`\n\n), combine_customer_info as (\n\n select\n coalesce(shopify_customers.email, klaviyo_persons.email) as email,\n\n coalesce(klaviyo_persons.full_name, shopify_customers.full_name) as full_name,\n shopify_customers.customer_ids as shopify_customer_ids,\n klaviyo_persons.person_ids as klaviyo_person_ids,\n coalesce(shopify_customers.phone_numbers, klaviyo_persons.phone_numbers) as phone_number,\n shopify_customers.first_shopify_account_made_at as shopify_customer_first_created_at,\n shopify_customers.last_shopify_account_made_at as shopify_customer_last_created_at,\n klaviyo_persons.first_klaviyo_account_made_at as klaviyo_person_first_created_at,\n klaviyo_persons.last_klaviyo_account_made_at as klaviyo_person_last_created_at,\n shopify_customers.last_updated_at as shopify_customer_last_updated_at,\n klaviyo_persons.last_updated_at as klaviyo_person_last_updated_at,\n shopify_customers.is_verified_email as is_shopify_email_verified,\n\n *,\n shopify_customers.source_relation as shopify_source_relation,\n\n *,\n klaviyo_persons.source_relation as klaviyo_source_relation\n\n from shopify_customers\n full outer join klaviyo_persons \n on shopify_customers.email = lower(klaviyo_persons.email) -- redshift doesn't like doing 2 lowers here. we lowercase shopify.email in an intermediate model\n\n)\n\nselect *\nfrom combine_customer_info", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_shopify_holistic`.`shopify_holistic_reporting__customer_enhanced`"}, "model.shopify_holistic_reporting.shopify_holistic_reporting__orders_attribution": {"raw_sql": "{{\n config(\n materialized='incremental',\n unique_key='unique_order_key',\n partition_by={\n \"field\": \"created_timestamp\",\n \"data_type\": \"timestamp\"\n } if target.type == 'bigquery' else none,\n incremental_strategy = 'merge' if target.type not in ('postgres', 'redshift') else 'delete+insert',\n file_format = 'delta'\n )\n}}\n\nwith orders as (\n\n select *\n from {{ ref('shopify__orders') }}\n\n -- just grab new + newly updated orders\n {% if is_incremental() %}\n where updated_timestamp >= (select max(updated_timestamp) from {{ this }})\n {% endif %}\n\n), events as (\n\n select \n *\n from {{ ref('klaviyo__events') }}\n\n where \n coalesce(last_touch_campaign_id, last_touch_flow_id) is not null\n {% if var('klaviyo__eligible_attribution_events') != [] %}\n and lower(type) in {{ \"('\" ~ (var('klaviyo__eligible_attribution_events') | join(\"', '\")) ~ \"')\" }}\n {% endif %}\n\n -- only grab the events for users who are in the new increment of orders\n {% if is_incremental() %}\n and lower(person_email) in (select distinct lower(email) from orders)\n {% endif %}\n\n), join_orders_w_events as (\n\n select \n orders.*,\n events.last_touch_campaign_id,\n events.last_touch_flow_id,\n events.variation_id as last_touch_variation_id,\n events.campaign_name as last_touch_campaign_name,\n events.campaign_subject_line as last_touch_campaign_subject_line,\n events.flow_name as last_touch_flow_name,\n events.campaign_type as last_touch_campaign_type,\n events.event_id as last_touch_event_id,\n events.occurred_at as last_touch_event_occurred_at,\n events.type as last_touch_event_type,\n events.integration_name as last_touch_integration_name,\n events.integration_category as last_touch_integration_category,\n events.source_relation as klaviyo_source_relation\n\n from orders \n left join events on \n lower(orders.email) = lower(events.person_email)\n and {{ dbt_utils.datediff('events.occurred_at', 'orders.created_timestamp', 'hour') }} <= (\n case when events.type like '%sms%' then {{ var('klaviyo__sms_attribution_lookback') }}\n else {{ var('klaviyo__email_attribution_lookback') }} end)\n and orders.created_timestamp > events.occurred_at\n\n), order_events as (\n\n select\n *,\n row_number() over (partition by order_id order by last_touch_event_occurred_at desc) as event_index,\n\n -- the order was made after X interactions with campaign/flow\n count(last_touch_event_id) over (partition by order_id, last_touch_campaign_id) as count_interactions_with_campaign,\n count(last_touch_event_id) over (partition by order_id, last_touch_flow_id) as count_interactions_with_flow\n\n\n from join_orders_w_events\n\n), last_touches as (\n\n select \n {{ dbt_utils.star(from=ref('shopify__orders'), except=['source_relation']) }},\n last_touch_campaign_id is not null or last_touch_flow_id is not null as is_attributed,\n last_touch_campaign_id,\n last_touch_flow_id,\n last_touch_variation_id,\n last_touch_campaign_name,\n last_touch_campaign_subject_line,\n last_touch_campaign_type,\n last_touch_flow_name,\n case when last_touch_campaign_id is not null then count_interactions_with_campaign else null end as count_interactions_with_campaign, -- will be null if it's associated with a flow\n count_interactions_with_flow, -- will be null if it's associated with a campaign\n last_touch_event_id,\n last_touch_event_occurred_at,\n last_touch_event_type,\n last_touch_integration_name,\n last_touch_integration_category,\n source_relation as shopify_source_relation,\n klaviyo_source_relation,\n {{ dbt_utils.surrogate_key(['order_id', 'source_relation']) }} as unique_order_key\n\n from order_events\n where event_index = 1\n)\n\nselect *\nfrom last_touches", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt.is_incremental", "macro.dbt_utils.datediff", "macro.dbt_utils.star", "macro.dbt_utils.surrogate_key"], "nodes": ["model.shopify.shopify__orders", "model.klaviyo.klaviyo__events", "model.shopify.shopify__orders"]}, "config": {"enabled": true, "alias": null, "schema": "shopify_holistic", "database": null, "tags": [], "meta": {}, "materialized": "incremental", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": "unique_order_key", "on_schema_change": "ignore", "grants": {}, "partition_by": {"field": "created_timestamp", "data_type": "timestamp"}, "incremental_strategy": "merge", "file_format": "delta", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_shopify_holistic", "fqn": ["shopify_holistic_reporting", "shopify_holistic_reporting__orders_attribution"], "unique_id": "model.shopify_holistic_reporting.shopify_holistic_reporting__orders_attribution", "package_name": "shopify_holistic_reporting", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_holistic_reporting", "path": "shopify_holistic_reporting__orders_attribution.sql", "original_file_path": "models/shopify_holistic_reporting__orders_attribution.sql", "name": "shopify_holistic_reporting__orders_attribution", "alias": "shopify_holistic_reporting__orders_attribution", "checksum": {"name": "sha256", "checksum": "73fb2fe152a44cae675c50dde3179125d102ace0e7450e941072ce481be68efa"}, "tags": [], "refs": [["shopify__orders"], ["klaviyo__events"], ["shopify__orders"]], "sources": [], "metrics": [], "description": "Table of Shopify orders, enriched with a last-touch attribution model associating orders (as conversions) to campaigns or flows in Klaviyo. \nBy default, the package performs attribution [in line with Klaviyo](https://help.klaviyo.com/hc/en-us/articles/115005248128). It considers email opens and clicks, and SMS opens as the events eligible to be credited with orders. This attribution-eligibility can be configured by the `klaviyo__eligible_attribution_events` variable. \nSimilar to the Klaviyo app, the package by default considers the conversion period/lookback window for email events to be 120 hours (5 days) and 24 hours for SMS events. These can be configured through the `klaviyo__email_attribution_lookback` and `klaviyo__sms_attribution_lookback` variables, respectively (in integer-hours).\nRefer to the Klaviyo package [README](https://github.com/fivetran/dbt_klaviyo#attribution-lookback-window) for more details.\nMaterialized incrementally by default.\n", "columns": {"app_id": {"name": "app_id", "description": "The ID of the app that created the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_address_1": {"name": "billing_address_address_1", "description": "The street address of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_address_2": {"name": "billing_address_address_2", "description": "An optional additional field for the street address of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_city": {"name": "billing_address_city", "description": "The city, town, or village of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_company": {"name": "billing_address_company", "description": "The company of the person associated with the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_country": {"name": "billing_address_country", "description": "The name of the country of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_country_code": {"name": "billing_address_country_code", "description": "The two-letter code (ISO 3166-1 format) for the country of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_first_name": {"name": "billing_address_first_name", "description": "The first name of the person associated with the payment method.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_last_name": {"name": "billing_address_last_name", "description": "The last name of the person associated with the payment method.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_latitude": {"name": "billing_address_latitude", "description": "The latitude of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_longitude": {"name": "billing_address_longitude", "description": "The longitude of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_name": {"name": "billing_address_name", "description": "The full name of the person associated with the payment method.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_phone": {"name": "billing_address_phone", "description": "The phone number at the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_province": {"name": "billing_address_province", "description": "The name of the region (province, state, prefecture, \u2026) of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_province_code": {"name": "billing_address_province_code", "description": "The two-letter abbreviation of the region of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_zip": {"name": "billing_address_zip", "description": "The postal code (zip, postcode, Eircode, \u2026) of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "browser_ip": {"name": "browser_ip", "description": "The IP address of the browser used by the customer when they placed the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "has_buyer_accepted_marketing": {"name": "has_buyer_accepted_marketing", "description": "Whether the customer consented to receive email updates from the shop.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "cancel_reason": {"name": "cancel_reason", "description": "The reason why the order was canceled.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "cancelled_timestamp": {"name": "cancelled_timestamp", "description": "The date and time when the order was canceled.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "cart_token": {"name": "cart_token", "description": "The ID of the cart that's associated with the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "closed_timestamp": {"name": "closed_timestamp", "description": "The date and time when the order was closed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_timestamp": {"name": "created_timestamp", "description": "The autogenerated date and time when the order was created in Shopify.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "The three-letter code for the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "customer_id": {"name": "customer_id", "description": "The ID of the order's customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email": {"name": "email", "description": "The customer's email address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "financial_status": {"name": "financial_status", "description": "The status of payments associated with the order. Can only be set when the order is created", "meta": {}, "data_type": null, "quote": null, "tags": []}, "fulfillment_status": {"name": "fulfillment_status", "description": "The order's status in terms of fulfilled line items.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_id": {"name": "order_id", "description": "The ID of the order, used for API purposes. This is different from the order_number property, which is the ID used by the shop owner and customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "landing_site_base_url": {"name": "landing_site_base_url", "description": "The URL for the page where the buyer landed when they entered the shop.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "location_id": {"name": "location_id", "description": "The ID of the physical location where the order was processed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "name": {"name": "name", "description": "The order name, generated by combining the order_number property with the order prefix and suffix that are set in the merchant's general settings.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "note": {"name": "note", "description": "An optional note that a shop owner can attach to the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "number": {"name": "number", "description": "The order's position in the shop's count of orders. Numbers are sequential and start at 1.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_number": {"name": "order_number", "description": "The order 's position in the shop's count of orders starting at 1001. Order numbers are sequential and start at 1001.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "processed_timestamp": {"name": "processed_timestamp", "description": "The date and time when an order was processed. This value is the date that appears on your orders and that's used in the analytic reports.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "processing_method": {"name": "processing_method", "description": "How the payment was processed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "referring_site": {"name": "referring_site", "description": "The website where the customer clicked a link to the shop.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_address_1": {"name": "shipping_address_address_1", "description": "The street address of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_address_2": {"name": "shipping_address_address_2", "description": "An optional additional field for the street address of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_city": {"name": "shipping_address_city", "description": "The city, town, or village of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_company": {"name": "shipping_address_company", "description": "The company of the person associated with the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_country": {"name": "shipping_address_country", "description": "The name of the country of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_country_code": {"name": "shipping_address_country_code", "description": "The two-letter code (ISO 3166-1 format) for the country of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_first_name": {"name": "shipping_address_first_name", "description": "The first name of the person associated with the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_last_name": {"name": "shipping_address_last_name", "description": "The last name of the person associated with the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_latitude": {"name": "shipping_address_latitude", "description": "The latitude of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_longitude": {"name": "shipping_address_longitude", "description": "The longitude of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_name": {"name": "shipping_address_name", "description": "The full name of the person associated with the payment method.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_phone": {"name": "shipping_address_phone", "description": "The phone number at the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_province": {"name": "shipping_address_province", "description": "The name of the region (province, state, prefecture, \u2026) of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_province_code": {"name": "shipping_address_province_code", "description": "The two-letter abbreviation of the region of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_zip": {"name": "shipping_address_zip", "description": "The postal code (zip, postcode, Eircode, \u2026) of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_name": {"name": "source_name", "description": "Where the order originated. Can be set only during order creation, and is not writeable afterwards.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "subtotal_price": {"name": "subtotal_price", "description": "The price of the order in the shop currency after discounts but before shipping, taxes, and tips.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "has_taxes_included": {"name": "has_taxes_included", "description": "Whether taxes are included in the order subtotal.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_test_order": {"name": "is_test_order", "description": "Whether this is a test order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "token": {"name": "token", "description": "A unique token for the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_discounts": {"name": "total_discounts", "description": "The total discounts applied to the price of the order in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_line_items_price": {"name": "total_line_items_price", "description": "The sum of all line item prices in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_price": {"name": "total_price", "description": "The sum of all line item prices, discounts, shipping, taxes, and tips in the shop currency. Must be positive.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_tax": {"name": "total_tax", "description": "The sum of all the taxes applied to the order in th shop currency. Must be positive).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_weight": {"name": "total_weight", "description": "The sum of all line item weights in grams.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_timestamp": {"name": "updated_timestamp", "description": "The date and time (ISO 8601 format) when the order was last modified.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "user_id": {"name": "user_id", "description": "The ID of the user logged into Shopify POS who processed the order, if applicable.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "line_item_count": {"name": "line_item_count", "description": "Number of line items included in the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "customer_order_seq_number": {"name": "customer_order_seq_number", "description": "The sequential number of the order as it relates to the customer", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_vs_repeat": {"name": "new_vs_repeat", "description": "Whether the order was a new or repeat order for the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_cost": {"name": "shipping_cost", "description": "The shipping cost of the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_adjustment_amount": {"name": "order_adjustment_amount", "description": "Total adjustment amount applied to the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_adjustment_tax_amount": {"name": "order_adjustment_tax_amount", "description": "Total tax applied to the adjustment on the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refund_subtotal": {"name": "refund_subtotal", "description": "Total refund amount applied to the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refund_total_tax": {"name": "refund_total_tax", "description": "Total tax applied to the refund on the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_adjusted_total": {"name": "order_adjusted_total", "description": "Order total adjusted for refunds and other adjustments. The calculation used for this field is as follows: total price listed on the original order (including shipping costs and discounts) + adjustments + adjustments tax - total refunds - refunds tax The order_adjusted_total will equate to the total sales - refunds listed within the transactions table for the order (after currency exchange).\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "index": {"name": "index", "description": "Field representing the index of the order line in relation to the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "pre_tax_price": {"name": "pre_tax_price", "description": "The pre tax price of the order line.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "checkout_token": {"name": "checkout_token", "description": "The checkout token applied to the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_shipping_price_set": {"name": "total_shipping_price_set", "description": "The total shipping price set to the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_campaign_id": {"name": "last_touch_campaign_id", "description": "The Klaviyo campaign that the order has been attributed to by the package.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_flow_id": {"name": "last_touch_flow_id", "description": "The Klaviyo flow that the order has been attributed to by the package.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_variation_id": {"name": "last_touch_variation_id", "description": "Unique ID of the attributed Klaviyo flow or campaign variation group. This does not map onto another table. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_campaign_name": {"name": "last_touch_campaign_name", "description": "Name of the attributed Klaviyo campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_campaign_subject_line": {"name": "last_touch_campaign_subject_line", "description": "Email subject line of the attributed Klaviyo campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_flow_name": {"name": "last_touch_flow_name", "description": "Name of the attributed Klaviyo flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_campaign_type": {"name": "last_touch_campaign_type", "description": "Type of Klaviyo campaign that the order is attributed to.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_event_id": {"name": "last_touch_event_id", "description": "Unique Klaviyo event id of the interaction the customer had with the campaign or flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_event_occurred_at": {"name": "last_touch_event_occurred_at", "description": "Timestamp of when the customer interacted with the attributed campaign/flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_event_type": {"name": "last_touch_event_type", "description": "Type of interaction that the customer had with the campaign or flow. Will be one of the event types specified by the `klaviyo__eligible_attribution_events` variable. By default, this is just email opens, email clicks, and sms opens.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_integration_name": {"name": "last_touch_integration_name", "description": "Name of the platform that tracked the campaign/flow interaction (either Klaviyo, the API, or another integration).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_integration_category": {"name": "last_touch_integration_category", "description": "Use-case category of the platform that sent the campaign/flow interaction event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_source_relation": {"name": "shopify_source_relation", "description": "The source where this Shopify data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioning together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_source_relation": {"name": "klaviyo_source_relation", "description": "The source where Klaviyo campaign/flow data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioning together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "count_interactions_with_campaign": {"name": "count_interactions_with_campaign", "description": "The count of distinct attributable events the customer had with the campaign throughout the attribution window.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "count_interactions_with_flow": {"name": "count_interactions_with_flow", "description": "The count of distinct attributable events the customer had with the flow throughout the attribution window.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify_holistic_reporting://models/shopify_holistic_reporting.yml", "compiled_path": "target/compiled/shopify_holistic_reporting/models/shopify_holistic_reporting__orders_attribution.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "incremental", "schema": "shopify_holistic", "unique_key": "unique_order_key", "partition_by": {"field": "created_timestamp", "data_type": "timestamp"}, "incremental_strategy": "merge", "file_format": "delta"}, "created_at": 1665702405.307864, "compiled_sql": "\n\nwith orders as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_shopify`.`shopify__orders`\n\n -- just grab new + newly updated orders\n \n\n), events as (\n\n select \n *\n from `dbt-package-testing`.`linkedin_integration_tests_klaviyo`.`klaviyo__events`\n\n where \n coalesce(last_touch_campaign_id, last_touch_flow_id) is not null\n \n and lower(type) in ('opened email', 'clicked email', 'clicked sms')\n \n\n -- only grab the events for users who are in the new increment of orders\n \n\n), join_orders_w_events as (\n\n select \n orders.*,\n events.last_touch_campaign_id,\n events.last_touch_flow_id,\n events.variation_id as last_touch_variation_id,\n events.campaign_name as last_touch_campaign_name,\n events.campaign_subject_line as last_touch_campaign_subject_line,\n events.flow_name as last_touch_flow_name,\n events.campaign_type as last_touch_campaign_type,\n events.event_id as last_touch_event_id,\n events.occurred_at as last_touch_event_occurred_at,\n events.type as last_touch_event_type,\n events.integration_name as last_touch_integration_name,\n events.integration_category as last_touch_integration_category,\n events.source_relation as klaviyo_source_relation\n\n from orders \n left join events on \n lower(orders.email) = lower(events.person_email)\n and datetime_diff(\n cast(orders.created_timestamp as datetime),\n cast(events.occurred_at as datetime),\n hour\n ) <= (\n case when events.type like '%sms%' then 24\n else 120 end)\n and orders.created_timestamp > events.occurred_at\n\n), order_events as (\n\n select\n *,\n row_number() over (partition by order_id order by last_touch_event_occurred_at desc) as event_index,\n\n -- the order was made after X interactions with campaign/flow\n count(last_touch_event_id) over (partition by order_id, last_touch_campaign_id) as count_interactions_with_campaign,\n count(last_touch_event_id) over (partition by order_id, last_touch_flow_id) as count_interactions_with_flow\n\n\n from join_orders_w_events\n\n), last_touches as (\n\n select \n *,\n last_touch_campaign_id is not null or last_touch_flow_id is not null as is_attributed,\n last_touch_campaign_id,\n last_touch_flow_id,\n last_touch_variation_id,\n last_touch_campaign_name,\n last_touch_campaign_subject_line,\n last_touch_campaign_type,\n last_touch_flow_name,\n case when last_touch_campaign_id is not null then count_interactions_with_campaign else null end as count_interactions_with_campaign, -- will be null if it's associated with a flow\n count_interactions_with_flow, -- will be null if it's associated with a campaign\n last_touch_event_id,\n last_touch_event_occurred_at,\n last_touch_event_type,\n last_touch_integration_name,\n last_touch_integration_category,\n source_relation as shopify_source_relation,\n klaviyo_source_relation,\n to_hex(md5(cast(coalesce(cast(order_id as \n string\n), '') || '-' || coalesce(cast(source_relation as \n string\n), '') as \n string\n))) as unique_order_key\n\n from order_events\n where event_index = 1\n)\n\nselect *\nfrom last_touches", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_shopify_holistic`.`shopify_holistic_reporting__orders_attribution`"}, "model.shopify_holistic_reporting.shopify_holistic_reporting__daily_customer_metrics": {"raw_sql": "with shopify_daily as (\n\n select *\n from {{ ref('int__daily_shopify_customer_orders') }}\n\n), klaviyo_daily as (\n\n select *\n from {{ ref('int__daily_klaviyo_user_metrics') }}\n\n), combine_histories as (\n\n select \n coalesce(shopify_daily.date_day, klaviyo_daily.date_day) as date_day,\n coalesce(shopify_daily.email, klaviyo_daily.email) as email,\n\n -- when the below is null, these are unattributed actions\n coalesce(shopify_daily.last_touch_campaign_id, klaviyo_daily.last_touch_campaign_id) as campaign_id,\n coalesce(shopify_daily.last_touch_flow_id, klaviyo_daily.last_touch_flow_id) as flow_id,\n coalesce(shopify_daily.last_touch_campaign_name, klaviyo_daily.campaign_name) as campaign_name,\n coalesce(shopify_daily.last_touch_flow_name, klaviyo_daily.flow_name) as flow_name,\n coalesce(shopify_daily.last_touch_variation_id, klaviyo_daily.variation_id) as variation_id,\n coalesce(shopify_daily.last_touch_campaign_subject_line, klaviyo_daily.campaign_subject_line) as campaign_subject_line,\n coalesce(shopify_daily.last_touch_campaign_type, klaviyo_daily.campaign_type) as campaign_type,\n \n {{ dbt_utils.star(from=ref('int__daily_shopify_customer_orders'), relation_alias='shopify_daily', prefix='shopify_',\n except=['source_relation','date_day', 'email', 'last_touch_variation_id', 'last_touch_flow_name', 'last_touch_campaign_name', 'last_touch_flow_id', 'last_touch_campaign_id', 'last_touch_campaign_subject_line', 'last_touch_campaign_type']) }},\n shopify_daily.source_relation as shopify_source_relation,\n\n {{ dbt_utils.star(from=ref('int__daily_klaviyo_user_metrics'), relation_alias='klaviyo_daily', prefix='klaviyo_',\n except=['source_relation','date_day', 'email', 'variation_id', 'flow_name', 'campaign_name', 'last_touch_flow_id', 'last_touch_campaign_id', 'campaign_subject_line', 'campaign_type']) }},\n klaviyo_daily.source_relation as klaviyo_source_relation\n\n from shopify_daily\n full outer join klaviyo_daily\n on lower(shopify_daily.email) = lower(klaviyo_daily.email)\n and shopify_daily.date_day = klaviyo_daily.date_day\n)\n\nselect *\nfrom combine_histories", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": ["model.shopify_holistic_reporting.int__daily_shopify_customer_orders", "model.shopify_holistic_reporting.int__daily_klaviyo_user_metrics", "model.shopify_holistic_reporting.int__daily_shopify_customer_orders", "model.shopify_holistic_reporting.int__daily_klaviyo_user_metrics"]}, "config": {"enabled": true, "alias": null, "schema": "shopify_holistic", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_shopify_holistic", "fqn": ["shopify_holistic_reporting", "shopify_holistic_reporting__daily_customer_metrics"], "unique_id": "model.shopify_holistic_reporting.shopify_holistic_reporting__daily_customer_metrics", "package_name": "shopify_holistic_reporting", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_holistic_reporting", "path": "shopify_holistic_reporting__daily_customer_metrics.sql", "original_file_path": "models/shopify_holistic_reporting__daily_customer_metrics.sql", "name": "shopify_holistic_reporting__daily_customer_metrics", "alias": "shopify_holistic_reporting__daily_customer_metrics", "checksum": {"name": "sha256", "checksum": "971dcdccf88ae613b19a18bff1ebb515f480d4fd5fb1c4ae1c8cfb3c0d07072d"}, "tags": [], "refs": [["int__daily_shopify_customer_orders"], ["int__daily_klaviyo_user_metrics"], ["int__daily_shopify_customer_orders"], ["int__daily_klaviyo_user_metrics"]], "sources": [], "metrics": [], "description": "Table that aggregates Shopify and Klaviyo metrics to the day-customer-campaign or day-customer-flow grain (but note that if a user interacts with 2 different variations of a flow/campaign somehow, they will have 2 records). Also note that non-attributed (to Klaviyo at least) orders and interactions (someone with null campaign_id/flow_id) are included in this table. \nFor **Klaviyo**: **Counts** of the instances of the events, as well as **sums** of the numeric value associated with events (i.e. revenue) will be pivoted out into columns, as configured by the `klaviyo__count_metrics` and `klaviyo__sum_revenue_metrics` variables, respectively. See the dbt_project.yml file for the default metrics used. These columns will be prefixed with `count_` and `sum_revenue_`.\nNote that 0-activity days will not appear. \n", "columns": {"date_day": {"name": "date_day", "description": "Day on which the customer performed these activities.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email": {"name": "email", "description": "Email address of the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Foreign key referencing the CAMPAIGN attributed with these metrics (by the package's attribution model).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_id": {"name": "flow_id", "description": "Foreign key referencing the FLOW attributed with these metrics (by the package's attribution model).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_name": {"name": "campaign_name", "description": "Name of the attributed campaign. If not specified, this will default to the subject of the campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_name": {"name": "flow_name", "description": "Name of the attributed flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variation_id": {"name": "variation_id", "description": "Unique ID of the attributed flow or campaign variation group. This does not map onto another table. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_first_event_at": {"name": "klaviyo_first_event_at", "description": "Timestamp of the first interaction between this campaign/flow and a person on this day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_last_event_at": {"name": "klaviyo_last_event_at", "description": "Timestamp of the last interaction between this campaign/flow and a person on this day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_subject_line": {"name": "campaign_subject_line", "description": "Email subject line of the Klaviyo campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_type": {"name": "campaign_type", "description": "Type of campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_source_relation": {"name": "shopify_source_relation", "description": "The source where this Shopify data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioning together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_source_relation": {"name": "klaviyo_source_relation", "description": "The source where this Klaviyo data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioning together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_total_orders": {"name": "shopify_total_orders", "description": "Total number of orders the customer placed on this day, associated with this campaign or flow. Includes canceled orders.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_total_price": {"name": "shopify_total_price", "description": "Total adjusted price the customer paid on this day, associated with this campaign or flow, in shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_count_line_items": {"name": "shopify_count_line_items", "description": "The count of order line items the customer placed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_total_line_items_price": {"name": "shopify_total_line_items_price", "description": "The sum of all line item prices in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_total_discounts": {"name": "shopify_total_discounts", "description": "The sum of discounts applied to the customer's orders, in shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_total_tax": {"name": "shopify_total_tax", "description": "The sum of taxes paid by the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_total_shipping_cost": {"name": "shopify_total_shipping_cost", "description": "The sum of shipping costs paid.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_total_refund_subtotal": {"name": "shopify_total_refund_subtotal", "description": "Total amount refunded by the customer. Note that that `date_day` will be when the order was created, not refunded.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_total_refund_tax": {"name": "shopify_total_refund_tax", "description": "Total tax applied to the customer's refunds.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_count_cancelled_orders": {"name": "shopify_count_cancelled_orders", "description": "The count of orders that the customer made on this day and canceled.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_count_products": {"name": "shopify_count_products", "description": "The count of distinct products (based on distinct `product_ids`) that the customer purchased.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_count_product_variants": {"name": "shopify_count_product_variants", "description": "The count of distinct products variants that the customer purchased.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_sum_quantity": {"name": "shopify_sum_quantity", "description": "The total quantity of items that the customer purchased.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_total_order_adjustment_amount": {"name": "shopify_total_order_adjustment_amount", "description": "The total amount of adjustments made to the customer's orders.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_total_order_adjustment_tax_amount": {"name": "shopify_total_order_adjustment_tax_amount", "description": "The total amount of taxes applied to adjustments made to the customer's orders.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify_holistic_reporting://models/shopify_holistic_reporting.yml", "compiled_path": "target/compiled/shopify_holistic_reporting/models/shopify_holistic_reporting__daily_customer_metrics.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "shopify_holistic"}, "created_at": 1665702405.295847, "compiled_sql": "with shopify_daily as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_shopify_holistic`.`int__daily_shopify_customer_orders`\n\n), klaviyo_daily as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_shopify_holistic`.`int__daily_klaviyo_user_metrics`\n\n), combine_histories as (\n\n select \n coalesce(shopify_daily.date_day, klaviyo_daily.date_day) as date_day,\n coalesce(shopify_daily.email, klaviyo_daily.email) as email,\n\n -- when the below is null, these are unattributed actions\n coalesce(shopify_daily.last_touch_campaign_id, klaviyo_daily.last_touch_campaign_id) as campaign_id,\n coalesce(shopify_daily.last_touch_flow_id, klaviyo_daily.last_touch_flow_id) as flow_id,\n coalesce(shopify_daily.last_touch_campaign_name, klaviyo_daily.campaign_name) as campaign_name,\n coalesce(shopify_daily.last_touch_flow_name, klaviyo_daily.flow_name) as flow_name,\n coalesce(shopify_daily.last_touch_variation_id, klaviyo_daily.variation_id) as variation_id,\n coalesce(shopify_daily.last_touch_campaign_subject_line, klaviyo_daily.campaign_subject_line) as campaign_subject_line,\n coalesce(shopify_daily.last_touch_campaign_type, klaviyo_daily.campaign_type) as campaign_type,\n \n *,\n shopify_daily.source_relation as shopify_source_relation,\n\n *,\n klaviyo_daily.source_relation as klaviyo_source_relation\n\n from shopify_daily\n full outer join klaviyo_daily\n on lower(shopify_daily.email) = lower(klaviyo_daily.email)\n and shopify_daily.date_day = klaviyo_daily.date_day\n)\n\nselect *\nfrom combine_histories", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_shopify_holistic`.`shopify_holistic_reporting__daily_customer_metrics`"}, "model.shopify_holistic_reporting.int__daily_shopify_customer_orders": {"raw_sql": "with orders as (\n\n select *\n from {{ ref('shopify_holistic_reporting__orders_attribution') }}\n\n), order_lines as (\n\n select *\n from {{ ref('shopify__order_lines') }}\n\n), order_line_metrics as (\n\n select \n order_id,\n source_relation,\n count(distinct product_id) as count_products,\n count(distinct product_id || '-' || variant_id) as count_product_variants,\n sum(quantity) as sum_quantity\n \n from order_lines\n group by 1,2\n\n), join_orders as (\n\n select \n orders.*,\n order_line_metrics.count_products,\n order_line_metrics.count_product_variants,\n order_line_metrics.sum_quantity\n\n from orders \n left join order_line_metrics\n on orders.order_id = order_line_metrics.order_id\n and orders.shopify_source_relation = order_line_metrics.source_relation\n\n), daily_order_metrics as (\n\n select\n cast( {{ dbt_utils.date_trunc('day', 'created_timestamp') }} as date) as date_day,\n email,\n last_touch_campaign_id,\n last_touch_flow_id,\n last_touch_campaign_name,\n last_touch_flow_name,\n last_touch_variation_id,\n last_touch_campaign_subject_line,\n last_touch_campaign_type,\n shopify_source_relation as source_relation,\n\n count(distinct order_id) as total_orders,\n sum(order_adjusted_total) as total_price,\n\n sum(line_item_count) as count_line_items,\n sum(total_line_items_price) as total_line_items_price,\n \n\n sum(total_discounts) as total_discounts,\n sum(total_tax) as total_tax,\n sum(shipping_cost) as total_shipping_cost,\n\n {% if fivetran_utils.enabled_vars(vars=[\"shopify__using_order_line_refund\", \"shopify__using_refund\"]) %}\n sum(refund_subtotal) as total_refund_subtotal,\n sum(refund_total_tax) as total_refund_tax,\n {% endif %}\n\n sum(case when cancelled_timestamp is not null then 1 else 0 end) as count_cancelled_orders,\n sum(count_products) as count_products,\n sum(count_product_variants) as count_product_variants,\n sum(sum_quantity) as sum_quantity\n\n {% if var('shopify__using_order_adjustment', true) %}\n , sum(order_adjustment_amount) as total_order_adjustment_amount\n , sum(order_adjustment_tax_amount) as total_order_adjustment_tax_amount\n {% endif %}\n \n\n from join_orders\n {{ dbt_utils.group_by(n=10)}}\n)\n\nselect *\nfrom daily_order_metrics", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt_utils.date_trunc", "macro.fivetran_utils.enabled_vars", "macro.dbt_utils.group_by"], "nodes": ["model.shopify_holistic_reporting.shopify_holistic_reporting__orders_attribution", "model.shopify.shopify__order_lines"]}, "config": {"enabled": true, "alias": null, "schema": "shopify_holistic", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_shopify_holistic", "fqn": ["shopify_holistic_reporting", "intermediate", "int__daily_shopify_customer_orders"], "unique_id": "model.shopify_holistic_reporting.int__daily_shopify_customer_orders", "package_name": "shopify_holistic_reporting", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_holistic_reporting", "path": "intermediate/int__daily_shopify_customer_orders.sql", "original_file_path": "models/intermediate/int__daily_shopify_customer_orders.sql", "name": "int__daily_shopify_customer_orders", "alias": "int__daily_shopify_customer_orders", "checksum": {"name": "sha256", "checksum": "d72f384b963f98264127d5e031e2e30ac3cafbc48bbf79494b80bd8367e1b0a2"}, "tags": [], "refs": [["shopify_holistic_reporting__orders_attribution"], ["shopify__order_lines"]], "sources": [], "metrics": [], "description": "", "columns": {"date_day": {"name": "date_day", "description": "Day on which the customer performed these activities.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email": {"name": "email", "description": "Email address of the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_campaign_id": {"name": "last_touch_campaign_id", "description": "Foreign key referencing the CAMPAIGN attributed with these metrics (by the package's attribution model).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_flow_id": {"name": "last_touch_flow_id", "description": "Foreign key referencing the FLOW attributed with these metrics (by the package's attribution model).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_campaign_name": {"name": "last_touch_campaign_name", "description": "Name of the attributed campaign. If not specified, this will default to the subject of the campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_flow_name": {"name": "last_touch_flow_name", "description": "Name of the attributed flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_variation_id": {"name": "last_touch_variation_id", "description": "Unique ID of the attributed flow or campaign variation group. This does not map onto another table. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_campaign_subject_line": {"name": "last_touch_campaign_subject_line", "description": "Email subject line of the Klaviyo campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_campaign_type": {"name": "last_touch_campaign_type", "description": "Type of campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_relation": {"name": "source_relation", "description": "The source where this Shopify data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioning together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_orders": {"name": "total_orders", "description": "Total number of orders the customer placed on this day, associated with this campaign or flow. Includes canceled orders.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_price": {"name": "total_price", "description": "Total adjusted price the customer paid on this day, associated with this campaign or flow, in shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "count_line_items": {"name": "count_line_items", "description": "The count of order line items the customer placed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_line_items_price": {"name": "total_line_items_price", "description": "The sum of all line item prices in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_discounts": {"name": "total_discounts", "description": "The sum of discounts applied to the customer's orders, in shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_tax": {"name": "total_tax", "description": "The sum of taxes paid by the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_shipping_cost": {"name": "total_shipping_cost", "description": "The sum of shipping costs paid.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_refund_subtotal": {"name": "total_refund_subtotal", "description": "Total amount refunded by the customer. Note that that `date_day` will be when the order was created, not refunded.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_refund_tax": {"name": "total_refund_tax", "description": "Total tax applied to the customer's refunds.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "count_cancelled_orders": {"name": "count_cancelled_orders", "description": "The count of orders that the customer made on this day and canceled.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "count_products": {"name": "count_products", "description": "The count of distinct products (based on distinct `product_ids`) that the customer purchased.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "count_product_variants": {"name": "count_product_variants", "description": "The count of distinct products variants that the customer purchased.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "sum_quantity": {"name": "sum_quantity", "description": "The total quantity of items that the customer purchased.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_order_adjustment_amount": {"name": "total_order_adjustment_amount", "description": "The total amount of adjustments made to the customer's orders.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_order_adjustment_tax_amount": {"name": "total_order_adjustment_tax_amount", "description": "The total amount of taxes applied to adjustments made to the customer's orders.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify_holistic_reporting://models/intermediate/int_shopify_holistic_reporting.yml", "compiled_path": "target/compiled/shopify_holistic_reporting/models/intermediate/int__daily_shopify_customer_orders.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "shopify_holistic"}, "created_at": 1665702405.3217468, "compiled_sql": "with orders as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_shopify_holistic`.`shopify_holistic_reporting__orders_attribution`\n\n), order_lines as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_shopify`.`shopify__order_lines`\n\n), order_line_metrics as (\n\n select \n order_id,\n source_relation,\n count(distinct product_id) as count_products,\n count(distinct product_id || '-' || variant_id) as count_product_variants,\n sum(quantity) as sum_quantity\n \n from order_lines\n group by 1,2\n\n), join_orders as (\n\n select \n orders.*,\n order_line_metrics.count_products,\n order_line_metrics.count_product_variants,\n order_line_metrics.sum_quantity\n\n from orders \n left join order_line_metrics\n on orders.order_id = order_line_metrics.order_id\n and orders.shopify_source_relation = order_line_metrics.source_relation\n\n), daily_order_metrics as (\n\n select\n cast( timestamp_trunc(\n cast(created_timestamp as timestamp),\n day\n ) as date) as date_day,\n email,\n last_touch_campaign_id,\n last_touch_flow_id,\n last_touch_campaign_name,\n last_touch_flow_name,\n last_touch_variation_id,\n last_touch_campaign_subject_line,\n last_touch_campaign_type,\n shopify_source_relation as source_relation,\n\n count(distinct order_id) as total_orders,\n sum(order_adjusted_total) as total_price,\n\n sum(line_item_count) as count_line_items,\n sum(total_line_items_price) as total_line_items_price,\n \n\n sum(total_discounts) as total_discounts,\n sum(total_tax) as total_tax,\n sum(shipping_cost) as total_shipping_cost,\n\n \n sum(refund_subtotal) as total_refund_subtotal,\n sum(refund_total_tax) as total_refund_tax,\n \n\n sum(case when cancelled_timestamp is not null then 1 else 0 end) as count_cancelled_orders,\n sum(count_products) as count_products,\n sum(count_product_variants) as count_product_variants,\n sum(sum_quantity) as sum_quantity\n\n \n , sum(order_adjustment_amount) as total_order_adjustment_amount\n , sum(order_adjustment_tax_amount) as total_order_adjustment_tax_amount\n \n \n\n from join_orders\n group by 1,2,3,4,5,6,7,8,9,10\n)\n\nselect *\nfrom daily_order_metrics", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_shopify_holistic`.`int__daily_shopify_customer_orders`"}, "model.shopify_holistic_reporting.int__shopify_customer_rollup": {"raw_sql": "with customers as (\n\n select \n *,\n row_number() over(partition by email order by created_timestamp desc) as customer_index\n\n from {{ ref('shopify__customers') }}\n\n where email is not null -- nonsensical to include any null emails in this package\n\n), aggregate_customers as (\n\n select\n lower(email) as email,\n source_relation,\n {{ fivetran_utils.string_agg(\"cast(customer_id as \" ~ dbt_utils.type_string() ~ \")\", \"', '\") }} as customer_ids,\n {{ fivetran_utils.string_agg(\"distinct cast(phone as \" ~ dbt_utils.type_string() ~ \")\", \"', '\") }} as phone_numbers,\n\n max(case when customer_index = 1 then first_name || ' ' || last_name else null end) as full_name,\n\n min(created_timestamp) as first_shopify_account_made_at,\n max(created_timestamp) as last_shopify_account_made_at,\n min(first_order_timestamp) as first_order_at,\n max(most_recent_order_timestamp) as last_order_at,\n max(updated_timestamp) as last_updated_at,\n\n -- sum across accounts\n sum(lifetime_total_spent) as lifetime_total_spent,\n sum(lifetime_total_refunded) as lifetime_total_refunded,\n sum(lifetime_total_amount) as lifetime_total_amount,\n sum(lifetime_count_orders) as lifetime_count_orders,\n case \n when sum(lifetime_count_orders) = 0 then 0\n else sum(lifetime_total_spent) / sum(lifetime_count_orders) end as average_order_value,\n\n -- take true if ever given for boolean fields\n {{ fivetran_utils.max_bool(\"has_accepted_marketing\") }} as has_accepted_marketing,\n {{ fivetran_utils.max_bool(\"case when customer_index = 1 then is_tax_exempt else null end\") }} as is_tax_exempt, -- since this changes every year\n {{ fivetran_utils.max_bool(\"is_verified_email\") }} as is_verified_email,\n\n -- other stuff\n max(case when customer_index = 1 then default_address_id else null end) as default_address_id,\n max(case when customer_index = 1 then account_state else null end) as account_state\n\n -- ok let's get any custom passthrough columns! might want to put all max(Case when)'s in here....\n {% set cols = adapter.get_columns_in_relation(ref('shopify__customers')) %}\n {% set except_cols = ['_fivetran_synced', 'email', 'source_relation', 'customer_id', 'phone', 'first_name', 'last_name', 'created_timestamp', 'first_order_timestamp', 'most_recent_order_timestamp',\n 'updated_timestamp', 'lifetime_total_spent', 'lifetime_total_refunded', 'lifetime_total_amount', 'lifetime_count_orders', 'average_order_value', 'has_accepted_marketing',\n 'is_tax_exempt', 'is_verified_email', 'default_address_id', 'account_state'] %}\n {% for col in cols %}\n {% if col.column|lower not in except_cols %}\n , max(case when customer_index = 1 then {{ col.column }} else null end) as {{ col.column }}\n {% endif %}\n {% endfor %}\n\n from customers \n\n group by 1,2\n\n)\n\nselect *\nfrom aggregate_customers", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt_utils.type_string", "macro.fivetran_utils.string_agg", "macro.fivetran_utils.max_bool"], "nodes": ["model.shopify.shopify__customers", "model.shopify.shopify__customers"]}, "config": {"enabled": true, "alias": null, "schema": "shopify_holistic", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_shopify_holistic", "fqn": ["shopify_holistic_reporting", "intermediate", "int__shopify_customer_rollup"], "unique_id": "model.shopify_holistic_reporting.int__shopify_customer_rollup", "package_name": "shopify_holistic_reporting", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_holistic_reporting", "path": "intermediate/int__shopify_customer_rollup.sql", "original_file_path": "models/intermediate/int__shopify_customer_rollup.sql", "name": "int__shopify_customer_rollup", "alias": "int__shopify_customer_rollup", "checksum": {"name": "sha256", "checksum": "4ee4ea4a1e004aa732004a879fff8a885afe00f56e679b43ae87032740905bff"}, "tags": [], "refs": [["shopify__customers"], ["shopify__customers"]], "sources": [], "metrics": [], "description": "Table rolling up shopify customer accounts to the email level. In theory, these should be 1:1, but under certain circumstances (ie bots) one email can be associated with multiple customer_ids.\n", "columns": {"source_relation": {"name": "source_relation", "description": "The source where this data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioning together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "has_accepted_marketing": {"name": "has_accepted_marketing", "description": "Whether the customer has consented to receive marketing material via email.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_shopify_account_made_at": {"name": "first_shopify_account_made_at", "description": "The date and time when the customer account first associated with this email was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_shopify_account_made_at": {"name": "last_shopify_account_made_at", "description": "The date and time when the customer account first associated with this email was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "default_address_id": {"name": "default_address_id", "description": "The default address for the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email": {"name": "email", "description": "The unique email address of the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "full_name": {"name": "full_name", "description": "The customer's full name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "customer_ids": {"name": "customer_ids", "description": "A comma-separated aggregated list of Shopify IDs for the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "lifetime_count_orders": {"name": "lifetime_count_orders", "description": "The number of orders associated with this customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "phone_numbers": {"name": "phone_numbers", "description": "Comma separated aggregated list of unique phone numbers (E.164 format) for this customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "account_state": {"name": "account_state", "description": "The state of the customer's account with a shop.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_tax_exempt": {"name": "is_tax_exempt", "description": "Whether the customer is exempt from paying taxes on their order. If true, then taxes won't be applied to an order at checkout. If false, then taxes will be applied at checkout.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_updated_at": {"name": "last_updated_at", "description": "The date and time when the customer information was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_order_at": {"name": "first_order_at", "description": "The timestamp the customer completed their first order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_order_at": {"name": "last_order_at", "description": "The timestamp the customer completed their most recent order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "average_order_value": {"name": "average_order_value", "description": "The average order value for the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "lifetime_total_spent": {"name": "lifetime_total_spent", "description": "The total amount of money that the customer has spent on orders across their order history.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "lifetime_total_refunded": {"name": "lifetime_total_refunded", "description": "The total amount of money that the customer has been refunded on orders across their order history.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "lifetime_total_amount": {"name": "lifetime_total_amount", "description": "The total amount of money (minus refunds) that the customer has spent across their order history.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_verified_email": {"name": "is_verified_email", "description": "Whether the customer has verified their email address.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify_holistic_reporting://models/intermediate/int_shopify_holistic_reporting.yml", "compiled_path": "target/compiled/shopify_holistic_reporting/models/intermediate/int__shopify_customer_rollup.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "shopify_holistic"}, "created_at": 1665702405.324471, "compiled_sql": "with customers as (\n\n select \n *,\n row_number() over(partition by email order by created_timestamp desc) as customer_index\n\n from `dbt-package-testing`.`linkedin_integration_tests_shopify`.`shopify__customers`\n\n where email is not null -- nonsensical to include any null emails in this package\n\n), aggregate_customers as (\n\n select\n lower(email) as email,\n source_relation,\n \n string_agg(cast(customer_id as \n string\n), ', ')\n\n as customer_ids,\n \n string_agg(distinct cast(phone as \n string\n), ', ')\n\n as phone_numbers,\n\n max(case when customer_index = 1 then first_name || ' ' || last_name else null end) as full_name,\n\n min(created_timestamp) as first_shopify_account_made_at,\n max(created_timestamp) as last_shopify_account_made_at,\n min(first_order_timestamp) as first_order_at,\n max(most_recent_order_timestamp) as last_order_at,\n max(updated_timestamp) as last_updated_at,\n\n -- sum across accounts\n sum(lifetime_total_spent) as lifetime_total_spent,\n sum(lifetime_total_refunded) as lifetime_total_refunded,\n sum(lifetime_total_amount) as lifetime_total_amount,\n sum(lifetime_count_orders) as lifetime_count_orders,\n case \n when sum(lifetime_count_orders) = 0 then 0\n else sum(lifetime_total_spent) / sum(lifetime_count_orders) end as average_order_value,\n\n -- take true if ever given for boolean fields\n \n\n max( has_accepted_marketing )\n\n as has_accepted_marketing,\n \n\n max( case when customer_index = 1 then is_tax_exempt else null end )\n\n as is_tax_exempt, -- since this changes every year\n \n\n max( is_verified_email )\n\n as is_verified_email,\n\n -- other stuff\n max(case when customer_index = 1 then default_address_id else null end) as default_address_id,\n max(case when customer_index = 1 then account_state else null end) as account_state\n\n -- ok let's get any custom passthrough columns! might want to put all max(Case when)'s in here....\n \n \n \n\n from customers \n\n group by 1,2\n\n)\n\nselect *\nfrom aggregate_customers", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_shopify_holistic`.`int__shopify_customer_rollup`"}, "model.shopify_holistic_reporting.int__daily_klaviyo_user_metrics": {"raw_sql": "with events as (\n\n select *\n from {{ ref('klaviyo__events') }}\n\n), pivot_out_events as (\n \n select \n cast( {{ dbt_utils.date_trunc('day', 'occurred_at') }} as date) as date_day,\n person_email as email,\n last_touch_campaign_id,\n last_touch_flow_id,\n campaign_name,\n flow_name,\n variation_id,\n campaign_subject_line,\n campaign_type,\n source_relation,\n min(occurred_at) as first_event_at,\n max(occurred_at) as last_event_at\n\n -- sum up the numeric value associated with events (most likely will mean revenue)\n {% for rm in var('klaviyo__sum_revenue_metrics') %}\n , sum(case when lower(type) = '{{ rm | lower }}' then \n coalesce({{ fivetran_utils.try_cast(\"numeric_value\", \"numeric\") }}, 0)\n else 0 end) \n as {{ 'sum_revenue_' ~ rm | replace(' ', '_') | replace('(', '') | replace(')', '') | lower }} -- removing special characters that I have seen in different integration events\n {% endfor %}\n\n -- count up the number of instances of each metric\n {% for cm in var('klaviyo__count_metrics') %}\n , sum(case when lower(type) = '{{ cm | lower }}' then 1 else 0 end) \n as {{ 'count_' ~ cm | replace(' ', '_') | replace('(', '') | replace(')', '') | lower }} -- removing special characters that I have seen in different integration events\n {% endfor %}\n\n from events\n {{ dbt_utils.group_by(n=10) }}\n)\n\n-- the grain will be person-flow-campaign-variation-day\nselect *\nfrom pivot_out_events", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt_utils.date_trunc", "macro.fivetran_utils.try_cast", "macro.dbt_utils.group_by"], "nodes": ["model.klaviyo.klaviyo__events"]}, "config": {"enabled": true, "alias": null, "schema": "shopify_holistic", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_shopify_holistic", "fqn": ["shopify_holistic_reporting", "intermediate", "int__daily_klaviyo_user_metrics"], "unique_id": "model.shopify_holistic_reporting.int__daily_klaviyo_user_metrics", "package_name": "shopify_holistic_reporting", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_holistic_reporting", "path": "intermediate/int__daily_klaviyo_user_metrics.sql", "original_file_path": "models/intermediate/int__daily_klaviyo_user_metrics.sql", "name": "int__daily_klaviyo_user_metrics", "alias": "int__daily_klaviyo_user_metrics", "checksum": {"name": "sha256", "checksum": "9074aea6aba5dc661a9c2bf48cfddff3d94f7729b5ce0fd29316de663883d7b8"}, "tags": [], "refs": [["klaviyo__events"]], "sources": [], "metrics": [], "description": "", "columns": {"date_day": {"name": "date_day", "description": "Day on which the customer performed these activities.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email": {"name": "email", "description": "Email address of the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_campaign_id": {"name": "last_touch_campaign_id", "description": "Foreign key referencing the CAMPAIGN attributed with these metrics (by the package's attribution model).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_flow_id": {"name": "last_touch_flow_id", "description": "Foreign key referencing the FLOW attributed with these metrics (by the package's attribution model).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_name": {"name": "campaign_name", "description": "Name of the attributed campaign. If not specified, this will default to the subject of the campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_name": {"name": "flow_name", "description": "Name of the attributed flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variation_id": {"name": "variation_id", "description": "Unique ID of the attributed flow or campaign variation group. This does not map onto another table. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_event_at": {"name": "first_event_at", "description": "Timestamp of the first interaction between this campaign/flow and a person on this day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_event_at": {"name": "last_event_at", "description": "Timestamp of the last interaction between this campaign/flow and a person on this day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_subject_line": {"name": "campaign_subject_line", "description": "Email subject line of the Klaviyo campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_type": {"name": "campaign_type", "description": "Type of campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_relation": {"name": "source_relation", "description": "The source where this Klaviyo data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioning together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify_holistic_reporting://models/intermediate/int_shopify_holistic_reporting.yml", "compiled_path": "target/compiled/shopify_holistic_reporting/models/intermediate/int__daily_klaviyo_user_metrics.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "shopify_holistic"}, "created_at": 1665702405.3182101, "compiled_sql": "with events as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_klaviyo`.`klaviyo__events`\n\n), pivot_out_events as (\n \n select \n cast( timestamp_trunc(\n cast(occurred_at as timestamp),\n day\n ) as date) as date_day,\n person_email as email,\n last_touch_campaign_id,\n last_touch_flow_id,\n campaign_name,\n flow_name,\n variation_id,\n campaign_subject_line,\n campaign_type,\n source_relation,\n min(occurred_at) as first_event_at,\n max(occurred_at) as last_event_at\n\n -- sum up the numeric value associated with events (most likely will mean revenue)\n \n , sum(case when lower(type) = 'refunded order' then \n coalesce(\n \n safe_cast(numeric_value as numeric)\n\n, 0)\n else 0 end) \n as sum_revenue_refunded_order -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'placed order' then \n coalesce(\n \n safe_cast(numeric_value as numeric)\n\n, 0)\n else 0 end) \n as sum_revenue_placed_order -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'ordered product' then \n coalesce(\n \n safe_cast(numeric_value as numeric)\n\n, 0)\n else 0 end) \n as sum_revenue_ordered_product -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'checkout started' then \n coalesce(\n \n safe_cast(numeric_value as numeric)\n\n, 0)\n else 0 end) \n as sum_revenue_checkout_started -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'cancelled order' then \n coalesce(\n \n safe_cast(numeric_value as numeric)\n\n, 0)\n else 0 end) \n as sum_revenue_cancelled_order -- removing special characters that I have seen in different integration events\n \n\n -- count up the number of instances of each metric\n \n , sum(case when lower(type) = 'active on site' then 1 else 0 end) \n as count_active_on_site -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'viewed product' then 1 else 0 end) \n as count_viewed_product -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'ordered product' then 1 else 0 end) \n as count_ordered_product -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'placed order' then 1 else 0 end) \n as count_placed_order -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'refunded order' then 1 else 0 end) \n as count_refunded_order -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'received email' then 1 else 0 end) \n as count_received_email -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'clicked email' then 1 else 0 end) \n as count_clicked_email -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'opened email' then 1 else 0 end) \n as count_opened_email -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'marked email as spam' then 1 else 0 end) \n as count_marked_email_as_spam -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'unsubscribed' then 1 else 0 end) \n as count_unsubscribed -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'received sms' then 1 else 0 end) \n as count_received_sms -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'clicked sms' then 1 else 0 end) \n as count_clicked_sms -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'sent sms' then 1 else 0 end) \n as count_sent_sms -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'unsubscribed from sms' then 1 else 0 end) \n as count_unsubscribed_from_sms -- removing special characters that I have seen in different integration events\n \n\n from events\n group by 1,2,3,4,5,6,7,8,9,10\n)\n\n-- the grain will be person-flow-campaign-variation-day\nselect *\nfrom pivot_out_events", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_shopify_holistic`.`int__daily_klaviyo_user_metrics`"}, "model.shopify_holistic_reporting.int__klaviyo_person_rollup": {"raw_sql": "with persons as (\n\n select\n *,\n row_number() over (partition by email order by created_at desc) as person_index\n \n from {{ ref('klaviyo__persons') }}\n where email is not null -- should never be the case but just in case\n\n), aggregate_persons as (\n\n select \n lower(email) as email,\n source_relation,\n {{ fivetran_utils.string_agg(\"person_id\", \"', '\") }} as person_ids,\n {{ fivetran_utils.string_agg(\"distinct cast(phone_number as \" ~ dbt_utils.type_string() ~ \")\", \"', '\") }} as phone_numbers,\n max( case when person_index = 1 then full_name else null end) as full_name,\n \n min(created_at) as first_klaviyo_account_made_at,\n max(created_at) as last_klaviyo_account_made_at,\n max(updated_at) as last_updated_at,\n min(first_event_at) as first_event_at,\n max(last_event_at) as last_event_at,\n min(first_campaign_touch_at) as first_campaign_touch_at,\n max(last_campaign_touch_at) as last_campaign_touch_at,\n min(first_flow_touch_at) as first_flow_touch_at,\n max(last_flow_touch_at) as last_flow_touch_at,\n\n sum(count_total_campaigns) as count_total_campaigns,\n sum(count_total_flows) as count_total_flows\n\n\n {% set cols = adapter.get_columns_in_relation(ref('klaviyo__persons')) %}\n {% set except_cols = ['_fivetran_synced', 'email', 'source_relation', 'person_id', 'phone_number', 'full_name', 'created_at', 'updated_at', 'count_total_campaigns', 'count_total_flows',\n 'first_event_at', 'last_event_at', 'first_campaign_touch_at', 'last_campaign_touch_at', 'first_flow_touch_at', 'last_flow_touch_at'] %}\n {% for col in cols %}\n {% if col.column|lower not in except_cols %}\n , max(case when person_index = 1 then {{ col.column }} else null end) as {{ col.column }}\n {% endif %}\n {% endfor %}\n\n from persons\n group by 1,2\n)\n\nselect *\nfrom aggregate_persons", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.string_agg", "macro.dbt_utils.type_string"], "nodes": ["model.klaviyo.klaviyo__persons", "model.klaviyo.klaviyo__persons"]}, "config": {"enabled": true, "alias": null, "schema": "shopify_holistic", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_shopify_holistic", "fqn": ["shopify_holistic_reporting", "intermediate", "int__klaviyo_person_rollup"], "unique_id": "model.shopify_holistic_reporting.int__klaviyo_person_rollup", "package_name": "shopify_holistic_reporting", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_holistic_reporting", "path": "intermediate/int__klaviyo_person_rollup.sql", "original_file_path": "models/intermediate/int__klaviyo_person_rollup.sql", "name": "int__klaviyo_person_rollup", "alias": "int__klaviyo_person_rollup", "checksum": {"name": "sha256", "checksum": "45decc1969fef4f4fe0fb7ec2b4531a4a57a160d1610e2fa5f8029173b50414a"}, "tags": [], "refs": [["klaviyo__persons"], ["klaviyo__persons"]], "sources": [], "metrics": [], "description": "Table rolling up Klaviyo person accounts to the email level. In theory, these should certainly be 1:1, but under certain circumstances emails can be sent with multiple person_ids from the Klaviyo API.\n", "columns": {"source_relation": {"name": "source_relation", "description": "The source where this data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioning together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email": {"name": "email", "description": "The email address and the unique identifier for a profile.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "person_ids": {"name": "person_ids", "description": "A comma-separated aggregated list of Klaviyo IDs for the person.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "phone_numbers": {"name": "phone_numbers", "description": "Comma separated aggregated list of unique phone numbers for this person.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "full_name": {"name": "full_name", "description": "Person's full name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_klaviyo_account_made_at": {"name": "first_klaviyo_account_made_at", "description": "Timestamp of when the person's profile was first created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_klaviyo_account_made_at": {"name": "last_klaviyo_account_made_at", "description": "Timestamp of when the person's profile was last created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_updated_at": {"name": "last_updated_at", "description": "Timestamp of when the person profile was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_event_at": {"name": "first_event_at", "description": "Timestamp of when the user first triggered an event (not limited to campaign and flow interactions).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_event_at": {"name": "last_event_at", "description": "Timestamp of when the user last triggered an event (not limited to campaign and flow interactions).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_campaign_touch_at": {"name": "first_campaign_touch_at", "description": "Timestamp of when the user first interacted with a campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_campaign_touch_at": {"name": "last_campaign_touch_at", "description": "Timestamp of when the user last interacted with a campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_flow_touch_at": {"name": "first_flow_touch_at", "description": "Timestamp of when the user first interacted with a flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_flow_touch_at": {"name": "last_flow_touch_at", "description": "Timestamp of when the user last interacted with a flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "count_total_campaigns": {"name": "count_total_campaigns", "description": "Count of the number of campaigns this person has interacted with.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "count_total_flows": {"name": "count_total_flows", "description": "Count of the number of flows this person has interacted with.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "address_1": {"name": "address_1", "description": "First line of the person's address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "address_2": {"name": "address_2", "description": "Second line of the person's address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "city": {"name": "city", "description": "City they live in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "country": {"name": "country", "description": "Country they live in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "zip": {"name": "zip", "description": "Postal code where they live.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "latitude": {"name": "latitude", "description": "Latitude of the person's location.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "longitude": {"name": "longitude", "description": "Longitude of the person's location.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization": {"name": "organization", "description": "Business organization they belong to.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "region": {"name": "region", "description": "Region or state they live in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "timezone": {"name": "timezone", "description": "Timezone they are situated in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "title": {"name": "title", "description": "Title at their business or organization.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify_holistic_reporting://models/intermediate/int_shopify_holistic_reporting.yml", "compiled_path": "target/compiled/shopify_holistic_reporting/models/intermediate/int__klaviyo_person_rollup.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "shopify_holistic"}, "created_at": 1665702405.3281338, "compiled_sql": "with persons as (\n\n select\n *,\n row_number() over (partition by email order by created_at desc) as person_index\n \n from `dbt-package-testing`.`linkedin_integration_tests_klaviyo`.`klaviyo__persons`\n where email is not null -- should never be the case but just in case\n\n), aggregate_persons as (\n\n select \n lower(email) as email,\n source_relation,\n \n string_agg(person_id, ', ')\n\n as person_ids,\n \n string_agg(distinct cast(phone_number as \n string\n), ', ')\n\n as phone_numbers,\n max( case when person_index = 1 then full_name else null end) as full_name,\n \n min(created_at) as first_klaviyo_account_made_at,\n max(created_at) as last_klaviyo_account_made_at,\n max(updated_at) as last_updated_at,\n min(first_event_at) as first_event_at,\n max(last_event_at) as last_event_at,\n min(first_campaign_touch_at) as first_campaign_touch_at,\n max(last_campaign_touch_at) as last_campaign_touch_at,\n min(first_flow_touch_at) as first_flow_touch_at,\n max(last_flow_touch_at) as last_flow_touch_at,\n\n sum(count_total_campaigns) as count_total_campaigns,\n sum(count_total_flows) as count_total_flows\n\n\n \n \n \n\n from persons\n group by 1,2\n)\n\nselect *\nfrom aggregate_persons", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`linkedin_integration_tests_shopify_holistic`.`int__klaviyo_person_rollup`"}, "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__customer_customer_id__source_relation.1b2185db25": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_d00da641d0cc06ebef083c43ddfae4be\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["customer_id", "source_relation"], "model": "{{ get_where_subquery(ref('stg_shopify__customer')) }}"}, "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.shopify_source.stg_shopify__customer"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_d00da641d0cc06ebef083c43ddfae4be", "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["shopify_source", "dbt_utils_unique_combination_of_columns_stg_shopify__customer_customer_id__source_relation"], "unique_id": "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__customer_customer_id__source_relation.1b2185db25", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "dbt_utils_unique_combination_o_d00da641d0cc06ebef083c43ddfae4be.sql", "original_file_path": "models/stg_shopify.yml", "name": "dbt_utils_unique_combination_of_columns_stg_shopify__customer_customer_id__source_relation", "alias": "dbt_utils_unique_combination_o_d00da641d0cc06ebef083c43ddfae4be", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_shopify__customer"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/stg_shopify.yml/dbt_utils_unique_combination_o_d00da641d0cc06ebef083c43ddfae4be.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_d00da641d0cc06ebef083c43ddfae4be"}, "created_at": 1665702405.040355, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n customer_id, source_relation\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__customer`\n group by customer_id, source_relation\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_shopify__customer"}, "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_line_refund_order_line_refund_id__source_relation.1877420c29": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_33b2f20dc9ea13a94a10a635383becf3\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["order_line_refund_id", "source_relation"], "model": "{{ get_where_subquery(ref('stg_shopify__order_line_refund')) }}"}, "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.shopify_source.stg_shopify__order_line_refund"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_33b2f20dc9ea13a94a10a635383becf3", "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["shopify_source", "dbt_utils_unique_combination_of_columns_stg_shopify__order_line_refund_order_line_refund_id__source_relation"], "unique_id": "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_line_refund_order_line_refund_id__source_relation.1877420c29", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "dbt_utils_unique_combination_o_33b2f20dc9ea13a94a10a635383becf3.sql", "original_file_path": "models/stg_shopify.yml", "name": "dbt_utils_unique_combination_of_columns_stg_shopify__order_line_refund_order_line_refund_id__source_relation", "alias": "dbt_utils_unique_combination_o_33b2f20dc9ea13a94a10a635383becf3", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_shopify__order_line_refund"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/stg_shopify.yml/dbt_utils_unique_combination_o_33b2f20dc9ea13a94a10a635383becf3.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_33b2f20dc9ea13a94a10a635383becf3"}, "created_at": 1665702405.047092, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n order_line_refund_id, source_relation\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__order_line_refund`\n group by order_line_refund_id, source_relation\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_shopify__order_line_refund"}, "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_line_order_line_id__source_relation.c2797e7a9c": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_d47b5ce640a9316320c17565339223ec\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["order_line_id", "source_relation"], "model": "{{ get_where_subquery(ref('stg_shopify__order_line')) }}"}, "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.shopify_source.stg_shopify__order_line"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_d47b5ce640a9316320c17565339223ec", "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["shopify_source", "dbt_utils_unique_combination_of_columns_stg_shopify__order_line_order_line_id__source_relation"], "unique_id": "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_line_order_line_id__source_relation.c2797e7a9c", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "dbt_utils_unique_combination_o_d47b5ce640a9316320c17565339223ec.sql", "original_file_path": "models/stg_shopify.yml", "name": "dbt_utils_unique_combination_of_columns_stg_shopify__order_line_order_line_id__source_relation", "alias": "dbt_utils_unique_combination_o_d47b5ce640a9316320c17565339223ec", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_shopify__order_line"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/stg_shopify.yml/dbt_utils_unique_combination_o_d47b5ce640a9316320c17565339223ec.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_d47b5ce640a9316320c17565339223ec"}, "created_at": 1665702405.049681, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n order_line_id, source_relation\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__order_line`\n group by order_line_id, source_relation\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_shopify__order_line"}, "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_order_id__source_relation.81d10381c1": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_3f5201314db17428b709b11583cd0f7e\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["order_id", "source_relation"], "model": "{{ get_where_subquery(ref('stg_shopify__order')) }}"}, "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.shopify_source.stg_shopify__order"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_3f5201314db17428b709b11583cd0f7e", "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["shopify_source", "dbt_utils_unique_combination_of_columns_stg_shopify__order_order_id__source_relation"], "unique_id": "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_order_id__source_relation.81d10381c1", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "dbt_utils_unique_combination_o_3f5201314db17428b709b11583cd0f7e.sql", "original_file_path": "models/stg_shopify.yml", "name": "dbt_utils_unique_combination_of_columns_stg_shopify__order_order_id__source_relation", "alias": "dbt_utils_unique_combination_o_3f5201314db17428b709b11583cd0f7e", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_shopify__order"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/stg_shopify.yml/dbt_utils_unique_combination_o_3f5201314db17428b709b11583cd0f7e.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_3f5201314db17428b709b11583cd0f7e"}, "created_at": 1665702405.0522509, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n order_id, source_relation\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__order`\n group by order_id, source_relation\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_shopify__order"}, "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__product_product_id__source_relation.48b32ab6a2": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_eb9efccfbdaff32f938da98287403a1d\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["product_id", "source_relation"], "model": "{{ get_where_subquery(ref('stg_shopify__product')) }}"}, "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.shopify_source.stg_shopify__product"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_eb9efccfbdaff32f938da98287403a1d", "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["shopify_source", "dbt_utils_unique_combination_of_columns_stg_shopify__product_product_id__source_relation"], "unique_id": "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__product_product_id__source_relation.48b32ab6a2", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "dbt_utils_unique_combination_o_eb9efccfbdaff32f938da98287403a1d.sql", "original_file_path": "models/stg_shopify.yml", "name": "dbt_utils_unique_combination_of_columns_stg_shopify__product_product_id__source_relation", "alias": "dbt_utils_unique_combination_o_eb9efccfbdaff32f938da98287403a1d", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_shopify__product"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/stg_shopify.yml/dbt_utils_unique_combination_o_eb9efccfbdaff32f938da98287403a1d.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_eb9efccfbdaff32f938da98287403a1d"}, "created_at": 1665702405.0550249, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n product_id, source_relation\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__product`\n group by product_id, source_relation\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_shopify__product"}, "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__product_variant_variant_id__source_relation.7506695ec0": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_84d19b85e52ebcaca03bcefe4191b60e\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["variant_id", "source_relation"], "model": "{{ get_where_subquery(ref('stg_shopify__product_variant')) }}"}, "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.shopify_source.stg_shopify__product_variant"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_84d19b85e52ebcaca03bcefe4191b60e", "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["shopify_source", "dbt_utils_unique_combination_of_columns_stg_shopify__product_variant_variant_id__source_relation"], "unique_id": "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__product_variant_variant_id__source_relation.7506695ec0", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "dbt_utils_unique_combination_o_84d19b85e52ebcaca03bcefe4191b60e.sql", "original_file_path": "models/stg_shopify.yml", "name": "dbt_utils_unique_combination_of_columns_stg_shopify__product_variant_variant_id__source_relation", "alias": "dbt_utils_unique_combination_o_84d19b85e52ebcaca03bcefe4191b60e", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_shopify__product_variant"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/stg_shopify.yml/dbt_utils_unique_combination_o_84d19b85e52ebcaca03bcefe4191b60e.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_84d19b85e52ebcaca03bcefe4191b60e"}, "created_at": 1665702405.057497, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n variant_id, source_relation\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__product_variant`\n group by variant_id, source_relation\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_shopify__product_variant"}, "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__transaction_transaction_id__source_relation.d55a33652a": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_47aceb0b987e9f3279b4301c10167f92\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["transaction_id", "source_relation"], "model": "{{ get_where_subquery(ref('stg_shopify__transaction')) }}"}, "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.shopify_source.stg_shopify__transaction"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_47aceb0b987e9f3279b4301c10167f92", "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["shopify_source", "dbt_utils_unique_combination_of_columns_stg_shopify__transaction_transaction_id__source_relation"], "unique_id": "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__transaction_transaction_id__source_relation.d55a33652a", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "dbt_utils_unique_combination_o_47aceb0b987e9f3279b4301c10167f92.sql", "original_file_path": "models/stg_shopify.yml", "name": "dbt_utils_unique_combination_of_columns_stg_shopify__transaction_transaction_id__source_relation", "alias": "dbt_utils_unique_combination_o_47aceb0b987e9f3279b4301c10167f92", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_shopify__transaction"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/stg_shopify.yml/dbt_utils_unique_combination_o_47aceb0b987e9f3279b4301c10167f92.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_47aceb0b987e9f3279b4301c10167f92"}, "created_at": 1665702405.060158, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n transaction_id, source_relation\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__transaction`\n group by transaction_id, source_relation\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_shopify__transaction"}, "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__refund_refund_id__source_relation.cd4dbc2b35": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_b6b83918833e84e9f886aa4151e4e659\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["refund_id", "source_relation"], "model": "{{ get_where_subquery(ref('stg_shopify__refund')) }}"}, "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.shopify_source.stg_shopify__refund"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_b6b83918833e84e9f886aa4151e4e659", "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["shopify_source", "dbt_utils_unique_combination_of_columns_stg_shopify__refund_refund_id__source_relation"], "unique_id": "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__refund_refund_id__source_relation.cd4dbc2b35", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "dbt_utils_unique_combination_o_b6b83918833e84e9f886aa4151e4e659.sql", "original_file_path": "models/stg_shopify.yml", "name": "dbt_utils_unique_combination_of_columns_stg_shopify__refund_refund_id__source_relation", "alias": "dbt_utils_unique_combination_o_b6b83918833e84e9f886aa4151e4e659", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_shopify__refund"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/stg_shopify.yml/dbt_utils_unique_combination_o_b6b83918833e84e9f886aa4151e4e659.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_b6b83918833e84e9f886aa4151e4e659"}, "created_at": 1665702405.0627332, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n refund_id, source_relation\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__refund`\n group by refund_id, source_relation\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_shopify__refund"}, "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_adjustment_order_adjustment_id__source_relation.00b7d10cb0": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_8c4679057a756bef5907cd3799634207\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["order_adjustment_id", "source_relation"], "model": "{{ get_where_subquery(ref('stg_shopify__order_adjustment')) }}"}, "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.shopify_source.stg_shopify__order_adjustment"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_8c4679057a756bef5907cd3799634207", "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["shopify_source", "dbt_utils_unique_combination_of_columns_stg_shopify__order_adjustment_order_adjustment_id__source_relation"], "unique_id": "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_adjustment_order_adjustment_id__source_relation.00b7d10cb0", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "dbt_utils_unique_combination_o_8c4679057a756bef5907cd3799634207.sql", "original_file_path": "models/stg_shopify.yml", "name": "dbt_utils_unique_combination_of_columns_stg_shopify__order_adjustment_order_adjustment_id__source_relation", "alias": "dbt_utils_unique_combination_o_8c4679057a756bef5907cd3799634207", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_shopify__order_adjustment"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/stg_shopify.yml/dbt_utils_unique_combination_o_8c4679057a756bef5907cd3799634207.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_8c4679057a756bef5907cd3799634207"}, "created_at": 1665702405.065301, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n order_adjustment_id, source_relation\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__order_adjustment`\n group by order_adjustment_id, source_relation\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_shopify__order_adjustment"}, "test.klaviyo_source.not_null_stg_klaviyo__campaign_campaign_id.5dfc47dc1d": {"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_klaviyo__campaign')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.klaviyo_source.stg_klaviyo__campaign"]}, "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["klaviyo_source", "not_null_stg_klaviyo__campaign_campaign_id"], "unique_id": "test.klaviyo_source.not_null_stg_klaviyo__campaign_campaign_id.5dfc47dc1d", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "not_null_stg_klaviyo__campaign_campaign_id.sql", "original_file_path": "models/stg_klaviyo.yml", "name": "not_null_stg_klaviyo__campaign_campaign_id", "alias": "not_null_stg_klaviyo__campaign_campaign_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_klaviyo__campaign"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo.yml/not_null_stg_klaviyo__campaign_campaign_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1665702405.1435468, "compiled_sql": "\n \n \n\n\n\nselect campaign_id\nfrom `dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__campaign`\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_klaviyo__campaign"}, "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__campaign_campaign_id__source_relation.59158488ff": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_972961dcf9c5c4d5b8e43db578561c26\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["campaign_id", "source_relation"], "model": "{{ get_where_subquery(ref('stg_klaviyo__campaign')) }}"}, "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.klaviyo_source.stg_klaviyo__campaign"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_972961dcf9c5c4d5b8e43db578561c26", "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["klaviyo_source", "dbt_utils_unique_combination_of_columns_stg_klaviyo__campaign_campaign_id__source_relation"], "unique_id": "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__campaign_campaign_id__source_relation.59158488ff", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "dbt_utils_unique_combination_o_972961dcf9c5c4d5b8e43db578561c26.sql", "original_file_path": "models/stg_klaviyo.yml", "name": "dbt_utils_unique_combination_of_columns_stg_klaviyo__campaign_campaign_id__source_relation", "alias": "dbt_utils_unique_combination_o_972961dcf9c5c4d5b8e43db578561c26", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_klaviyo__campaign"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo.yml/dbt_utils_unique_combination_o_972961dcf9c5c4d5b8e43db578561c26.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_972961dcf9c5c4d5b8e43db578561c26"}, "created_at": 1665702405.144762, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n campaign_id, source_relation\n from `dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__campaign`\n group by campaign_id, source_relation\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_klaviyo__campaign"}, "test.klaviyo_source.not_null_stg_klaviyo__event_event_id.7a09ac6ec1": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('stg_klaviyo__event')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.klaviyo_source.stg_klaviyo__event"]}, "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["klaviyo_source", "not_null_stg_klaviyo__event_event_id"], "unique_id": "test.klaviyo_source.not_null_stg_klaviyo__event_event_id.7a09ac6ec1", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "not_null_stg_klaviyo__event_event_id.sql", "original_file_path": "models/stg_klaviyo.yml", "name": "not_null_stg_klaviyo__event_event_id", "alias": "not_null_stg_klaviyo__event_event_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_klaviyo__event"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo.yml/not_null_stg_klaviyo__event_event_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1665702405.1474612, "compiled_sql": "\n \n \n\n\n\nselect event_id\nfrom `dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__event`\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_id", "file_key_name": "models.stg_klaviyo__event"}, "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__event_event_id__source_relation.3778c651d7": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_8881439048410324e034ca08f1ef95fa\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["event_id", "source_relation"], "model": "{{ get_where_subquery(ref('stg_klaviyo__event')) }}"}, "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.klaviyo_source.stg_klaviyo__event"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_8881439048410324e034ca08f1ef95fa", "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["klaviyo_source", "dbt_utils_unique_combination_of_columns_stg_klaviyo__event_event_id__source_relation"], "unique_id": "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__event_event_id__source_relation.3778c651d7", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "dbt_utils_unique_combination_o_8881439048410324e034ca08f1ef95fa.sql", "original_file_path": "models/stg_klaviyo.yml", "name": "dbt_utils_unique_combination_of_columns_stg_klaviyo__event_event_id__source_relation", "alias": "dbt_utils_unique_combination_o_8881439048410324e034ca08f1ef95fa", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_klaviyo__event"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo.yml/dbt_utils_unique_combination_o_8881439048410324e034ca08f1ef95fa.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_8881439048410324e034ca08f1ef95fa"}, "created_at": 1665702405.148426, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n event_id, source_relation\n from `dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__event`\n group by event_id, source_relation\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_klaviyo__event"}, "test.klaviyo_source.not_null_stg_klaviyo__flow_flow_id.a00a897e42": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "flow_id", "model": "{{ get_where_subquery(ref('stg_klaviyo__flow')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.klaviyo_source.stg_klaviyo__flow"]}, "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["klaviyo_source", "not_null_stg_klaviyo__flow_flow_id"], "unique_id": "test.klaviyo_source.not_null_stg_klaviyo__flow_flow_id.a00a897e42", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "not_null_stg_klaviyo__flow_flow_id.sql", "original_file_path": "models/stg_klaviyo.yml", "name": "not_null_stg_klaviyo__flow_flow_id", "alias": "not_null_stg_klaviyo__flow_flow_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_klaviyo__flow"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo.yml/not_null_stg_klaviyo__flow_flow_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1665702405.150979, "compiled_sql": "\n \n \n\n\n\nselect flow_id\nfrom `dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__flow`\nwhere flow_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "flow_id", "file_key_name": "models.stg_klaviyo__flow"}, "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__flow_flow_id__source_relation.015215d481": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_007bf18d3b6d4b25aebcc986dc772270\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["flow_id", "source_relation"], "model": "{{ get_where_subquery(ref('stg_klaviyo__flow')) }}"}, "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.klaviyo_source.stg_klaviyo__flow"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_007bf18d3b6d4b25aebcc986dc772270", "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["klaviyo_source", "dbt_utils_unique_combination_of_columns_stg_klaviyo__flow_flow_id__source_relation"], "unique_id": "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__flow_flow_id__source_relation.015215d481", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "dbt_utils_unique_combination_o_007bf18d3b6d4b25aebcc986dc772270.sql", "original_file_path": "models/stg_klaviyo.yml", "name": "dbt_utils_unique_combination_of_columns_stg_klaviyo__flow_flow_id__source_relation", "alias": "dbt_utils_unique_combination_o_007bf18d3b6d4b25aebcc986dc772270", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_klaviyo__flow"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo.yml/dbt_utils_unique_combination_o_007bf18d3b6d4b25aebcc986dc772270.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_007bf18d3b6d4b25aebcc986dc772270"}, "created_at": 1665702405.15194, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n flow_id, source_relation\n from `dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__flow`\n group by flow_id, source_relation\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_klaviyo__flow"}, "test.klaviyo_source.not_null_stg_klaviyo__integration_integration_id.fe572c5f1b": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "integration_id", "model": "{{ get_where_subquery(ref('stg_klaviyo__integration')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.klaviyo_source.stg_klaviyo__integration"]}, "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["klaviyo_source", "not_null_stg_klaviyo__integration_integration_id"], "unique_id": "test.klaviyo_source.not_null_stg_klaviyo__integration_integration_id.fe572c5f1b", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "not_null_stg_klaviyo__integration_integration_id.sql", "original_file_path": "models/stg_klaviyo.yml", "name": "not_null_stg_klaviyo__integration_integration_id", "alias": "not_null_stg_klaviyo__integration_integration_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_klaviyo__integration"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo.yml/not_null_stg_klaviyo__integration_integration_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1665702405.154494, "compiled_sql": "\n \n \n\n\n\nselect integration_id\nfrom `dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__integration`\nwhere integration_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "integration_id", "file_key_name": "models.stg_klaviyo__integration"}, "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__integration_integration_id__source_relation.be6158ad21": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_a7f288c54a3281da69034a0f95230596\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["integration_id", "source_relation"], "model": "{{ get_where_subquery(ref('stg_klaviyo__integration')) }}"}, "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.klaviyo_source.stg_klaviyo__integration"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_a7f288c54a3281da69034a0f95230596", "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["klaviyo_source", "dbt_utils_unique_combination_of_columns_stg_klaviyo__integration_integration_id__source_relation"], "unique_id": "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__integration_integration_id__source_relation.be6158ad21", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "dbt_utils_unique_combination_o_a7f288c54a3281da69034a0f95230596.sql", "original_file_path": "models/stg_klaviyo.yml", "name": "dbt_utils_unique_combination_of_columns_stg_klaviyo__integration_integration_id__source_relation", "alias": "dbt_utils_unique_combination_o_a7f288c54a3281da69034a0f95230596", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_klaviyo__integration"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo.yml/dbt_utils_unique_combination_o_a7f288c54a3281da69034a0f95230596.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_a7f288c54a3281da69034a0f95230596"}, "created_at": 1665702405.155454, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n integration_id, source_relation\n from `dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__integration`\n group by integration_id, source_relation\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_klaviyo__integration"}, "test.klaviyo_source.not_null_stg_klaviyo__person_person_id.bd77ffc8aa": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "person_id", "model": "{{ get_where_subquery(ref('stg_klaviyo__person')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.klaviyo_source.stg_klaviyo__person"]}, "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["klaviyo_source", "not_null_stg_klaviyo__person_person_id"], "unique_id": "test.klaviyo_source.not_null_stg_klaviyo__person_person_id.bd77ffc8aa", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "not_null_stg_klaviyo__person_person_id.sql", "original_file_path": "models/stg_klaviyo.yml", "name": "not_null_stg_klaviyo__person_person_id", "alias": "not_null_stg_klaviyo__person_person_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_klaviyo__person"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo.yml/not_null_stg_klaviyo__person_person_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1665702405.158001, "compiled_sql": "\n \n \n\n\n\nselect person_id\nfrom `dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__person`\nwhere person_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "person_id", "file_key_name": "models.stg_klaviyo__person"}, "test.klaviyo_source.unique_stg_klaviyo__person_email.dc3a98b014": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}{{ config(severity=\"warn\") }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "email", "model": "{{ get_where_subquery(ref('stg_klaviyo__person')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.klaviyo_source.stg_klaviyo__person"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "WARN", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_dbt_test__audit", "fqn": ["klaviyo_source", "unique_stg_klaviyo__person_email"], "unique_id": "test.klaviyo_source.unique_stg_klaviyo__person_email.dc3a98b014", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "unique_stg_klaviyo__person_email.sql", "original_file_path": "models/stg_klaviyo.yml", "name": "unique_stg_klaviyo__person_email", "alias": "unique_stg_klaviyo__person_email", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_klaviyo__person"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo.yml/unique_stg_klaviyo__person_email.sql", "build_path": null, "deferred": false, "unrendered_config": {"severity": "WARN"}, "created_at": 1665702405.159242, "compiled_sql": "\n \n \n\nwith dbt_test__target as (\n\n select email as unique_field\n from `dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__person`\n where email 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\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "email", "file_key_name": "models.stg_klaviyo__person"}, "test.klaviyo_source.not_null_stg_klaviyo__person_email.c7094cfe27": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "email", "model": "{{ get_where_subquery(ref('stg_klaviyo__person')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.klaviyo_source.stg_klaviyo__person"]}, "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["klaviyo_source", "not_null_stg_klaviyo__person_email"], "unique_id": "test.klaviyo_source.not_null_stg_klaviyo__person_email.c7094cfe27", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "not_null_stg_klaviyo__person_email.sql", "original_file_path": "models/stg_klaviyo.yml", "name": "not_null_stg_klaviyo__person_email", "alias": "not_null_stg_klaviyo__person_email", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_klaviyo__person"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo.yml/not_null_stg_klaviyo__person_email.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1665702405.160204, "compiled_sql": "\n \n \n\n\n\nselect email\nfrom `dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__person`\nwhere email is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "email", "file_key_name": "models.stg_klaviyo__person"}, "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__person_person_id__source_relation.33a4f9ca24": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_df656836e047bb69a86997735efb3161\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["person_id", "source_relation"], "model": "{{ get_where_subquery(ref('stg_klaviyo__person')) }}"}, "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.klaviyo_source.stg_klaviyo__person"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_df656836e047bb69a86997735efb3161", "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["klaviyo_source", "dbt_utils_unique_combination_of_columns_stg_klaviyo__person_person_id__source_relation"], "unique_id": "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__person_person_id__source_relation.33a4f9ca24", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "dbt_utils_unique_combination_o_df656836e047bb69a86997735efb3161.sql", "original_file_path": "models/stg_klaviyo.yml", "name": "dbt_utils_unique_combination_of_columns_stg_klaviyo__person_person_id__source_relation", "alias": "dbt_utils_unique_combination_o_df656836e047bb69a86997735efb3161", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_klaviyo__person"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo.yml/dbt_utils_unique_combination_o_df656836e047bb69a86997735efb3161.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_df656836e047bb69a86997735efb3161"}, "created_at": 1665702405.1611462, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n person_id, source_relation\n from `dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__person`\n group by person_id, source_relation\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_klaviyo__person"}, "test.klaviyo_source.not_null_stg_klaviyo__metric_metric_id.4759d62078": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "metric_id", "model": "{{ get_where_subquery(ref('stg_klaviyo__metric')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.klaviyo_source.stg_klaviyo__metric"]}, "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["klaviyo_source", "not_null_stg_klaviyo__metric_metric_id"], "unique_id": "test.klaviyo_source.not_null_stg_klaviyo__metric_metric_id.4759d62078", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "not_null_stg_klaviyo__metric_metric_id.sql", "original_file_path": "models/stg_klaviyo.yml", "name": "not_null_stg_klaviyo__metric_metric_id", "alias": "not_null_stg_klaviyo__metric_metric_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_klaviyo__metric"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo.yml/not_null_stg_klaviyo__metric_metric_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1665702405.163696, "compiled_sql": "\n \n \n\n\n\nselect metric_id\nfrom `dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__metric`\nwhere metric_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "metric_id", "file_key_name": "models.stg_klaviyo__metric"}, "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__metric_metric_id__source_relation.e9f33c04e5": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_45cba7e3442f1bc3264a04c52efb4d58\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["metric_id", "source_relation"], "model": "{{ get_where_subquery(ref('stg_klaviyo__metric')) }}"}, "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.klaviyo_source.stg_klaviyo__metric"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_45cba7e3442f1bc3264a04c52efb4d58", "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["klaviyo_source", "dbt_utils_unique_combination_of_columns_stg_klaviyo__metric_metric_id__source_relation"], "unique_id": "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__metric_metric_id__source_relation.e9f33c04e5", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "dbt_utils_unique_combination_o_45cba7e3442f1bc3264a04c52efb4d58.sql", "original_file_path": "models/stg_klaviyo.yml", "name": "dbt_utils_unique_combination_of_columns_stg_klaviyo__metric_metric_id__source_relation", "alias": "dbt_utils_unique_combination_o_45cba7e3442f1bc3264a04c52efb4d58", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_klaviyo__metric"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo.yml/dbt_utils_unique_combination_o_45cba7e3442f1bc3264a04c52efb4d58.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_45cba7e3442f1bc3264a04c52efb4d58"}, "created_at": 1665702405.164653, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n metric_id, source_relation\n from `dbt-package-testing`.`linkedin_integration_tests_stg_klaviyo`.`stg_klaviyo__metric`\n group by metric_id, source_relation\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_klaviyo__metric"}, "test.klaviyo.not_null_klaviyo__events_event_id.eada7340ba": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('klaviyo__events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.klaviyo.klaviyo__events"]}, "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["klaviyo", "not_null_klaviyo__events_event_id"], "unique_id": "test.klaviyo.not_null_klaviyo__events_event_id.eada7340ba", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "not_null_klaviyo__events_event_id.sql", "original_file_path": "models/klaviyo.yml", "name": "not_null_klaviyo__events_event_id", "alias": "not_null_klaviyo__events_event_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["klaviyo__events"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo/models/klaviyo.yml/not_null_klaviyo__events_event_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1665702405.195754, "compiled_sql": "\n \n \n\n\n\nselect event_id\nfrom `dbt-package-testing`.`linkedin_integration_tests_klaviyo`.`klaviyo__events`\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_id", "file_key_name": "models.klaviyo__events"}, "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__events_event_id__source_relation.847dad4174": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_8b483e4115ab91fbb579be0d68288d98\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["event_id", "source_relation"], "model": "{{ get_where_subquery(ref('klaviyo__events')) }}"}, "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.klaviyo.klaviyo__events"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_8b483e4115ab91fbb579be0d68288d98", "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["klaviyo", "dbt_utils_unique_combination_of_columns_klaviyo__events_event_id__source_relation"], "unique_id": "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__events_event_id__source_relation.847dad4174", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "dbt_utils_unique_combination_o_8b483e4115ab91fbb579be0d68288d98.sql", "original_file_path": "models/klaviyo.yml", "name": "dbt_utils_unique_combination_of_columns_klaviyo__events_event_id__source_relation", "alias": "dbt_utils_unique_combination_o_8b483e4115ab91fbb579be0d68288d98", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["klaviyo__events"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo/models/klaviyo.yml/dbt_utils_unique_combination_o_8b483e4115ab91fbb579be0d68288d98.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_8b483e4115ab91fbb579be0d68288d98"}, "created_at": 1665702405.196776, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n event_id, source_relation\n from `dbt-package-testing`.`linkedin_integration_tests_klaviyo`.`klaviyo__events`\n group by event_id, source_relation\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.klaviyo__events"}, "test.klaviyo.not_null_klaviyo__person_campaign_flow_person_id.e27d13b0f2": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "person_id", "model": "{{ get_where_subquery(ref('klaviyo__person_campaign_flow')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.klaviyo.klaviyo__person_campaign_flow"]}, "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["klaviyo", "not_null_klaviyo__person_campaign_flow_person_id"], "unique_id": "test.klaviyo.not_null_klaviyo__person_campaign_flow_person_id.e27d13b0f2", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "not_null_klaviyo__person_campaign_flow_person_id.sql", "original_file_path": "models/klaviyo.yml", "name": "not_null_klaviyo__person_campaign_flow_person_id", "alias": "not_null_klaviyo__person_campaign_flow_person_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["klaviyo__person_campaign_flow"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo/models/klaviyo.yml/not_null_klaviyo__person_campaign_flow_person_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1665702405.199351, "compiled_sql": "\n \n \n\n\n\nselect person_id\nfrom `dbt-package-testing`.`linkedin_integration_tests_klaviyo`.`klaviyo__person_campaign_flow`\nwhere person_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "person_id", "file_key_name": "models.klaviyo__person_campaign_flow"}, "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__person_campaign_flow_person_id__last_touch_campaign_id__last_touch_flow_id__variation_id__source_relation.30e1824079": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_b833c7b8de2dbcac0bfcd913f29d49fd\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["person_id", "last_touch_campaign_id", "last_touch_flow_id", "variation_id", "source_relation"], "model": "{{ get_where_subquery(ref('klaviyo__person_campaign_flow')) }}"}, "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.klaviyo.klaviyo__person_campaign_flow"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_b833c7b8de2dbcac0bfcd913f29d49fd", "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["klaviyo", "dbt_utils_unique_combination_of_columns_klaviyo__person_campaign_flow_person_id__last_touch_campaign_id__last_touch_flow_id__variation_id__source_relation"], "unique_id": "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__person_campaign_flow_person_id__last_touch_campaign_id__last_touch_flow_id__variation_id__source_relation.30e1824079", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "dbt_utils_unique_combination_o_b833c7b8de2dbcac0bfcd913f29d49fd.sql", "original_file_path": "models/klaviyo.yml", "name": "dbt_utils_unique_combination_of_columns_klaviyo__person_campaign_flow_person_id__last_touch_campaign_id__last_touch_flow_id__variation_id__source_relation", "alias": "dbt_utils_unique_combination_o_b833c7b8de2dbcac0bfcd913f29d49fd", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["klaviyo__person_campaign_flow"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo/models/klaviyo.yml/dbt_utils_unique_combination_o_b833c7b8de2dbcac0bfcd913f29d49fd.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_b833c7b8de2dbcac0bfcd913f29d49fd"}, "created_at": 1665702405.200317, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n person_id, last_touch_campaign_id, last_touch_flow_id, variation_id, source_relation\n from `dbt-package-testing`.`linkedin_integration_tests_klaviyo`.`klaviyo__person_campaign_flow`\n group by person_id, last_touch_campaign_id, last_touch_flow_id, variation_id, source_relation\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.klaviyo__person_campaign_flow"}, "test.klaviyo.not_null_klaviyo__campaigns_campaign_variation_key.c4588cdadc": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_variation_key", "model": "{{ get_where_subquery(ref('klaviyo__campaigns')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.klaviyo.klaviyo__campaigns"]}, "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["klaviyo", "not_null_klaviyo__campaigns_campaign_variation_key"], "unique_id": "test.klaviyo.not_null_klaviyo__campaigns_campaign_variation_key.c4588cdadc", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "not_null_klaviyo__campaigns_campaign_variation_key.sql", "original_file_path": "models/klaviyo.yml", "name": "not_null_klaviyo__campaigns_campaign_variation_key", "alias": "not_null_klaviyo__campaigns_campaign_variation_key", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["klaviyo__campaigns"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo/models/klaviyo.yml/not_null_klaviyo__campaigns_campaign_variation_key.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1665702405.203211, "compiled_sql": "\n \n \n\n\n\nselect campaign_variation_key\nfrom `dbt-package-testing`.`linkedin_integration_tests_klaviyo`.`klaviyo__campaigns`\nwhere campaign_variation_key is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "campaign_variation_key", "file_key_name": "models.klaviyo__campaigns"}, "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__campaigns_campaign_variation_key__source_relation.e5d14aee28": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_8c02a0c80dd7e19571d353539126fd64\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["campaign_variation_key", "source_relation"], "model": "{{ get_where_subquery(ref('klaviyo__campaigns')) }}"}, "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.klaviyo.klaviyo__campaigns"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_8c02a0c80dd7e19571d353539126fd64", "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["klaviyo", "dbt_utils_unique_combination_of_columns_klaviyo__campaigns_campaign_variation_key__source_relation"], "unique_id": "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__campaigns_campaign_variation_key__source_relation.e5d14aee28", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "dbt_utils_unique_combination_o_8c02a0c80dd7e19571d353539126fd64.sql", "original_file_path": "models/klaviyo.yml", "name": "dbt_utils_unique_combination_of_columns_klaviyo__campaigns_campaign_variation_key__source_relation", "alias": "dbt_utils_unique_combination_o_8c02a0c80dd7e19571d353539126fd64", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["klaviyo__campaigns"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo/models/klaviyo.yml/dbt_utils_unique_combination_o_8c02a0c80dd7e19571d353539126fd64.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_8c02a0c80dd7e19571d353539126fd64"}, "created_at": 1665702405.204306, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n campaign_variation_key, source_relation\n from `dbt-package-testing`.`linkedin_integration_tests_klaviyo`.`klaviyo__campaigns`\n group by campaign_variation_key, source_relation\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.klaviyo__campaigns"}, "test.klaviyo.not_null_klaviyo__flows_flow_variation_key.152c0d960b": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "flow_variation_key", "model": "{{ get_where_subquery(ref('klaviyo__flows')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.klaviyo.klaviyo__flows"]}, "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["klaviyo", "not_null_klaviyo__flows_flow_variation_key"], "unique_id": "test.klaviyo.not_null_klaviyo__flows_flow_variation_key.152c0d960b", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "not_null_klaviyo__flows_flow_variation_key.sql", "original_file_path": "models/klaviyo.yml", "name": "not_null_klaviyo__flows_flow_variation_key", "alias": "not_null_klaviyo__flows_flow_variation_key", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["klaviyo__flows"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo/models/klaviyo.yml/not_null_klaviyo__flows_flow_variation_key.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1665702405.206733, "compiled_sql": "\n \n \n\n\n\nselect flow_variation_key\nfrom `dbt-package-testing`.`linkedin_integration_tests_klaviyo`.`klaviyo__flows`\nwhere flow_variation_key is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "flow_variation_key", "file_key_name": "models.klaviyo__flows"}, "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__flows_flow_variation_key__source_relation.925d4118dc": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_699ce797a4af34c0906f1e96e7e5186e\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["flow_variation_key", "source_relation"], "model": "{{ get_where_subquery(ref('klaviyo__flows')) }}"}, "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.klaviyo.klaviyo__flows"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_699ce797a4af34c0906f1e96e7e5186e", "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["klaviyo", "dbt_utils_unique_combination_of_columns_klaviyo__flows_flow_variation_key__source_relation"], "unique_id": "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__flows_flow_variation_key__source_relation.925d4118dc", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "dbt_utils_unique_combination_o_699ce797a4af34c0906f1e96e7e5186e.sql", "original_file_path": "models/klaviyo.yml", "name": "dbt_utils_unique_combination_of_columns_klaviyo__flows_flow_variation_key__source_relation", "alias": "dbt_utils_unique_combination_o_699ce797a4af34c0906f1e96e7e5186e", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["klaviyo__flows"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo/models/klaviyo.yml/dbt_utils_unique_combination_o_699ce797a4af34c0906f1e96e7e5186e.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_699ce797a4af34c0906f1e96e7e5186e"}, "created_at": 1665702405.207826, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n flow_variation_key, source_relation\n from `dbt-package-testing`.`linkedin_integration_tests_klaviyo`.`klaviyo__flows`\n group by flow_variation_key, source_relation\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.klaviyo__flows"}, "test.klaviyo.not_null_klaviyo__persons_person_id.624a41e75a": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "person_id", "model": "{{ get_where_subquery(ref('klaviyo__persons')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.klaviyo.klaviyo__persons"]}, "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["klaviyo", "not_null_klaviyo__persons_person_id"], "unique_id": "test.klaviyo.not_null_klaviyo__persons_person_id.624a41e75a", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "not_null_klaviyo__persons_person_id.sql", "original_file_path": "models/klaviyo.yml", "name": "not_null_klaviyo__persons_person_id", "alias": "not_null_klaviyo__persons_person_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["klaviyo__persons"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo/models/klaviyo.yml/not_null_klaviyo__persons_person_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1665702405.210376, "compiled_sql": "\n \n \n\n\n\nselect person_id\nfrom `dbt-package-testing`.`linkedin_integration_tests_klaviyo`.`klaviyo__persons`\nwhere person_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "person_id", "file_key_name": "models.klaviyo__persons"}, "test.klaviyo.unique_klaviyo__persons_email.a330194dd6": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}{{ config(severity=\"warn\") }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "email", "model": "{{ get_where_subquery(ref('klaviyo__persons')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.klaviyo.klaviyo__persons"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "WARN", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests_dbt_test__audit", "fqn": ["klaviyo", "unique_klaviyo__persons_email"], "unique_id": "test.klaviyo.unique_klaviyo__persons_email.a330194dd6", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "unique_klaviyo__persons_email.sql", "original_file_path": "models/klaviyo.yml", "name": "unique_klaviyo__persons_email", "alias": "unique_klaviyo__persons_email", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["klaviyo__persons"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo/models/klaviyo.yml/unique_klaviyo__persons_email.sql", "build_path": null, "deferred": false, "unrendered_config": {"severity": "WARN"}, "created_at": 1665702405.211492, "compiled_sql": "\n \n \n\nwith dbt_test__target as (\n\n select email as unique_field\n from `dbt-package-testing`.`linkedin_integration_tests_klaviyo`.`klaviyo__persons`\n where email 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\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "email", "file_key_name": "models.klaviyo__persons"}, "test.klaviyo.not_null_klaviyo__persons_email.072e38d07d": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "email", "model": "{{ get_where_subquery(ref('klaviyo__persons')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.klaviyo.klaviyo__persons"]}, "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["klaviyo", "not_null_klaviyo__persons_email"], "unique_id": "test.klaviyo.not_null_klaviyo__persons_email.072e38d07d", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "not_null_klaviyo__persons_email.sql", "original_file_path": "models/klaviyo.yml", "name": "not_null_klaviyo__persons_email", "alias": "not_null_klaviyo__persons_email", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["klaviyo__persons"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo/models/klaviyo.yml/not_null_klaviyo__persons_email.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1665702405.2124438, "compiled_sql": "\n \n \n\n\n\nselect email\nfrom `dbt-package-testing`.`linkedin_integration_tests_klaviyo`.`klaviyo__persons`\nwhere email is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "email", "file_key_name": "models.klaviyo__persons"}, "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__persons_person_id__source_relation.b223d703b3": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_f8f3a9d3aa76b62bb804805c73d99329\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["person_id", "source_relation"], "model": "{{ get_where_subquery(ref('klaviyo__persons')) }}"}, "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.klaviyo.klaviyo__persons"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_f8f3a9d3aa76b62bb804805c73d99329", "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["klaviyo", "dbt_utils_unique_combination_of_columns_klaviyo__persons_person_id__source_relation"], "unique_id": "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__persons_person_id__source_relation.b223d703b3", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "dbt_utils_unique_combination_o_f8f3a9d3aa76b62bb804805c73d99329.sql", "original_file_path": "models/klaviyo.yml", "name": "dbt_utils_unique_combination_of_columns_klaviyo__persons_person_id__source_relation", "alias": "dbt_utils_unique_combination_o_f8f3a9d3aa76b62bb804805c73d99329", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["klaviyo__persons"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo/models/klaviyo.yml/dbt_utils_unique_combination_o_f8f3a9d3aa76b62bb804805c73d99329.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_f8f3a9d3aa76b62bb804805c73d99329"}, "created_at": 1665702405.2135391, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n person_id, source_relation\n from `dbt-package-testing`.`linkedin_integration_tests_klaviyo`.`klaviyo__persons`\n group by person_id, source_relation\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.klaviyo__persons"}, "test.klaviyo.not_null_int_klaviyo__event_attribution_event_id.8d186152c4": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('int_klaviyo__event_attribution')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.klaviyo.int_klaviyo__event_attribution"]}, "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["klaviyo", "intermediate", "not_null_int_klaviyo__event_attribution_event_id"], "unique_id": "test.klaviyo.not_null_int_klaviyo__event_attribution_event_id.8d186152c4", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "not_null_int_klaviyo__event_attribution_event_id.sql", "original_file_path": "models/intermediate/int_klaviyo.yml", "name": "not_null_int_klaviyo__event_attribution_event_id", "alias": "not_null_int_klaviyo__event_attribution_event_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["int_klaviyo__event_attribution"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo/models/intermediate/int_klaviyo.yml/not_null_int_klaviyo__event_attribution_event_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1665702405.222084, "compiled_sql": "\n \n \n\n\n\nselect event_id\nfrom `dbt-package-testing`.`linkedin_integration_tests_int_klaviyo`.`int_klaviyo__event_attribution`\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_id", "file_key_name": "models.int_klaviyo__event_attribution"}, "test.klaviyo.dbt_utils_unique_combination_of_columns_int_klaviyo__event_attribution_event_id__source_relation.654b98ad2c": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_a0147e1bc143333a515d11c7f665da10\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["event_id", "source_relation"], "model": "{{ get_where_subquery(ref('int_klaviyo__event_attribution')) }}"}, "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.klaviyo.int_klaviyo__event_attribution"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_a0147e1bc143333a515d11c7f665da10", "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["klaviyo", "intermediate", "dbt_utils_unique_combination_of_columns_int_klaviyo__event_attribution_event_id__source_relation"], "unique_id": "test.klaviyo.dbt_utils_unique_combination_of_columns_int_klaviyo__event_attribution_event_id__source_relation.654b98ad2c", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "dbt_utils_unique_combination_o_a0147e1bc143333a515d11c7f665da10.sql", "original_file_path": "models/intermediate/int_klaviyo.yml", "name": "dbt_utils_unique_combination_of_columns_int_klaviyo__event_attribution_event_id__source_relation", "alias": "dbt_utils_unique_combination_o_a0147e1bc143333a515d11c7f665da10", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["int_klaviyo__event_attribution"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo/models/intermediate/int_klaviyo.yml/dbt_utils_unique_combination_o_a0147e1bc143333a515d11c7f665da10.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_a0147e1bc143333a515d11c7f665da10"}, "created_at": 1665702405.223076, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n event_id, source_relation\n from `dbt-package-testing`.`linkedin_integration_tests_int_klaviyo`.`int_klaviyo__event_attribution`\n group by event_id, source_relation\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.int_klaviyo__event_attribution"}, "test.klaviyo.dbt_utils_unique_combination_of_columns_int_klaviyo__campaign_flow_metrics_variation_id__source_relation__last_touch_campaign_id__last_touch_flow_id.3ea05faa81": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_e4603c9c1d4c74e9c4571eb9a11c5a61\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["variation_id", "source_relation", "last_touch_campaign_id", "last_touch_flow_id"], "model": "{{ get_where_subquery(ref('int_klaviyo__campaign_flow_metrics')) }}"}, "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.klaviyo.int_klaviyo__campaign_flow_metrics"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_e4603c9c1d4c74e9c4571eb9a11c5a61", "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["klaviyo", "intermediate", "dbt_utils_unique_combination_of_columns_int_klaviyo__campaign_flow_metrics_variation_id__source_relation__last_touch_campaign_id__last_touch_flow_id"], "unique_id": "test.klaviyo.dbt_utils_unique_combination_of_columns_int_klaviyo__campaign_flow_metrics_variation_id__source_relation__last_touch_campaign_id__last_touch_flow_id.3ea05faa81", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "dbt_utils_unique_combination_o_e4603c9c1d4c74e9c4571eb9a11c5a61.sql", "original_file_path": "models/intermediate/int_klaviyo.yml", "name": "dbt_utils_unique_combination_of_columns_int_klaviyo__campaign_flow_metrics_variation_id__source_relation__last_touch_campaign_id__last_touch_flow_id", "alias": "dbt_utils_unique_combination_o_e4603c9c1d4c74e9c4571eb9a11c5a61", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["int_klaviyo__campaign_flow_metrics"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo/models/intermediate/int_klaviyo.yml/dbt_utils_unique_combination_o_e4603c9c1d4c74e9c4571eb9a11c5a61.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_e4603c9c1d4c74e9c4571eb9a11c5a61"}, "created_at": 1665702405.225645, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n variation_id, source_relation, last_touch_campaign_id, last_touch_flow_id\n from `dbt-package-testing`.`linkedin_integration_tests_int_klaviyo`.`int_klaviyo__campaign_flow_metrics`\n group by variation_id, source_relation, last_touch_campaign_id, last_touch_flow_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.int_klaviyo__campaign_flow_metrics"}, "test.klaviyo.not_null_int_klaviyo__person_metrics_person_id.2c0f4e5a67": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "person_id", "model": "{{ get_where_subquery(ref('int_klaviyo__person_metrics')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.klaviyo.int_klaviyo__person_metrics"]}, "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["klaviyo", "intermediate", "not_null_int_klaviyo__person_metrics_person_id"], "unique_id": "test.klaviyo.not_null_int_klaviyo__person_metrics_person_id.2c0f4e5a67", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "not_null_int_klaviyo__person_metrics_person_id.sql", "original_file_path": "models/intermediate/int_klaviyo.yml", "name": "not_null_int_klaviyo__person_metrics_person_id", "alias": "not_null_int_klaviyo__person_metrics_person_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["int_klaviyo__person_metrics"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo/models/intermediate/int_klaviyo.yml/not_null_int_klaviyo__person_metrics_person_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1665702405.22843, "compiled_sql": "\n \n \n\n\n\nselect person_id\nfrom `dbt-package-testing`.`linkedin_integration_tests_int_klaviyo`.`int_klaviyo__person_metrics`\nwhere person_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "person_id", "file_key_name": "models.int_klaviyo__person_metrics"}, "test.klaviyo.dbt_utils_unique_combination_of_columns_int_klaviyo__person_metrics_person_id__source_relation.4897d57f8b": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_44a55e0600e791676842b0edee32af5c\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["person_id", "source_relation"], "model": "{{ get_where_subquery(ref('int_klaviyo__person_metrics')) }}"}, "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.klaviyo.int_klaviyo__person_metrics"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_44a55e0600e791676842b0edee32af5c", "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["klaviyo", "intermediate", "dbt_utils_unique_combination_of_columns_int_klaviyo__person_metrics_person_id__source_relation"], "unique_id": "test.klaviyo.dbt_utils_unique_combination_of_columns_int_klaviyo__person_metrics_person_id__source_relation.4897d57f8b", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "dbt_utils_unique_combination_o_44a55e0600e791676842b0edee32af5c.sql", "original_file_path": "models/intermediate/int_klaviyo.yml", "name": "dbt_utils_unique_combination_of_columns_int_klaviyo__person_metrics_person_id__source_relation", "alias": "dbt_utils_unique_combination_o_44a55e0600e791676842b0edee32af5c", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["int_klaviyo__person_metrics"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo/models/intermediate/int_klaviyo.yml/dbt_utils_unique_combination_o_44a55e0600e791676842b0edee32af5c.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_44a55e0600e791676842b0edee32af5c"}, "created_at": 1665702405.229526, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n person_id, source_relation\n from `dbt-package-testing`.`linkedin_integration_tests_int_klaviyo`.`int_klaviyo__person_metrics`\n group by person_id, source_relation\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.int_klaviyo__person_metrics"}, "test.shopify.unique_shopify__customer_cohorts_customer_cohort_id.c5e4855c7a": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "customer_cohort_id", "model": "{{ get_where_subquery(ref('shopify__customer_cohorts')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.shopify.shopify__customer_cohorts"]}, "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["shopify", "unique_shopify__customer_cohorts_customer_cohort_id"], "unique_id": "test.shopify.unique_shopify__customer_cohorts_customer_cohort_id.c5e4855c7a", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify", "path": "unique_shopify__customer_cohorts_customer_cohort_id.sql", "original_file_path": "models/shopify.yml", "name": "unique_shopify__customer_cohorts_customer_cohort_id", "alias": "unique_shopify__customer_cohorts_customer_cohort_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["shopify__customer_cohorts"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify/models/shopify.yml/unique_shopify__customer_cohorts_customer_cohort_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1665702405.262696, "compiled_sql": "\n \n \n\nwith dbt_test__target as (\n\n select customer_cohort_id as unique_field\n from `dbt-package-testing`.`linkedin_integration_tests_shopify`.`shopify__customer_cohorts`\n where customer_cohort_id 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\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "customer_cohort_id", "file_key_name": "models.shopify__customer_cohorts"}, "test.shopify.not_null_shopify__customer_cohorts_customer_cohort_id.88e9c30925": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "customer_cohort_id", "model": "{{ get_where_subquery(ref('shopify__customer_cohorts')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.shopify.shopify__customer_cohorts"]}, "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["shopify", "not_null_shopify__customer_cohorts_customer_cohort_id"], "unique_id": "test.shopify.not_null_shopify__customer_cohorts_customer_cohort_id.88e9c30925", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify", "path": "not_null_shopify__customer_cohorts_customer_cohort_id.sql", "original_file_path": "models/shopify.yml", "name": "not_null_shopify__customer_cohorts_customer_cohort_id", "alias": "not_null_shopify__customer_cohorts_customer_cohort_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["shopify__customer_cohorts"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify/models/shopify.yml/not_null_shopify__customer_cohorts_customer_cohort_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1665702405.263701, "compiled_sql": "\n \n \n\n\n\nselect customer_cohort_id\nfrom `dbt-package-testing`.`linkedin_integration_tests_shopify`.`shopify__customer_cohorts`\nwhere customer_cohort_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "customer_cohort_id", "file_key_name": "models.shopify__customer_cohorts"}, "test.shopify.dbt_utils_unique_combination_of_columns_shopify__orders_order_id__source_relation.b2d1eaf63d": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_0e30d4742af59bda60aa3c3f634a72ce\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["order_id", "source_relation"], "model": "{{ get_where_subquery(ref('shopify__orders')) }}"}, "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.shopify.shopify__orders"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_0e30d4742af59bda60aa3c3f634a72ce", "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["shopify", "dbt_utils_unique_combination_of_columns_shopify__orders_order_id__source_relation"], "unique_id": "test.shopify.dbt_utils_unique_combination_of_columns_shopify__orders_order_id__source_relation.b2d1eaf63d", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify", "path": "dbt_utils_unique_combination_o_0e30d4742af59bda60aa3c3f634a72ce.sql", "original_file_path": "models/shopify.yml", "name": "dbt_utils_unique_combination_of_columns_shopify__orders_order_id__source_relation", "alias": "dbt_utils_unique_combination_o_0e30d4742af59bda60aa3c3f634a72ce", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["shopify__orders"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify/models/shopify.yml/dbt_utils_unique_combination_o_0e30d4742af59bda60aa3c3f634a72ce.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_0e30d4742af59bda60aa3c3f634a72ce"}, "created_at": 1665702405.264671, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n order_id, source_relation\n from `dbt-package-testing`.`linkedin_integration_tests_shopify`.`shopify__orders`\n group by order_id, source_relation\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.shopify__orders"}, "test.shopify.dbt_utils_unique_combination_of_columns_shopify__customers_customer_id__source_relation.88d3656469": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_93b849a7493f07ea332b58b74fbb6696\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["customer_id", "source_relation"], "model": "{{ get_where_subquery(ref('shopify__customers')) }}"}, "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.shopify.shopify__customers"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_93b849a7493f07ea332b58b74fbb6696", "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["shopify", "dbt_utils_unique_combination_of_columns_shopify__customers_customer_id__source_relation"], "unique_id": "test.shopify.dbt_utils_unique_combination_of_columns_shopify__customers_customer_id__source_relation.88d3656469", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify", "path": "dbt_utils_unique_combination_o_93b849a7493f07ea332b58b74fbb6696.sql", "original_file_path": "models/shopify.yml", "name": "dbt_utils_unique_combination_of_columns_shopify__customers_customer_id__source_relation", "alias": "dbt_utils_unique_combination_o_93b849a7493f07ea332b58b74fbb6696", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["shopify__customers"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify/models/shopify.yml/dbt_utils_unique_combination_o_93b849a7493f07ea332b58b74fbb6696.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_93b849a7493f07ea332b58b74fbb6696"}, "created_at": 1665702405.26724, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n customer_id, source_relation\n from `dbt-package-testing`.`linkedin_integration_tests_shopify`.`shopify__customers`\n group by customer_id, source_relation\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.shopify__customers"}, "test.shopify.dbt_utils_unique_combination_of_columns_shopify__products_product_id__source_relation.f00b2fb95a": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_64adf669e5f645d81dbdf6d5d3a930fa\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["product_id", "source_relation"], "model": "{{ get_where_subquery(ref('shopify__products')) }}"}, "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.shopify.shopify__products"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_64adf669e5f645d81dbdf6d5d3a930fa", "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["shopify", "dbt_utils_unique_combination_of_columns_shopify__products_product_id__source_relation"], "unique_id": "test.shopify.dbt_utils_unique_combination_of_columns_shopify__products_product_id__source_relation.f00b2fb95a", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify", "path": "dbt_utils_unique_combination_o_64adf669e5f645d81dbdf6d5d3a930fa.sql", "original_file_path": "models/shopify.yml", "name": "dbt_utils_unique_combination_of_columns_shopify__products_product_id__source_relation", "alias": "dbt_utils_unique_combination_o_64adf669e5f645d81dbdf6d5d3a930fa", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["shopify__products"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify/models/shopify.yml/dbt_utils_unique_combination_o_64adf669e5f645d81dbdf6d5d3a930fa.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_64adf669e5f645d81dbdf6d5d3a930fa"}, "created_at": 1665702405.26989, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n product_id, source_relation\n from `dbt-package-testing`.`linkedin_integration_tests_shopify`.`shopify__products`\n group by product_id, source_relation\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.shopify__products"}, "test.shopify.dbt_utils_unique_combination_of_columns_shopify__order_lines_order_line_id__source_relation.2483d5ef95": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_0bd7a3e6d2ce7dc1c5c09d9f9d5f6b40\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["order_line_id", "source_relation"], "model": "{{ get_where_subquery(ref('shopify__order_lines')) }}"}, "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.shopify.shopify__order_lines"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_0bd7a3e6d2ce7dc1c5c09d9f9d5f6b40", "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["shopify", "dbt_utils_unique_combination_of_columns_shopify__order_lines_order_line_id__source_relation"], "unique_id": "test.shopify.dbt_utils_unique_combination_of_columns_shopify__order_lines_order_line_id__source_relation.2483d5ef95", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify", "path": "dbt_utils_unique_combination_o_0bd7a3e6d2ce7dc1c5c09d9f9d5f6b40.sql", "original_file_path": "models/shopify.yml", "name": "dbt_utils_unique_combination_of_columns_shopify__order_lines_order_line_id__source_relation", "alias": "dbt_utils_unique_combination_o_0bd7a3e6d2ce7dc1c5c09d9f9d5f6b40", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["shopify__order_lines"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify/models/shopify.yml/dbt_utils_unique_combination_o_0bd7a3e6d2ce7dc1c5c09d9f9d5f6b40.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_0bd7a3e6d2ce7dc1c5c09d9f9d5f6b40"}, "created_at": 1665702405.272428, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n order_line_id, source_relation\n from `dbt-package-testing`.`linkedin_integration_tests_shopify`.`shopify__order_lines`\n group by order_line_id, source_relation\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.shopify__order_lines"}, "test.shopify.dbt_utils_unique_combination_of_columns_shopify__transactions_transaction_id__source_relation.7341b755c0": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_8e8f17b2e5241cc1e3a33f9fa479a3fb\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["transaction_id", "source_relation"], "model": "{{ get_where_subquery(ref('shopify__transactions')) }}"}, "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.shopify.shopify__transactions"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_8e8f17b2e5241cc1e3a33f9fa479a3fb", "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["shopify", "dbt_utils_unique_combination_of_columns_shopify__transactions_transaction_id__source_relation"], "unique_id": "test.shopify.dbt_utils_unique_combination_of_columns_shopify__transactions_transaction_id__source_relation.7341b755c0", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify", "path": "dbt_utils_unique_combination_o_8e8f17b2e5241cc1e3a33f9fa479a3fb.sql", "original_file_path": "models/shopify.yml", "name": "dbt_utils_unique_combination_of_columns_shopify__transactions_transaction_id__source_relation", "alias": "dbt_utils_unique_combination_o_8e8f17b2e5241cc1e3a33f9fa479a3fb", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["shopify__transactions"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify/models/shopify.yml/dbt_utils_unique_combination_o_8e8f17b2e5241cc1e3a33f9fa479a3fb.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_8e8f17b2e5241cc1e3a33f9fa479a3fb"}, "created_at": 1665702405.274965, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n transaction_id, source_relation\n from `dbt-package-testing`.`linkedin_integration_tests_shopify`.`shopify__transactions`\n group by transaction_id, source_relation\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.shopify__transactions"}, "test.shopify.dbt_utils_unique_combination_of_columns_shopify__customers__order_aggregates_customer_id__source_relation.5a5e85c8a9": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_4d1af0d9338b2b5b246e23c580e294e3\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["customer_id", "source_relation"], "model": "{{ get_where_subquery(ref('shopify__customers__order_aggregates')) }}"}, "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.shopify.shopify__customers__order_aggregates"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_4d1af0d9338b2b5b246e23c580e294e3", "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["shopify", "intermediate", "dbt_utils_unique_combination_of_columns_shopify__customers__order_aggregates_customer_id__source_relation"], "unique_id": "test.shopify.dbt_utils_unique_combination_of_columns_shopify__customers__order_aggregates_customer_id__source_relation.5a5e85c8a9", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify", "path": "dbt_utils_unique_combination_o_4d1af0d9338b2b5b246e23c580e294e3.sql", "original_file_path": "models/intermediate/intermediate.yml", "name": "dbt_utils_unique_combination_of_columns_shopify__customers__order_aggregates_customer_id__source_relation", "alias": "dbt_utils_unique_combination_o_4d1af0d9338b2b5b246e23c580e294e3", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["shopify__customers__order_aggregates"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify/models/intermediate/intermediate.yml/dbt_utils_unique_combination_o_4d1af0d9338b2b5b246e23c580e294e3.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_4d1af0d9338b2b5b246e23c580e294e3"}, "created_at": 1665702405.278211, "compiled_sql": "\n\n\n\n\n\nwith __dbt__cte__shopify__customers__order_aggregates as (\nwith orders as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__order`\n\n), transactions as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_shopify`.`shopify__transactions`\n where lower(status) = 'success'\n\n), aggregated as (\n\n select\n orders.customer_id,\n orders.source_relation,\n min(orders.created_timestamp) as first_order_timestamp,\n max(orders.created_timestamp) as most_recent_order_timestamp,\n avg(case when lower(transactions.kind) in ('sale','capture') then transactions.currency_exchange_calculated_amount end) as average_order_value,\n sum(case when lower(transactions.kind) in ('sale','capture') then transactions.currency_exchange_calculated_amount end) as lifetime_total_spent,\n sum(case when lower(transactions.kind) in ('refund') then transactions.currency_exchange_calculated_amount end) as lifetime_total_refunded,\n count(distinct orders.order_id) as lifetime_count_orders\n from orders\n left join transactions\n using (order_id, source_relation)\n where customer_id is not null\n group by 1,2\n\n)\n\nselect *\nfrom aggregated\n),validation_errors as (\n\n select\n customer_id, source_relation\n from __dbt__cte__shopify__customers__order_aggregates\n group by customer_id, source_relation\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.shopify.shopify__customers__order_aggregates", "sql": " __dbt__cte__shopify__customers__order_aggregates as (\nwith orders as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__order`\n\n), transactions as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_shopify`.`shopify__transactions`\n where lower(status) = 'success'\n\n), aggregated as (\n\n select\n orders.customer_id,\n orders.source_relation,\n min(orders.created_timestamp) as first_order_timestamp,\n max(orders.created_timestamp) as most_recent_order_timestamp,\n avg(case when lower(transactions.kind) in ('sale','capture') then transactions.currency_exchange_calculated_amount end) as average_order_value,\n sum(case when lower(transactions.kind) in ('sale','capture') then transactions.currency_exchange_calculated_amount end) as lifetime_total_spent,\n sum(case when lower(transactions.kind) in ('refund') then transactions.currency_exchange_calculated_amount end) as lifetime_total_refunded,\n count(distinct orders.order_id) as lifetime_count_orders\n from orders\n left join transactions\n using (order_id, source_relation)\n where customer_id is not null\n group by 1,2\n\n)\n\nselect *\nfrom aggregated\n)"}], "relation_name": null, "column_name": null, "file_key_name": "models.shopify__customers__order_aggregates"}, "test.shopify.dbt_utils_unique_combination_of_columns_shopify__orders__order_line_aggregates_order_id__source_relation.09d921d473": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_3ae1e43ee344b59ccef000bf524f1f04\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["order_id", "source_relation"], "model": "{{ get_where_subquery(ref('shopify__orders__order_line_aggregates')) }}"}, "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.shopify.shopify__orders__order_line_aggregates"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_3ae1e43ee344b59ccef000bf524f1f04", "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["shopify", "intermediate", "dbt_utils_unique_combination_of_columns_shopify__orders__order_line_aggregates_order_id__source_relation"], "unique_id": "test.shopify.dbt_utils_unique_combination_of_columns_shopify__orders__order_line_aggregates_order_id__source_relation.09d921d473", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify", "path": "dbt_utils_unique_combination_o_3ae1e43ee344b59ccef000bf524f1f04.sql", "original_file_path": "models/intermediate/intermediate.yml", "name": "dbt_utils_unique_combination_of_columns_shopify__orders__order_line_aggregates_order_id__source_relation", "alias": "dbt_utils_unique_combination_o_3ae1e43ee344b59ccef000bf524f1f04", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["shopify__orders__order_line_aggregates"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify/models/intermediate/intermediate.yml/dbt_utils_unique_combination_o_3ae1e43ee344b59ccef000bf524f1f04.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_3ae1e43ee344b59ccef000bf524f1f04"}, "created_at": 1665702405.2807748, "compiled_sql": "\n\n\n\n\n\nwith __dbt__cte__shopify__orders__order_line_aggregates as (\nwith order_line as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__order_line`\n\n), aggregated as (\n\n select \n order_id,\n source_relation,\n count(*) as line_item_count\n from order_line\n group by 1,2\n\n)\n\nselect *\nfrom aggregated\n),validation_errors as (\n\n select\n order_id, source_relation\n from __dbt__cte__shopify__orders__order_line_aggregates\n group by order_id, source_relation\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.shopify.shopify__orders__order_line_aggregates", "sql": " __dbt__cte__shopify__orders__order_line_aggregates as (\nwith order_line as (\n\n select *\n from `dbt-package-testing`.`linkedin_integration_tests_stg_shopify`.`stg_shopify__order_line`\n\n), aggregated as (\n\n select \n order_id,\n source_relation,\n count(*) as line_item_count\n from order_line\n group by 1,2\n\n)\n\nselect *\nfrom aggregated\n)"}], "relation_name": null, "column_name": null, "file_key_name": "models.shopify__orders__order_line_aggregates"}, "test.shopify_holistic_reporting.dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__customer_enhanced_email__klaviyo_source_relation__shopify_source_relation.2ea9394109": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_6d96dafa6cfb9bf7095ffd278a75adbc\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["email", "klaviyo_source_relation", "shopify_source_relation"], "model": "{{ get_where_subquery(ref('shopify_holistic_reporting__customer_enhanced')) }}"}, "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.shopify_holistic_reporting.shopify_holistic_reporting__customer_enhanced"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_6d96dafa6cfb9bf7095ffd278a75adbc", "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["shopify_holistic_reporting", "dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__customer_enhanced_email__klaviyo_source_relation__shopify_source_relation"], "unique_id": "test.shopify_holistic_reporting.dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__customer_enhanced_email__klaviyo_source_relation__shopify_source_relation.2ea9394109", "package_name": "shopify_holistic_reporting", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_holistic_reporting", "path": "dbt_utils_unique_combination_o_6d96dafa6cfb9bf7095ffd278a75adbc.sql", "original_file_path": "models/shopify_holistic_reporting.yml", "name": "dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__customer_enhanced_email__klaviyo_source_relation__shopify_source_relation", "alias": "dbt_utils_unique_combination_o_6d96dafa6cfb9bf7095ffd278a75adbc", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["shopify_holistic_reporting__customer_enhanced"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_holistic_reporting/models/shopify_holistic_reporting.yml/dbt_utils_unique_combination_o_6d96dafa6cfb9bf7095ffd278a75adbc.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_6d96dafa6cfb9bf7095ffd278a75adbc"}, "created_at": 1665702405.308287, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n email, klaviyo_source_relation, shopify_source_relation\n from `dbt-package-testing`.`linkedin_integration_tests_shopify_holistic`.`shopify_holistic_reporting__customer_enhanced`\n group by email, klaviyo_source_relation, shopify_source_relation\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.shopify_holistic_reporting__customer_enhanced"}, "test.shopify_holistic_reporting.dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__daily_customer_metrics_date_day__email__klaviyo_source_relation__shopify_source_relation__campaign_id__flow_id__variation_id.0489c190fd": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_4b14da03db00d67d51bb9e9f7e8b766f\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["date_day", "email", "klaviyo_source_relation", "shopify_source_relation", "campaign_id", "flow_id", "variation_id"], "model": "{{ get_where_subquery(ref('shopify_holistic_reporting__daily_customer_metrics')) }}"}, "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.shopify_holistic_reporting.shopify_holistic_reporting__daily_customer_metrics"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_4b14da03db00d67d51bb9e9f7e8b766f", "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["shopify_holistic_reporting", "dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__daily_customer_metrics_date_day__email__klaviyo_source_relation__shopify_source_relation__campaign_id__flow_id__variation_id"], "unique_id": "test.shopify_holistic_reporting.dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__daily_customer_metrics_date_day__email__klaviyo_source_relation__shopify_source_relation__campaign_id__flow_id__variation_id.0489c190fd", "package_name": "shopify_holistic_reporting", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_holistic_reporting", "path": "dbt_utils_unique_combination_o_4b14da03db00d67d51bb9e9f7e8b766f.sql", "original_file_path": "models/shopify_holistic_reporting.yml", "name": "dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__daily_customer_metrics_date_day__email__klaviyo_source_relation__shopify_source_relation__campaign_id__flow_id__variation_id", "alias": "dbt_utils_unique_combination_o_4b14da03db00d67d51bb9e9f7e8b766f", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["shopify_holistic_reporting__daily_customer_metrics"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_holistic_reporting/models/shopify_holistic_reporting.yml/dbt_utils_unique_combination_o_4b14da03db00d67d51bb9e9f7e8b766f.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_4b14da03db00d67d51bb9e9f7e8b766f"}, "created_at": 1665702405.310959, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n date_day, email, klaviyo_source_relation, shopify_source_relation, campaign_id, flow_id, variation_id\n from `dbt-package-testing`.`linkedin_integration_tests_shopify_holistic`.`shopify_holistic_reporting__daily_customer_metrics`\n group by date_day, email, klaviyo_source_relation, shopify_source_relation, campaign_id, flow_id, variation_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.shopify_holistic_reporting__daily_customer_metrics"}, "test.shopify_holistic_reporting.dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__orders_attribution_order_id__shopify_source_relation.0eb46743bb": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_ed10bd87338124f135be382dd44f7c6a\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["order_id", "shopify_source_relation"], "model": "{{ get_where_subquery(ref('shopify_holistic_reporting__orders_attribution')) }}"}, "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.shopify_holistic_reporting.shopify_holistic_reporting__orders_attribution"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_ed10bd87338124f135be382dd44f7c6a", "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": "linkedin_integration_tests_dbt_test__audit", "fqn": ["shopify_holistic_reporting", "dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__orders_attribution_order_id__shopify_source_relation"], "unique_id": "test.shopify_holistic_reporting.dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__orders_attribution_order_id__shopify_source_relation.0eb46743bb", "package_name": "shopify_holistic_reporting", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_holistic_reporting", "path": "dbt_utils_unique_combination_o_ed10bd87338124f135be382dd44f7c6a.sql", "original_file_path": "models/shopify_holistic_reporting.yml", "name": "dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__orders_attribution_order_id__shopify_source_relation", "alias": "dbt_utils_unique_combination_o_ed10bd87338124f135be382dd44f7c6a", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["shopify_holistic_reporting__orders_attribution"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_holistic_reporting/models/shopify_holistic_reporting.yml/dbt_utils_unique_combination_o_ed10bd87338124f135be382dd44f7c6a.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_ed10bd87338124f135be382dd44f7c6a"}, "created_at": 1665702405.3141189, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n order_id, shopify_source_relation\n from `dbt-package-testing`.`linkedin_integration_tests_shopify_holistic`.`shopify_holistic_reporting__orders_attribution`\n group by order_id, shopify_source_relation\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.shopify_holistic_reporting__orders_attribution"}}, "sources": {"source.shopify_source.shopify.order": {"fqn": ["shopify_source", "shopify", "order"], "database": "dbt-package-testing", "schema": "shopify", "unique_id": "source.shopify_source.shopify.order", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "models/src_shopify.yml", "original_file_path": "models/src_shopify.yml", "name": "order", "source_name": "shopify", "source_description": "", "loader": "", "identifier": "order", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": true, "column": null}, "loaded_at_field": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents an order in Shopify.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "app_id": {"name": "app_id", "description": "The ID of the app that created the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_address_1": {"name": "billing_address_address_1", "description": "The street address of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_address_2": {"name": "billing_address_address_2", "description": "An optional additional field for the street address of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_city": {"name": "billing_address_city", "description": "The city, town, or village of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_company": {"name": "billing_address_company", "description": "The company of the person associated with the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_country": {"name": "billing_address_country", "description": "The name of the country of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_country_code": {"name": "billing_address_country_code", "description": "The two-letter code (ISO 3166-1 format) for the country of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_first_name": {"name": "billing_address_first_name", "description": "The first name of the person associated with the payment method.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_last_name": {"name": "billing_address_last_name", "description": "The last name of the person associated with the payment method.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_latitude": {"name": "billing_address_latitude", "description": "The latitude of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_longitude": {"name": "billing_address_longitude", "description": "The longitude of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_name": {"name": "billing_address_name", "description": "The full name of the person associated with the payment method.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_phone": {"name": "billing_address_phone", "description": "The phone number at the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_province": {"name": "billing_address_province", "description": "The name of the region (province, state, prefecture, \u2026) of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_province_code": {"name": "billing_address_province_code", "description": "The two-letter abbreviation of the region of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_zip": {"name": "billing_address_zip", "description": "The postal code (zip, postcode, Eircode, \u2026) of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "browser_ip": {"name": "browser_ip", "description": "The IP address of the browser used by the customer when they placed the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "buyer_accepts_marketing": {"name": "buyer_accepts_marketing", "description": "Whether the customer consented to receive email updates from the shop.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "cancel_reason": {"name": "cancel_reason", "description": "The reason why the order was canceled.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "cancelled_at": {"name": "cancelled_at", "description": "The date and time when the order was canceled.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "cart_token": {"name": "cart_token", "description": "The ID of the cart that's associated with the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "closed_at": {"name": "closed_at", "description": "The date and time when the order was closed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "The autogenerated date and time when the order was created in Shopify.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "The three-letter code for the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "customer_id": {"name": "customer_id", "description": "The ID of the order's customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email": {"name": "email", "description": "The customer's email address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "financial_status": {"name": "financial_status", "description": "The status of payments associated with the order. Can only be set when the order is created", "meta": {}, "data_type": null, "quote": null, "tags": []}, "fulfillment_status": {"name": "fulfillment_status", "description": "The order's status in terms of fulfilled line items.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "id": {"name": "id", "description": "The ID of the order, used for API purposes. This is different from the order_number property, which is the ID used by the shop owner and customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "landing_site_base_url": {"name": "landing_site_base_url", "description": "The URL for the page where the buyer landed when they entered the shop.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "location_id": {"name": "location_id", "description": "The ID of the physical location where the order was processed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "name": {"name": "name", "description": "The order name, generated by combining the order_number property with the order prefix and suffix that are set in the merchant's general settings.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "note": {"name": "note", "description": "An optional note that a shop owner can attach to the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "number": {"name": "number", "description": "The order's position in the shop's count of orders. Numbers are sequential and start at 1.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_number": {"name": "order_number", "description": "The order 's position in the shop's count of orders starting at 1001. Order numbers are sequential and start at 1001.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "processed_at": {"name": "processed_at", "description": "The date and time when an order was processed. This value is the date that appears on your orders and that's used in the analytic reports.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "processing_method": {"name": "processing_method", "description": "How the payment was processed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "referring_site": {"name": "referring_site", "description": "The website where the customer clicked a link to the shop.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_address_1": {"name": "shipping_address_address_1", "description": "The street address of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_address_2": {"name": "shipping_address_address_2", "description": "An optional additional field for the street address of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_city": {"name": "shipping_address_city", "description": "The city, town, or village of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_company": {"name": "shipping_address_company", "description": "The company of the person associated with the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_country": {"name": "shipping_address_country", "description": "The name of the country of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_country_code": {"name": "shipping_address_country_code", "description": "The two-letter code (ISO 3166-1 format) for the country of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_first_name": {"name": "shipping_address_first_name", "description": "The first name of the person associated with the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_last_name": {"name": "shipping_address_last_name", "description": "The last name of the person associated with the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_latitude": {"name": "shipping_address_latitude", "description": "The latitude of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_longitude": {"name": "shipping_address_longitude", "description": "The longitude of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_name": {"name": "shipping_address_name", "description": "The full name of the person associated with the payment method.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_phone": {"name": "shipping_address_phone", "description": "The phone number at the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_province": {"name": "shipping_address_province", "description": "The name of the region (province, state, prefecture, \u2026) of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_province_code": {"name": "shipping_address_province_code", "description": "The two-letter abbreviation of the region of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_zip": {"name": "shipping_address_zip", "description": "The postal code (zip, postcode, Eircode, \u2026) of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_name": {"name": "source_name", "description": "Where the order originated. Can be set only during order creation, and is not writeable afterwards.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "subtotal_price": {"name": "subtotal_price", "description": "The price of the order in the shop currency after discounts but before shipping, taxes, and tips.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taxes_included": {"name": "taxes_included", "description": "Whether taxes are included in the order subtotal.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "test": {"name": "test", "description": "Whether this is a test order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "token": {"name": "token", "description": "A unique token for the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_discounts": {"name": "total_discounts", "description": "The total discounts applied to the price of the order in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_line_items_price": {"name": "total_line_items_price", "description": "The sum of all line item prices in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_price": {"name": "total_price", "description": "The sum of all line item prices, discounts, shipping, taxes, and tips in the shop currency. Must be positive.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_tax": {"name": "total_tax", "description": "The sum of all the taxes applied to the order in th shop currency. Must be positive).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_weight": {"name": "total_weight", "description": "The sum of all line item weights in grams.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_at": {"name": "updated_at", "description": "The date and time (ISO 8601 format) when the order was last modified.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "user_id": {"name": "user_id", "description": "The ID of the user logged into Shopify POS who processed the order, if applicable.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`dbt-package-testing`.`shopify`.`order`", "created_at": 1665702405.328304}, "source.shopify_source.shopify.customer": {"fqn": ["shopify_source", "shopify", "customer"], "database": "dbt-package-testing", "schema": "shopify", "unique_id": "source.shopify_source.shopify.customer", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "models/src_shopify.yml", "original_file_path": "models/src_shopify.yml", "name": "customer", "source_name": "shopify", "source_description": "", "loader": "", "identifier": "customer", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a customer in Shopify.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "accepts_marketing": {"name": "accepts_marketing", "description": "Whether the customer has consented to receive marketing material via email.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "The date and time when the customer was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "default_address_id": {"name": "default_address_id", "description": "The default address for the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email": {"name": "email", "description": "The unique email address of the customer. Attempting to assign the same email address to multiple customers returns an error.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_name": {"name": "first_name", "description": "The customer's first name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "id": {"name": "id", "description": "A unique identifier for the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_name": {"name": "last_name", "description": "The customer's last name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "orders_count": {"name": "orders_count", "description": "The number of orders associated with this customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "phone": {"name": "phone", "description": "The unique phone number (E.164 format) for this customer. Attempting to assign the same phone number to multiple customers returns an error.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "state": {"name": "state", "description": "The state of the customer's account with a shop.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tax_exempt": {"name": "tax_exempt", "description": "Whether the customer is exempt from paying taxes on their order. If true, then taxes won't be applied to an order at checkout. If false, then taxes will be applied at checkout.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_spent": {"name": "total_spent", "description": "The total amount of money that the customer has spent across their order history.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_at": {"name": "updated_at", "description": "The date and time when the customer information was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "verified_email": {"name": "verified_email", "description": "Whether the customer has verified their email address.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`dbt-package-testing`.`shopify`.`customer`", "created_at": 1665702405.328404}, "source.shopify_source.shopify.order_line": {"fqn": ["shopify_source", "shopify", "order_line"], "database": "dbt-package-testing", "schema": "shopify", "unique_id": "source.shopify_source.shopify.order_line", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "models/src_shopify.yml", "original_file_path": "models/src_shopify.yml", "name": "order_line", "source_name": "shopify", "source_description": "", "loader": "", "identifier": "order_line", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a line item for an order in Shopify.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "fulfillable_quantity": {"name": "fulfillable_quantity", "description": "The amount available to fulfill, calculated as follows: quantity - max(refunded_quantity, fulfilled_quantity) - pending_fulfilled_quantity - open_fulfilled_quantity", "meta": {}, "data_type": null, "quote": null, "tags": []}, "fulfillment_service": {"name": "fulfillment_service", "description": "The service provider that's fulfilling the item.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "fulfillment_status": {"name": "fulfillment_status", "description": "How far along an order is in terms line items fulfilled.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "gift_card": {"name": "gift_card", "description": "Whether the item is a gift card. If true, then the item is not taxed or considered for shipping charges.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "grams": {"name": "grams", "description": "The weight of the item in grams.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "id": {"name": "id", "description": "The ID of the line item.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "name": {"name": "name", "description": "The name of the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_id": {"name": "order_id", "description": "The ID of the related order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "price": {"name": "price", "description": "The price of the item before discounts have been applied in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "product_id": {"name": "product_id", "description": "The ID of the product that the line item belongs to. Can be null if the original product associated with the order is deleted at a later date.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "quantity": {"name": "quantity", "description": "The number of items that were purchased.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "requires_shipping": {"name": "requires_shipping", "description": "Whether the item requires shipping.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "sku": {"name": "sku", "description": "The item's SKU (stock keeping unit).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taxable": {"name": "taxable", "description": "Whether the item was taxable.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "title": {"name": "title", "description": "The title of the product.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_discount": {"name": "total_discount", "description": "The total amount of the discount allocated to the line item in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_id": {"name": "variant_id", "description": "The ID of the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "vendor": {"name": "vendor", "description": "The name of the item's supplier.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`dbt-package-testing`.`shopify`.`order_line`", "created_at": 1665702405.3284879}, "source.shopify_source.shopify.order_line_refund": {"fqn": ["shopify_source", "shopify", "order_line_refund"], "database": "dbt-package-testing", "schema": "shopify", "unique_id": "source.shopify_source.shopify.order_line_refund", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "models/src_shopify.yml", "original_file_path": "models/src_shopify.yml", "name": "order_line_refund", "source_name": "shopify", "source_description": "", "loader": "", "identifier": "order_line_refund", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a line item refund in Shopify.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "id": {"name": "id", "description": "The unique identifier of the line item in the refund.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "location_id": {"name": "location_id", "description": "TThe unique identifier of the location where the items will be restockedBD", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_line_id": {"name": "order_line_id", "description": "The ID of the related line item in the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "quantity": {"name": "quantity", "description": "The quantity of the associated line item that was returned.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refund_id": {"name": "refund_id", "description": "The ID of the related refund.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "restock_type": {"name": "restock_type", "description": "How this refund line item affects inventory levels.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "subtotal": {"name": "subtotal", "description": "Subtotal amount of the order line refund", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_tax": {"name": "total_tax", "description": "The total tax applied to the refund.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`dbt-package-testing`.`shopify`.`order_line_refund`", "created_at": 1665702405.328558}, "source.shopify_source.shopify.product": {"fqn": ["shopify_source", "shopify", "product"], "database": "dbt-package-testing", "schema": "shopify", "unique_id": "source.shopify_source.shopify.product", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "models/src_shopify.yml", "original_file_path": "models/src_shopify.yml", "name": "product", "source_name": "shopify", "source_description": "", "loader": "", "identifier": "product", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a product in Shopify.", "columns": {"_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Whether the record has been deleted in the source system.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "The date and time when the product was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "handle": {"name": "handle", "description": "A unique human-friendly string for the product. Automatically generated from the product's title.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "id": {"name": "id", "description": "An unsigned 64-bit integer that's used as a unique identifier for the product. Each id is unique across the Shopify system. No two products will have the same id, even if they're from different shops.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "product_type": {"name": "product_type", "description": "A categorization for the product used for filtering and searching products.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "published_at": {"name": "published_at", "description": "The date and time (ISO 8601 format) when the product was published. Can be set to null to unpublish the product from the Online Store channel.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "published_scope": {"name": "published_scope", "description": "Whether the product is published to the Point of Sale channel.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "title": {"name": "title", "description": "The name of the product.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_at": {"name": "updated_at", "description": "The date and time when the product was last modified.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "vendor": {"name": "vendor", "description": "The name of the product's vendor.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`dbt-package-testing`.`shopify`.`product`", "created_at": 1665702405.32863}, "source.shopify_source.shopify.product_variant": {"fqn": ["shopify_source", "shopify", "product_variant"], "database": "dbt-package-testing", "schema": "shopify", "unique_id": "source.shopify_source.shopify.product_variant", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "models/src_shopify.yml", "original_file_path": "models/src_shopify.yml", "name": "product_variant", "source_name": "shopify", "source_description": "", "loader": "", "identifier": "product_variant", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a product variant in Shopify", "columns": {"barcode": {"name": "barcode", "description": "The barcode, UPC, or ISBN number for the product.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "compare_at_price": {"name": "compare_at_price", "description": "The original price of the item before an adjustment or a sale.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "The date and time (ISO 8601 format) when the product variant was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "fulfillment_service": {"name": "fulfillment_service", "description": "The fulfillment service associated with the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "grams": {"name": "grams", "description": "The weight of the product variant in grams.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "id": {"name": "id", "description": "The unique numeric identifier for the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "image_id": {"name": "image_id", "description": "The unique numeric identifier for a product's image. The image must be associated to the same product as the variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "inventory_item_id": {"name": "inventory_item_id", "description": "The unique identifier for the inventory item, which is used in the Inventory API to query for inventory information.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "inventory_management": {"name": "inventory_management", "description": "The fulfillment service that tracks the number of items in stock for the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "inventory_policy": {"name": "inventory_policy", "description": "Whether customers are allowed to place an order for the product variant when it's out of stock.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "inventory_quantity": {"name": "inventory_quantity", "description": "An aggregate of inventory across all locations. To adjust inventory at a specific location, use the InventoryLevel resource.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "old_inventory_quantity": {"name": "old_inventory_quantity", "description": "This property is deprecated. Use the InventoryLevel resource instead.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "option_1": {"name": "option_1", "description": "The custom properties that a shop owner uses to define product variants. You can define three options for a product variant: option1, option2, option3.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "option_2": {"name": "option_2", "description": "The custom properties that a shop owner uses to define product variants. You can define three options for a product variant: option1, option2, option3.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "option_3": {"name": "option_3", "description": "The custom properties that a shop owner uses to define product variants. You can define three options for a product variant: option1, option2, option3.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "position": {"name": "position", "description": "The order of the product variant in the list of product variants. The first position in the list is 1. The position of variants is indicated by the order in which they are listed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "price": {"name": "price", "description": "The price of the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "product_id": {"name": "product_id", "description": "The unique numeric identifier for the product.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "requires_shipping": {"name": "requires_shipping", "description": "This property is deprecated. Use the `requires_shipping` property on the InventoryItem resource instead.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "sku": {"name": "sku", "description": "A unique identifier for the product variant in the shop. Required in order to connect to a FulfillmentService.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taxable": {"name": "taxable", "description": "Whether a tax is charged when the product variant is sold.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tax_code": {"name": "tax_code", "description": "This parameter applies only to the stores that have the Avalara AvaTax app installed. Specifies the Avalara tax code for the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "title": {"name": "title", "description": "The title of the product variant. The title field is a concatenation of the option1, option2, and option3 fields. You can only update title indirectly using the option fields.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_at": {"name": "updated_at", "description": "The date and time when the product variant was last modified. Gets returned in ISO 8601 format.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "weight": {"name": "weight", "description": "The weight of the product variant in the unit system specified with weight_unit.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "weight_unit": {"name": "weight_unit", "description": "The unit of measurement that applies to the product variant's weight. If you don't specify a value for weight_unit, then the shop's default unit of measurement is applied. Valid values: g, kg, oz, and lb.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_shipping_price_set": {"name": "total_shipping_price_set", "description": "The total shipping price set for the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "index": {"name": "index", "description": "The index associated with the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "pre_tax_price": {"name": "pre_tax_price", "description": "The total pre tax price of the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`dbt-package-testing`.`shopify`.`product_variant`", "created_at": 1665702405.328717}, "source.shopify_source.shopify.transaction": {"fqn": ["shopify_source", "shopify", "transaction"], "database": "dbt-package-testing", "schema": "shopify", "unique_id": "source.shopify_source.shopify.transaction", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "models/src_shopify.yml", "original_file_path": "models/src_shopify.yml", "name": "transaction", "source_name": "shopify", "source_description": "", "loader": "", "identifier": "transaction", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a transaction in Shopify.", "columns": {"transaction_id": {"name": "transaction_id", "description": "The ID for the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_id": {"name": "order_id", "description": "The ID for the order that the transaction is associated with.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refund_id": {"name": "refund_id", "description": "The ID associated with a refund in the refund table.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "amount": {"name": "amount", "description": "The amount of money included in the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "authorization": {"name": "authorization", "description": "The authorization code associated with the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_timestamp": {"name": "created_timestamp", "description": "The date and time when the transaction was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "processed_timestamp": {"name": "processed_timestamp", "description": "The date and time when a transaction was processed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "device_id": {"name": "device_id", "description": "The ID for the device.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "gateway": {"name": "gateway", "description": "The name of the gateway the transaction was issued through.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_name": {"name": "source_name", "description": "The origin of the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "message": {"name": "message", "description": "A string generated by the payment provider with additional information about why the transaction succeeded or failed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "The three-letter code (ISO 4217 format) for the currency used for the payment.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "location_id": {"name": "location_id", "description": "The ID of the physical location where the transaction was processed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "parent_id": {"name": "parent_id", "description": "The ID of an associated transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payment_avs_result_code": {"name": "payment_avs_result_code", "description": "The response code from the address verification system.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payment_credit_card_bin": {"name": "payment_credit_card_bin", "description": "The issuer identification number (IIN), formerly known as bank identification number (BIN) of the customer's credit card.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payment_cvv_result_code": {"name": "payment_cvv_result_code", "description": "The response code from the credit card company indicating whether the customer entered the card security code, or card verification value, correctly.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payment_credit_card_number": {"name": "payment_credit_card_number", "description": "The customer's credit card number, with most of the leading digits redacted.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payment_credit_card_company": {"name": "payment_credit_card_company", "description": "The name of the company that issued the customer's credit card.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "kind": {"name": "kind", "description": "The transaction's type.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "receipt": {"name": "receipt", "description": "A transaction receipt attached to the transaction by the gateway.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency_exchange_id": {"name": "currency_exchange_id", "description": "The ID of the adjustment.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency_exchange_adjustment": {"name": "currency_exchange_adjustment", "description": "The difference between the amounts on the associated transaction and the parent transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency_exchange_original_amount": {"name": "currency_exchange_original_amount", "description": "The amount of the parent transaction in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency_exchange_final_amount": {"name": "currency_exchange_final_amount", "description": "The amount of the associated transaction in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency_exchange_currency": {"name": "currency_exchange_currency", "description": "The shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "error_code": {"name": "error_code", "description": "A standardized error code, independent of the payment provider.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status": {"name": "status", "description": "The status of the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "test": {"name": "test", "description": "Whether the transaction is a test transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "user_id": {"name": "user_id", "description": "The ID for the user who was logged into the Shopify POS device when the order was processed, if applicable.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`dbt-package-testing`.`shopify`.`transaction`", "created_at": 1665702405.328804}, "source.shopify_source.shopify.refund": {"fqn": ["shopify_source", "shopify", "refund"], "database": "dbt-package-testing", "schema": "shopify", "unique_id": "source.shopify_source.shopify.refund", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "models/src_shopify.yml", "original_file_path": "models/src_shopify.yml", "name": "refund", "source_name": "shopify", "source_description": "", "loader": "", "identifier": "refund", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a refund within Shopify.", "columns": {"id": {"name": "id", "description": "The unique numeric identifier for the refund.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "Timestamp of the date when the refund was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "processed_at": {"name": "processed_at", "description": "Timestamp of the date when the refund was processed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "note": {"name": "note", "description": "User generated note attached to the refund.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "restock": {"name": "restock", "description": "Boolean indicating if the refund is a result of a restock.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "user_id": {"name": "user_id", "description": "Reference to the user id which generated the refund.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_duties_set": {"name": "total_duties_set", "description": "Record representing total duties set for the refund.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_id": {"name": "order_id", "description": "Reference to the order which the refund is associated.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`dbt-package-testing`.`shopify`.`refund`", "created_at": 1665702405.328871}, "source.shopify_source.shopify.order_adjustment": {"fqn": ["shopify_source", "shopify", "order_adjustment"], "database": "dbt-package-testing", "schema": "shopify", "unique_id": "source.shopify_source.shopify.order_adjustment", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "models/src_shopify.yml", "original_file_path": "models/src_shopify.yml", "name": "order_adjustment", "source_name": "shopify", "source_description": "", "loader": "", "identifier": "order_adjustment", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents and adjustment to and order within Shopify.", "columns": {"id": {"name": "id", "description": "The unique numeric identifier for the order adjustment.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_id": {"name": "order_id", "description": "Reference to the order which the adjustment is associated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refund_id": {"name": "refund_id", "description": "Reference to the refund which the adjustment is associated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "amount": {"name": "amount", "description": "Amount of the adjustment.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tax_amount": {"name": "tax_amount", "description": "Tax amount applied to the order adjustment.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "kind": {"name": "kind", "description": "The kind of order adjustment (eg. refund, restock, etc.).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "reason": {"name": "reason", "description": "The reason for the order adjustment.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "amount_set": {"name": "amount_set", "description": "Amount set towards the order adjustment", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tax_amount_set": {"name": "tax_amount_set", "description": "Tax amount set towards the order adjustment.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`dbt-package-testing`.`shopify`.`order_adjustment`", "created_at": 1665702405.328938}, "source.klaviyo_source.klaviyo.campaign": {"fqn": ["klaviyo_source", "klaviyo", "campaign"], "database": "dbt-package-testing", "schema": "klaviyo", "unique_id": "source.klaviyo_source.klaviyo.campaign", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "models/src_klaviyo.yml", "original_file_path": "models/src_klaviyo.yml", "name": "campaign", "source_name": "klaviyo", "source_description": "", "loader": "fivetran", "identifier": "campaign", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 72, "period": "hour"}, "error_after": {"count": 96, "period": "hour"}, "filter": null}, "external": null, "description": "Table capturing email campaigns in Klaviyo. \n", "columns": {"_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean that is true if the campaign has been soft-deleted.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_type": {"name": "campaign_type", "description": "Type of campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created": {"name": "created", "description": "Timestamp of when the campaign was created, in UTC.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email_template_id": {"name": "email_template_id", "description": "Foreign key referencing the ID of the `email_template` object that will be the content of this campaign. Note the Email Template is copied when creating this campaign, so future changes to that Email Template will not alter the content of this campaign.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "from_email": {"name": "from_email", "description": "The email address your email will be sent from and will be used in the reply-to header.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "from_name": {"name": "from_name", "description": "The name or label associated with the email address you're sending from.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "id": {"name": "id", "description": "Unique ID of the campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_segmented": {"name": "is_segmented", "description": "Boolean that is true if the campaign is directed at a Klaviyo segment (not a list).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "name": {"name": "name", "description": "A name for this campaign. If not specified, this will default to the subject of the campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "send_time": {"name": "send_time", "description": "Timestamp of when the campaign is scheduled to be sent in the future, if [\"smart send time\"](https://help.klaviyo.com/hc/en-us/articles/360029794371-Smart-Send-Time-in-Klaviyo#how-to-utilize-smart-send-time3) is used. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "sent_at": {"name": "sent_at", "description": "Timestamp of when the campaign was first sent out to users.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status": {"name": "status", "description": "Current status of the campaign. Either \"draft\", \"scheduled\", \"sent\", or \"cancelled\".", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status_id": {"name": "status_id", "description": "Corresponding ID to the current status.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status_label": {"name": "status_label", "description": "The label of the status as it appears in the UI (should be the same as `status`).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "subject": {"name": "subject", "description": "The subject line of the campaign's email.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated": {"name": "updated", "description": "Timestamp of when the campaign was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`dbt-package-testing`.`klaviyo`.`campaign`", "created_at": 1665702405.329047}, "source.klaviyo_source.klaviyo.event": {"fqn": ["klaviyo_source", "klaviyo", "event"], "database": "dbt-package-testing", "schema": "klaviyo", "unique_id": "source.klaviyo_source.klaviyo.event", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "models/src_klaviyo.yml", "original_file_path": "models/src_klaviyo.yml", "name": "event", "source_name": "klaviyo", "source_description": "", "loader": "fivetran", "identifier": "event", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 72, "period": "hour"}, "error_after": {"count": 96, "period": "hour"}, "filter": null}, "external": null, "description": "Table of events (and metrics) triggered in Klaviyo or via its integrations. Custom columns can be passed through to downstream models via the `klaviyo__event_pass_through_columns` variable (see README for details).\n", "columns": {"_variation": {"name": "_variation", "description": "Unique ID of the attributed flow or campaign variation group. This does not map onto another table. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Foreign key referencing the CAMPAIGN that the event is attributed to.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "datetime": {"name": "datetime", "description": "Timestamp of when the event was recorded in Klaviyo. Should be the same/nominally off from `timestamp`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "timestamp": {"name": "timestamp", "description": "Timestamp of when the event was triggered. Should be the same/nominally off from `datetime`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_id": {"name": "flow_id", "description": "Foreign key referencing the FLOW that the event is attributed to.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_message_id": {"name": "flow_message_id", "description": "Unique ID of the FLOW_MESSAGE that the event is attributed to. This does not map onto another table.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "id": {"name": "id", "description": "Unique ID of the event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "metric_id": {"name": "metric_id", "description": "Foreign key referencing the metric being captured.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "person_id": {"name": "person_id", "description": "Foreign key referencing the PERSON who triggered the event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "type": {"name": "type", "description": "Type of event that was triggered. This is the same as the METRIC name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "uuid": {"name": "uuid", "description": "Universally Unique Identifier of the event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "property_value": {"name": "property_value", "description": "Numeric value associated with the event (ie the dollars associated with a purchase).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean that is true if the campaign has been soft-deleted.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`dbt-package-testing`.`klaviyo`.`event`", "created_at": 1665702405.329118}, "source.klaviyo_source.klaviyo.flow": {"fqn": ["klaviyo_source", "klaviyo", "flow"], "database": "dbt-package-testing", "schema": "klaviyo", "unique_id": "source.klaviyo_source.klaviyo.flow", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "models/src_klaviyo.yml", "original_file_path": "models/src_klaviyo.yml", "name": "flow", "source_name": "klaviyo", "source_description": "", "loader": "fivetran", "identifier": "flow", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 72, "period": "hour"}, "error_after": {"count": 96, "period": "hour"}, "filter": null}, "external": null, "description": "Table of automated, triggered flow sequences in Klaviyo.", "columns": {"created": {"name": "created", "description": "Timestamp of when the flow was first created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "id": {"name": "id", "description": "Unique ID of the flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "name": {"name": "name", "description": "Name of the flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status": {"name": "status", "description": "Current status of the flow. Either 'manual', 'live', or 'draft'. Read more [here](https://help.klaviyo.com/hc/en-us/articles/115002774932-Getting-Started-with-Flows#the-flow-action-status9).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "trigger": {"name": "trigger", "description": "JSON of metric, segment, list, and/or date-property filters that will trigger this flow. These are applied to the **event level**.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated": {"name": "updated", "description": "Timestamp of when the flow was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "customer_filter": {"name": "customer_filter", "description": "JSON of flow filters placed on the **person level** that will trigger this flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean that is true if the campaign has been soft-deleted.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`dbt-package-testing`.`klaviyo`.`flow`", "created_at": 1665702405.3291829}, "source.klaviyo_source.klaviyo.integration": {"fqn": ["klaviyo_source", "klaviyo", "integration"], "database": "dbt-package-testing", "schema": "klaviyo", "unique_id": "source.klaviyo_source.klaviyo.integration", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "models/src_klaviyo.yml", "original_file_path": "models/src_klaviyo.yml", "name": "integration", "source_name": "klaviyo", "source_description": "", "loader": "fivetran", "identifier": "integration", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 72, "period": "hour"}, "error_after": {"count": 96, "period": "hour"}, "filter": null}, "external": null, "description": "Table storing third-party platforms integrated into Klaviyo.", "columns": {"category": {"name": "category", "description": "Use-case category of the integrated platform.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "id": {"name": "id", "description": "Unique ID of the integration.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "name": {"name": "name", "description": "Name of the integrated platform.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean that is true if the campaign has been soft-deleted.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`dbt-package-testing`.`klaviyo`.`integration`", "created_at": 1665702405.3292449}, "source.klaviyo_source.klaviyo.person": {"fqn": ["klaviyo_source", "klaviyo", "person"], "database": "dbt-package-testing", "schema": "klaviyo", "unique_id": "source.klaviyo_source.klaviyo.person", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "models/src_klaviyo.yml", "original_file_path": "models/src_klaviyo.yml", "name": "person", "source_name": "klaviyo", "source_description": "", "loader": "fivetran", "identifier": "person", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 72, "period": "hour"}, "error_after": {"count": 96, "period": "hour"}, "filter": null}, "external": null, "description": "Table storing the profiles of all people/users interacted with. Custom columns can be passed through to downstream models via the `klaviyo__person_pass_through_columns` variable (see README for details).\n", "columns": {"id": {"name": "id", "description": "Unique ID of the user if you use your own unique identifier. Otherwise, Klaviyo recommends using the email as the primary key. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "address_1": {"name": "address_1", "description": "First line of the person's address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "address_2": {"name": "address_2", "description": "Second line of the person's address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "city": {"name": "city", "description": "City they live in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "country": {"name": "country", "description": "Country they live in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "zip": {"name": "zip", "description": "Postal code where they live.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created": {"name": "created", "description": "Timestamp of when the person's profile was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email": {"name": "email", "description": "The email address and the unique identifier for a profile.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_name": {"name": "first_name", "description": "Person's first name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_name": {"name": "last_name", "description": "Person's surname.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "latitude": {"name": "latitude", "description": "Latitude of the person's location.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "longitude": {"name": "longitude", "description": "Longitude of the person's location.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization": {"name": "organization", "description": "Business organization they belong to.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "phone_number": {"name": "phone_number", "description": "Associated phone number.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "region": {"name": "region", "description": "Region or state they live in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "timezone": {"name": "timezone", "description": "Timezone they are situated in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "title": {"name": "title", "description": "Title at their business or organization.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated": {"name": "updated", "description": "Timestamp of when the person profile was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean that is true if the campaign has been soft-deleted.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`dbt-package-testing`.`klaviyo`.`person`", "created_at": 1665702405.329321}, "source.klaviyo_source.klaviyo.metric": {"fqn": ["klaviyo_source", "klaviyo", "metric"], "database": "dbt-package-testing", "schema": "klaviyo", "unique_id": "source.klaviyo_source.klaviyo.metric", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "models/src_klaviyo.yml", "original_file_path": "models/src_klaviyo.yml", "name": "metric", "source_name": "klaviyo", "source_description": "", "loader": "fivetran", "identifier": "metric", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 72, "period": "hour"}, "error_after": {"count": 96, "period": "hour"}, "filter": null}, "external": null, "description": "Table of tracked metrics across integrations in Klaviyo.", "columns": {"created": {"name": "created", "description": "Timestamp of when the metric was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "id": {"name": "id", "description": "Unique ID of the metric being tracked.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "integration_id": {"name": "integration_id", "description": "Foreign key referencing the INTEGRATION that the metric is being pulled from.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "name": {"name": "name", "description": "Name of the metric (same as `EVENT.type`)", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated": {"name": "updated", "description": "Timestamp of when the metric was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean that is true if the campaign has been soft-deleted.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`dbt-package-testing`.`klaviyo`.`metric`", "created_at": 1665702405.329383}}, "macros": {"macro.dbt_bigquery.date_sharded_table": {"unique_id": "macro.dbt_bigquery.date_sharded_table", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.909361}, "macro.dbt_bigquery.grant_access_to": {"unique_id": "macro.dbt_bigquery.grant_access_to", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.90958}, "macro.dbt_bigquery.get_partitions_metadata": {"unique_id": "macro.dbt_bigquery.get_partitions_metadata", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.909854}, "macro.dbt_bigquery.bigquery__get_catalog": {"unique_id": "macro.dbt_bigquery.bigquery__get_catalog", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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_utils.replace", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702403.913013}, "macro.dbt_bigquery.partition_by": {"unique_id": "macro.dbt_bigquery.partition_by", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.918139}, "macro.dbt_bigquery.cluster_by": {"unique_id": "macro.dbt_bigquery.cluster_by", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9185011}, "macro.dbt_bigquery.bigquery_options": {"unique_id": "macro.dbt_bigquery.bigquery_options", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9188428}, "macro.dbt_bigquery.bigquery_table_options": {"unique_id": "macro.dbt_bigquery.bigquery_table_options", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9190972}, "macro.dbt_bigquery.bigquery__create_table_as": {"unique_id": "macro.dbt_bigquery.bigquery__create_table_as", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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, 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 {{ sql }}\n );\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"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702403.9197161}, "macro.dbt_bigquery.bigquery_view_options": {"unique_id": "macro.dbt_bigquery.bigquery_view_options", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.919947}, "macro.dbt_bigquery.bigquery__create_view_as": {"unique_id": "macro.dbt_bigquery.bigquery__create_view_as", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.920256}, "macro.dbt_bigquery.bigquery__create_schema": {"unique_id": "macro.dbt_bigquery.bigquery__create_schema", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery__create_schema", "macro_sql": "{% macro bigquery__create_schema(relation) -%}\n {{ adapter.create_schema(relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702403.920379}, "macro.dbt_bigquery.bigquery__drop_schema": {"unique_id": "macro.dbt_bigquery.bigquery__drop_schema", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.920497}, "macro.dbt_bigquery.bigquery__drop_relation": {"unique_id": "macro.dbt_bigquery.bigquery__drop_relation", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.920676}, "macro.dbt_bigquery.bigquery__get_columns_in_relation": {"unique_id": "macro.dbt_bigquery.bigquery__get_columns_in_relation", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9208179}, "macro.dbt_bigquery.bigquery__list_relations_without_caching": {"unique_id": "macro.dbt_bigquery.bigquery__list_relations_without_caching", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9209611}, "macro.dbt_bigquery.bigquery__current_timestamp": {"unique_id": "macro.dbt_bigquery.bigquery__current_timestamp", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.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": 1665702403.921034}, "macro.dbt_bigquery.bigquery__snapshot_string_as_time": {"unique_id": "macro.dbt_bigquery.bigquery__snapshot_string_as_time", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.921201}, "macro.dbt_bigquery.bigquery__list_schemas": {"unique_id": "macro.dbt_bigquery.bigquery__list_schemas", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.921404}, "macro.dbt_bigquery.bigquery__check_schema_exists": {"unique_id": "macro.dbt_bigquery.bigquery__check_schema_exists", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9215791}, "macro.dbt_bigquery.bigquery__persist_docs": {"unique_id": "macro.dbt_bigquery.bigquery__persist_docs", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.921851}, "macro.dbt_bigquery.bigquery__alter_column_comment": {"unique_id": "macro.dbt_bigquery.bigquery__alter_column_comment", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.922005}, "macro.dbt_bigquery.bigquery__rename_relation": {"unique_id": "macro.dbt_bigquery.bigquery__rename_relation", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.922156}, "macro.dbt_bigquery.bigquery__alter_relation_add_columns": {"unique_id": "macro.dbt_bigquery.bigquery__alter_relation_add_columns", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.922542}, "macro.dbt_bigquery.bigquery__alter_relation_drop_columns": {"unique_id": "macro.dbt_bigquery.bigquery__alter_relation_drop_columns", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9229062}, "macro.dbt_bigquery.bigquery__alter_column_type": {"unique_id": "macro.dbt_bigquery.bigquery__alter_column_type", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9235468}, "macro.dbt_bigquery.bigquery__test_unique": {"unique_id": "macro.dbt_bigquery.bigquery__test_unique", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9237142}, "macro.dbt_bigquery.bigquery__upload_file": {"unique_id": "macro.dbt_bigquery.bigquery__upload_file", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.923991}, "macro.dbt_bigquery.bigquery__create_csv_table": {"unique_id": "macro.dbt_bigquery.bigquery__create_csv_table", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.924352}, "macro.dbt_bigquery.bigquery__reset_csv_table": {"unique_id": "macro.dbt_bigquery.bigquery__reset_csv_table", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9245062}, "macro.dbt_bigquery.bigquery__load_csv_rows": {"unique_id": "macro.dbt_bigquery.bigquery__load_csv_rows", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9251}, "macro.dbt_bigquery.bigquery__handle_existing_table": {"unique_id": "macro.dbt_bigquery.bigquery__handle_existing_table", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.925687}, "macro.dbt_bigquery.materialization_view_bigquery": {"unique_id": "macro.dbt_bigquery.materialization_view_bigquery", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.926333}, "macro.dbt_bigquery.materialization_table_bigquery": {"unique_id": "macro.dbt_bigquery.materialization_table_bigquery", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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' -%}\n\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 {% call statement('main') -%}\n {{ create_table_as(False, target_relation, sql) }}\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}, "patch_path": null, "arguments": [], "created_at": 1665702403.928426}, "macro.dbt_bigquery.materialization_copy_bigquery": {"unique_id": "macro.dbt_bigquery.materialization_copy_bigquery", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9296389}, "macro.dbt_bigquery.declare_dbt_max_partition": {"unique_id": "macro.dbt_bigquery.declare_dbt_max_partition", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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, sql) %}\n\n {% if '_dbt_max_partition' in 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}, "patch_path": null, "arguments": [], "created_at": 1665702403.931506}, "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": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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\", default=\"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}, "patch_path": null, "arguments": [], "created_at": 1665702403.931944}, "macro.dbt_bigquery.bq_insert_overwrite": {"unique_id": "macro.dbt_bigquery.bq_insert_overwrite", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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 {{ 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, sql) }}\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 {#\n TODO: include_sql_header is a hack; consider a better approach that includes\n the sql_header at the materialization-level instead\n #}\n -- 3. run the merge statement\n {{ get_insert_overwrite_merge_sql(target_relation, source_sql, dest_columns, [predicate], include_sql_header=false) }};\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}, "patch_path": null, "arguments": [], "created_at": 1665702403.933156}, "macro.dbt_bigquery.bq_generate_incremental_build_sql": {"unique_id": "macro.dbt_bigquery.bq_generate_incremental_build_sql", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9340029}, "macro.dbt_bigquery.materialization_incremental_bigquery": {"unique_id": "macro.dbt_bigquery.materialization_incremental_bigquery", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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' -%}\n\n {%- set unique_key = config.get('unique_key') -%}\n {%- set full_refresh_mode = (should_full_refresh()) -%}\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 {% set build_sql = create_table_as(False, target_relation, sql) %}\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 {% set build_sql = create_table_as(False, target_relation, sql) %}\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 {% set build_sql = create_table_as(False, target_relation, sql) %}\n\n {% else %}\n {% set tmp_relation_exists = false %}\n {% if on_schema_change != 'ignore' %} {# Check first, since otherwise we may not build a temp table #}\n {% do run_query(\n declare_dbt_max_partition(this, partition_by, sql) + create_table_as(True, tmp_relation, sql)\n ) %}\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 {% 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, sql, unique_key, partition_by, partitions, dest_columns, tmp_relation_exists\n ) %}\n\n {% endif %}\n\n {%- call statement('main') -%}\n {{ build_sql }}\n {% endcall %}\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.create_table_as", "macro.dbt.run_query", "macro.dbt_bigquery.declare_dbt_max_partition", "macro.dbt.process_schema_changes", "macro.dbt_bigquery.bq_generate_incremental_build_sql", "macro.dbt.statement", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702403.936778}, "macro.dbt_bigquery.bigquery__snapshot_hash_arguments": {"unique_id": "macro.dbt_bigquery.bigquery__snapshot_hash_arguments", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9372191}, "macro.dbt_bigquery.bigquery__create_columns": {"unique_id": "macro.dbt_bigquery.bigquery__create_columns", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.937369}, "macro.dbt_bigquery.bigquery__post_snapshot": {"unique_id": "macro.dbt_bigquery.bigquery__post_snapshot", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.937495}, "macro.dbt_bigquery.bigquery__except": {"unique_id": "macro.dbt_bigquery.bigquery__except", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.937655}, "macro.dbt_bigquery.bigquery__dateadd": {"unique_id": "macro.dbt_bigquery.bigquery__dateadd", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.937929}, "macro.dbt_bigquery.bigquery__intersect": {"unique_id": "macro.dbt_bigquery.bigquery__intersect", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.938082}, "macro.dbt_bigquery.bigquery__escape_single_quotes": {"unique_id": "macro.dbt_bigquery.bigquery__escape_single_quotes", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.93832}, "macro.dbt_bigquery.bigquery__right": {"unique_id": "macro.dbt_bigquery.bigquery__right", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.938595}, "macro.dbt_bigquery.bigquery__listagg": {"unique_id": "macro.dbt_bigquery.bigquery__listagg", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9390268}, "macro.dbt_bigquery.bigquery__datediff": {"unique_id": "macro.dbt_bigquery.bigquery__datediff", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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_utils.datediff"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702403.939562}, "macro.dbt_bigquery.bigquery__safe_cast": {"unique_id": "macro.dbt_bigquery.bigquery__safe_cast", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.939779}, "macro.dbt_bigquery.bigquery__hash": {"unique_id": "macro.dbt_bigquery.bigquery__hash", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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_utils.default__hash"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702403.9399931}, "macro.dbt_bigquery.bigquery__position": {"unique_id": "macro.dbt_bigquery.bigquery__position", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9402199}, "macro.dbt_bigquery.bigquery__bool_or": {"unique_id": "macro.dbt_bigquery.bigquery__bool_or", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9404008}, "macro.dbt_bigquery.bigquery__split_part": {"unique_id": "macro.dbt_bigquery.bigquery__split_part", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9409869}, "macro.dbt_bigquery.bigquery__date_trunc": {"unique_id": "macro.dbt_bigquery.bigquery__date_trunc", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9412138}, "macro.dbt_bigquery.bigquery__get_show_grant_sql": {"unique_id": "macro.dbt_bigquery.bigquery__get_show_grant_sql", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.941869}, "macro.dbt_bigquery.bigquery__get_grant_sql": {"unique_id": "macro.dbt_bigquery.bigquery__get_grant_sql", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9421709}, "macro.dbt_bigquery.bigquery__get_revoke_sql": {"unique_id": "macro.dbt_bigquery.bigquery__get_revoke_sql", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665702403.942407}, "macro.dbt.run_hooks": {"unique_id": "macro.dbt.run_hooks", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9434829}, "macro.dbt.make_hook_config": {"unique_id": "macro.dbt.make_hook_config", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.943676}, "macro.dbt.before_begin": {"unique_id": "macro.dbt.before_begin", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.943815}, "macro.dbt.in_transaction": {"unique_id": "macro.dbt.in_transaction", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9439511}, "macro.dbt.after_commit": {"unique_id": "macro.dbt.after_commit", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.944085}, "macro.dbt.set_sql_header": {"unique_id": "macro.dbt.set_sql_header", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9444869}, "macro.dbt.should_full_refresh": {"unique_id": "macro.dbt.should_full_refresh", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.944778}, "macro.dbt.should_store_failures": {"unique_id": "macro.dbt.should_store_failures", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9450722}, "macro.dbt.snapshot_merge_sql": {"unique_id": "macro.dbt.snapshot_merge_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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.default__snapshot_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702403.945535}, "macro.dbt.default__snapshot_merge_sql": {"unique_id": "macro.dbt.default__snapshot_merge_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.945803}, "macro.dbt.strategy_dispatch": {"unique_id": "macro.dbt.strategy_dispatch", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9490361}, "macro.dbt.snapshot_hash_arguments": {"unique_id": "macro.dbt.snapshot_hash_arguments", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__snapshot_hash_arguments"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702403.949198}, "macro.dbt.default__snapshot_hash_arguments": {"unique_id": "macro.dbt.default__snapshot_hash_arguments", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.949406}, "macro.dbt.snapshot_get_time": {"unique_id": "macro.dbt.snapshot_get_time", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_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.default__snapshot_get_time"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702403.949543}, "macro.dbt.default__snapshot_get_time": {"unique_id": "macro.dbt.default__snapshot_get_time", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_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": 1665702403.9496388}, "macro.dbt.snapshot_timestamp_strategy": {"unique_id": "macro.dbt.snapshot_timestamp_strategy", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.950392}, "macro.dbt.snapshot_string_as_time": {"unique_id": "macro.dbt.snapshot_string_as_time", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__snapshot_string_as_time"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702403.950551}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.950716}, "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-bigquery/1.2.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_sql']) -%}\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_sql'] }}) 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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9520729}, "macro.dbt.snapshot_check_strategy": {"unique_id": "macro.dbt.snapshot_check_strategy", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.953326}, "macro.dbt.create_columns": {"unique_id": "macro.dbt.create_columns", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__create_columns"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702403.956888}, "macro.dbt.default__create_columns": {"unique_id": "macro.dbt.default__create_columns", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.957165}, "macro.dbt.post_snapshot": {"unique_id": "macro.dbt.post_snapshot", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__post_snapshot"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702403.9573278}, "macro.dbt.default__post_snapshot": {"unique_id": "macro.dbt.default__post_snapshot", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.957411}, "macro.dbt.get_true_sql": {"unique_id": "macro.dbt.get_true_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.957549}, "macro.dbt.default__get_true_sql": {"unique_id": "macro.dbt.default__get_true_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.95766}, "macro.dbt.snapshot_staging_table": {"unique_id": "macro.dbt.snapshot_staging_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.957856}, "macro.dbt.default__snapshot_staging_table": {"unique_id": "macro.dbt.default__snapshot_staging_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.958703}, "macro.dbt.build_snapshot_table": {"unique_id": "macro.dbt.build_snapshot_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9588869}, "macro.dbt.default__build_snapshot_table": {"unique_id": "macro.dbt.default__build_snapshot_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9591382}, "macro.dbt.build_snapshot_staging_table": {"unique_id": "macro.dbt.build_snapshot_staging_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.959562}, "macro.dbt.materialization_snapshot_default": {"unique_id": "macro.dbt.materialization_snapshot_default", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_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 {% 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}, "patch_path": null, "arguments": [], "created_at": 1665702403.965253}, "macro.dbt.materialization_test_default": {"unique_id": "macro.dbt.materialization_test_default", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9672582}, "macro.dbt.get_test_sql": {"unique_id": "macro.dbt.get_test_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.967747}, "macro.dbt.default__get_test_sql": {"unique_id": "macro.dbt.default__get_test_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9680462}, "macro.dbt.get_where_subquery": {"unique_id": "macro.dbt.get_where_subquery", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.968451}, "macro.dbt.default__get_where_subquery": {"unique_id": "macro.dbt.default__get_where_subquery", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.968821}, "macro.dbt.get_quoted_csv": {"unique_id": "macro.dbt.get_quoted_csv", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.969634}, "macro.dbt.diff_columns": {"unique_id": "macro.dbt.diff_columns", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.970164}, "macro.dbt.diff_column_data_types": {"unique_id": "macro.dbt.diff_column_data_types", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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 %}\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": 1665702403.970756}, "macro.dbt.get_merge_sql": {"unique_id": "macro.dbt.get_merge_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.97548}, "macro.dbt.default__get_merge_sql": {"unique_id": "macro.dbt.default__get_merge_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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 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 {% 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"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702403.976922}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.977211}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.977945}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.978205}, "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-bigquery/1.2.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 {%- 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": 1665702403.978822}, "macro.dbt.is_incremental": {"unique_id": "macro.dbt.is_incremental", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9794931}, "macro.dbt.materialization_incremental_default": {"unique_id": "macro.dbt.materialization_incremental_default", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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 {% set build_sql = get_delete_insert_merge_sql(target_relation, temp_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 {% 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.get_delete_insert_merge_sql", "macro.dbt.statement", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs", "macro.dbt.create_indexes"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702403.983765}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9880378}, "macro.dbt.check_for_schema_changes": {"unique_id": "macro.dbt.check_for_schema_changes", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.989227}, "macro.dbt.sync_column_schemas": {"unique_id": "macro.dbt.sync_column_schemas", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9903932}, "macro.dbt.process_schema_changes": {"unique_id": "macro.dbt.process_schema_changes", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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 {% 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": 1665702403.9910872}, "macro.dbt.materialization_table_default": {"unique_id": "macro.dbt.materialization_table_default", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9935648}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.994028}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9942122}, "macro.dbt.create_table_as": {"unique_id": "macro.dbt.create_table_as", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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, sql) -%}\n {{ adapter.dispatch('create_table_as', 'dbt')(temporary, relation, sql) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__create_table_as"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702403.994411}, "macro.dbt.default__create_table_as": {"unique_id": "macro.dbt.default__create_table_as", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9948108}, "macro.dbt.materialization_view_default": {"unique_id": "macro.dbt.materialization_view_default", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.997277}, "macro.dbt.handle_existing_table": {"unique_id": "macro.dbt.handle_existing_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__handle_existing_table"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702403.9976199}, "macro.dbt.default__handle_existing_table": {"unique_id": "macro.dbt.default__handle_existing_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.997838}, "macro.dbt.create_or_replace_view": {"unique_id": "macro.dbt.create_or_replace_view", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.99933}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9997282}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702403.9998841}, "macro.dbt.create_view_as": {"unique_id": "macro.dbt.create_view_as", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__create_view_as"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.0000598}, "macro.dbt.default__create_view_as": {"unique_id": "macro.dbt.default__create_view_as", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.000316}, "macro.dbt.materialization_seed_default": {"unique_id": "macro.dbt.materialization_seed_default", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.003476}, "macro.dbt.create_csv_table": {"unique_id": "macro.dbt.create_csv_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__create_csv_table"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.007811}, "macro.dbt.default__create_csv_table": {"unique_id": "macro.dbt.default__create_csv_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.008683}, "macro.dbt.reset_csv_table": {"unique_id": "macro.dbt.reset_csv_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__reset_csv_table"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.008914}, "macro.dbt.default__reset_csv_table": {"unique_id": "macro.dbt.default__reset_csv_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.009386}, "macro.dbt.get_csv_sql": {"unique_id": "macro.dbt.get_csv_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.009571}, "macro.dbt.default__get_csv_sql": {"unique_id": "macro.dbt.default__get_csv_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.009696}, "macro.dbt.get_binding_char": {"unique_id": "macro.dbt.get_binding_char", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.009828}, "macro.dbt.default__get_binding_char": {"unique_id": "macro.dbt.default__get_binding_char", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.009941}, "macro.dbt.get_batch_size": {"unique_id": "macro.dbt.get_batch_size", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.010098}, "macro.dbt.default__get_batch_size": {"unique_id": "macro.dbt.default__get_batch_size", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.010207}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.010667}, "macro.dbt.load_csv_rows": {"unique_id": "macro.dbt.load_csv_rows", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__load_csv_rows"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.010848}, "macro.dbt.default__load_csv_rows": {"unique_id": "macro.dbt.default__load_csv_rows", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.012079}, "macro.dbt.generate_alias_name": {"unique_id": "macro.dbt.generate_alias_name", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.0125031}, "macro.dbt.default__generate_alias_name": {"unique_id": "macro.dbt.default__generate_alias_name", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.0127192}, "macro.dbt.generate_schema_name": {"unique_id": "macro.dbt.generate_schema_name", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.013262}, "macro.dbt.default__generate_schema_name": {"unique_id": "macro.dbt.default__generate_schema_name", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.0135128}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.013789}, "macro.dbt.generate_database_name": {"unique_id": "macro.dbt.generate_database_name", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.014216}, "macro.dbt.default__generate_database_name": {"unique_id": "macro.dbt.default__generate_database_name", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.014461}, "macro.dbt.default__test_relationships": {"unique_id": "macro.dbt.default__test_relationships", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.014854}, "macro.dbt.default__test_not_null": {"unique_id": "macro.dbt.default__test_not_null", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.015198}, "macro.dbt.default__test_unique": {"unique_id": "macro.dbt.default__test_unique", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.0154922}, "macro.dbt.default__test_accepted_values": {"unique_id": "macro.dbt.default__test_accepted_values", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.01608}, "macro.dbt.statement": {"unique_id": "macro.dbt.statement", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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": "{% 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": 1665702404.0171788}, "macro.dbt.noop_statement": {"unique_id": "macro.dbt.noop_statement", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.0177422}, "macro.dbt.run_query": {"unique_id": "macro.dbt.run_query", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.018028}, "macro.dbt.convert_datetime": {"unique_id": "macro.dbt.convert_datetime", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.0197399}, "macro.dbt.dates_in_range": {"unique_id": "macro.dbt.dates_in_range", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.0210319}, "macro.dbt.partition_range": {"unique_id": "macro.dbt.partition_range", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.021779}, "macro.dbt.py_current_timestring": {"unique_id": "macro.dbt.py_current_timestring", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.022006}, "macro.dbt.except": {"unique_id": "macro.dbt.except", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.bigquery__except"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.022309}, "macro.dbt.default__except": {"unique_id": "macro.dbt.default__except", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.0223832}, "macro.dbt.replace": {"unique_id": "macro.dbt.replace", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.default__replace"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.0227609}, "macro.dbt.default__replace": {"unique_id": "macro.dbt.default__replace", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.022919}, "macro.dbt.concat": {"unique_id": "macro.dbt.concat", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.default__concat"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.023221}, "macro.dbt.default__concat": {"unique_id": "macro.dbt.default__concat", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.023349}, "macro.dbt.length": {"unique_id": "macro.dbt.length", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.default__length"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.0236568}, "macro.dbt.default__length": {"unique_id": "macro.dbt.default__length", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.023763}, "macro.dbt.dateadd": {"unique_id": "macro.dbt.dateadd", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.bigquery__dateadd"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.024153}, "macro.dbt.default__dateadd": {"unique_id": "macro.dbt.default__dateadd", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.024323}, "macro.dbt.intersect": {"unique_id": "macro.dbt.intersect", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.bigquery__intersect"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.0246148}, "macro.dbt.default__intersect": {"unique_id": "macro.dbt.default__intersect", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.024699}, "macro.dbt.escape_single_quotes": {"unique_id": "macro.dbt.escape_single_quotes", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.bigquery__escape_single_quotes"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.025098}, "macro.dbt.default__escape_single_quotes": {"unique_id": "macro.dbt.default__escape_single_quotes", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.025249}, "macro.dbt.right": {"unique_id": "macro.dbt.right", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.bigquery__right"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.0256362}, "macro.dbt.default__right": {"unique_id": "macro.dbt.default__right", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.025771}, "macro.dbt.listagg": {"unique_id": "macro.dbt.listagg", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.bigquery__listagg"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.0264351}, "macro.dbt.default__listagg": {"unique_id": "macro.dbt.default__listagg", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.026918}, "macro.dbt.datediff": {"unique_id": "macro.dbt.datediff", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.bigquery__datediff"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.0273302}, "macro.dbt.default__datediff": {"unique_id": "macro.dbt.default__datediff", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.027488}, "macro.dbt.safe_cast": {"unique_id": "macro.dbt.safe_cast", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.bigquery__safe_cast"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.027841}, "macro.dbt.default__safe_cast": {"unique_id": "macro.dbt.default__safe_cast", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.027982}, "macro.dbt.hash": {"unique_id": "macro.dbt.hash", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.bigquery__hash"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.028291}, "macro.dbt.default__hash": {"unique_id": "macro.dbt.default__hash", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.028447}, "macro.dbt.cast_bool_to_text": {"unique_id": "macro.dbt.cast_bool_to_text", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.default__cast_bool_to_text"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.028747}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.028905}, "macro.dbt.any_value": {"unique_id": "macro.dbt.any_value", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.default__any_value"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.029204}, "macro.dbt.default__any_value": {"unique_id": "macro.dbt.default__any_value", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.0293062}, "macro.dbt.position": {"unique_id": "macro.dbt.position", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.bigquery__position"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.029641}, "macro.dbt.default__position": {"unique_id": "macro.dbt.default__position", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.0297742}, "macro.dbt.string_literal": {"unique_id": "macro.dbt.string_literal", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.default__string_literal"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.030067}, "macro.dbt.default__string_literal": {"unique_id": "macro.dbt.default__string_literal", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.030164}, "macro.dbt.type_string": {"unique_id": "macro.dbt.type_string", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.default__type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.031015}, "macro.dbt.default__type_string": {"unique_id": "macro.dbt.default__type_string", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.031165}, "macro.dbt.type_timestamp": {"unique_id": "macro.dbt.type_timestamp", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.default__type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.031323}, "macro.dbt.default__type_timestamp": {"unique_id": "macro.dbt.default__type_timestamp", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.031468}, "macro.dbt.type_float": {"unique_id": "macro.dbt.type_float", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.default__type_float"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.031683}, "macro.dbt.default__type_float": {"unique_id": "macro.dbt.default__type_float", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.031831}, "macro.dbt.type_numeric": {"unique_id": "macro.dbt.type_numeric", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.default__type_numeric"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.031988}, "macro.dbt.default__type_numeric": {"unique_id": "macro.dbt.default__type_numeric", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.032161}, "macro.dbt.type_bigint": {"unique_id": "macro.dbt.type_bigint", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.default__type_bigint"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.0323179}, "macro.dbt.default__type_bigint": {"unique_id": "macro.dbt.default__type_bigint", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.032467}, "macro.dbt.type_int": {"unique_id": "macro.dbt.type_int", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.default__type_int"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.032625}, "macro.dbt.default__type_int": {"unique_id": "macro.dbt.default__type_int", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.032762}, "macro.dbt.bool_or": {"unique_id": "macro.dbt.bool_or", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.bigquery__bool_or"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.033067}, "macro.dbt.default__bool_or": {"unique_id": "macro.dbt.default__bool_or", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.0331662}, "macro.dbt.last_day": {"unique_id": "macro.dbt.last_day", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.default__last_day"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.033548}, "macro.dbt.default_last_day": {"unique_id": "macro.dbt.default_last_day", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.dateadd", "macro.dbt_utils.date_trunc"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.03381}, "macro.dbt.default__last_day": {"unique_id": "macro.dbt.default__last_day", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.default_last_day"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.033953}, "macro.dbt.split_part": {"unique_id": "macro.dbt.split_part", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.bigquery__split_part"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.034496}, "macro.dbt.default__split_part": {"unique_id": "macro.dbt.default__split_part", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.034655}, "macro.dbt._split_part_negative": {"unique_id": "macro.dbt._split_part_negative", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.034873}, "macro.dbt.date_trunc": {"unique_id": "macro.dbt.date_trunc", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.bigquery__date_trunc"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.0351958}, "macro.dbt.default__date_trunc": {"unique_id": "macro.dbt.default__date_trunc", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.0353239}, "macro.dbt.create_schema": {"unique_id": "macro.dbt.create_schema", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__create_schema"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.03573}, "macro.dbt.default__create_schema": {"unique_id": "macro.dbt.default__create_schema", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.035907}, "macro.dbt.drop_schema": {"unique_id": "macro.dbt.drop_schema", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__drop_schema"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.036076}, "macro.dbt.default__drop_schema": {"unique_id": "macro.dbt.default__drop_schema", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.036318}, "macro.dbt.get_create_index_sql": {"unique_id": "macro.dbt.get_create_index_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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.default__get_create_index_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.0368059}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.0369349}, "macro.dbt.create_indexes": {"unique_id": "macro.dbt.create_indexes", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.03709}, "macro.dbt.default__create_indexes": {"unique_id": "macro.dbt.default__create_indexes", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.037484}, "macro.dbt.make_intermediate_relation": {"unique_id": "macro.dbt.make_intermediate_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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.default__make_intermediate_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.040443}, "macro.dbt.default__make_intermediate_relation": {"unique_id": "macro.dbt.default__make_intermediate_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.040608}, "macro.dbt.make_temp_relation": {"unique_id": "macro.dbt.make_temp_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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.default__make_temp_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.040822}, "macro.dbt.default__make_temp_relation": {"unique_id": "macro.dbt.default__make_temp_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.041109}, "macro.dbt.make_backup_relation": {"unique_id": "macro.dbt.make_backup_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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.default__make_backup_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.04135}, "macro.dbt.default__make_backup_relation": {"unique_id": "macro.dbt.default__make_backup_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.0416598}, "macro.dbt.drop_relation": {"unique_id": "macro.dbt.drop_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__drop_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.041837}, "macro.dbt.default__drop_relation": {"unique_id": "macro.dbt.default__drop_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.042043}, "macro.dbt.truncate_relation": {"unique_id": "macro.dbt.truncate_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.042221}, "macro.dbt.default__truncate_relation": {"unique_id": "macro.dbt.default__truncate_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.042378}, "macro.dbt.rename_relation": {"unique_id": "macro.dbt.rename_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__rename_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.0425768}, "macro.dbt.default__rename_relation": {"unique_id": "macro.dbt.default__rename_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.042846}, "macro.dbt.get_or_create_relation": {"unique_id": "macro.dbt.get_or_create_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.043089}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.043823}, "macro.dbt.load_cached_relation": {"unique_id": "macro.dbt.load_cached_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.0440478}, "macro.dbt.load_relation": {"unique_id": "macro.dbt.load_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.044186}, "macro.dbt.drop_relation_if_exists": {"unique_id": "macro.dbt.drop_relation_if_exists", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.044379}, "macro.dbt.current_timestamp": {"unique_id": "macro.dbt.current_timestamp", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/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_utils.bigquery__current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.044875}, "macro.dbt.default__current_timestamp": {"unique_id": "macro.dbt.default__current_timestamp", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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__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": 1665702404.045015}, "macro.dbt.collect_freshness": {"unique_id": "macro.dbt.collect_freshness", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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.fivetran_utils.default__collect_freshness"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.0452359}, "macro.dbt.default__collect_freshness": {"unique_id": "macro.dbt.default__collect_freshness", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.045644}, "macro.dbt.copy_grants": {"unique_id": "macro.dbt.copy_grants", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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.default__copy_grants"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.047235}, "macro.dbt.default__copy_grants": {"unique_id": "macro.dbt.default__copy_grants", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.047343}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.047507}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.047611}, "macro.dbt.should_revoke": {"unique_id": "macro.dbt.should_revoke", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.047947}, "macro.dbt.get_show_grant_sql": {"unique_id": "macro.dbt.get_show_grant_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__get_show_grant_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.048131}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.048231}, "macro.dbt.get_grant_sql": {"unique_id": "macro.dbt.get_grant_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__get_grant_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.048455}, "macro.dbt.default__get_grant_sql": {"unique_id": "macro.dbt.default__get_grant_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.048639}, "macro.dbt.get_revoke_sql": {"unique_id": "macro.dbt.get_revoke_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__get_revoke_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.048861}, "macro.dbt.default__get_revoke_sql": {"unique_id": "macro.dbt.default__get_revoke_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.049048}, "macro.dbt.get_dcl_statement_list": {"unique_id": "macro.dbt.get_dcl_statement_list", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.049272}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.049998}, "macro.dbt.call_dcl_statements": {"unique_id": "macro.dbt.call_dcl_statements", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.050184}, "macro.dbt.default__call_dcl_statements": {"unique_id": "macro.dbt.default__call_dcl_statements", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.050425}, "macro.dbt.apply_grants": {"unique_id": "macro.dbt.apply_grants", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.0506508}, "macro.dbt.default__apply_grants": {"unique_id": "macro.dbt.default__apply_grants", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.051757}, "macro.dbt.alter_column_comment": {"unique_id": "macro.dbt.alter_column_comment", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__alter_column_comment"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.052445}, "macro.dbt.default__alter_column_comment": {"unique_id": "macro.dbt.default__alter_column_comment", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.052609}, "macro.dbt.alter_relation_comment": {"unique_id": "macro.dbt.alter_relation_comment", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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.default__alter_relation_comment"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.05281}, "macro.dbt.default__alter_relation_comment": {"unique_id": "macro.dbt.default__alter_relation_comment", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.05297}, "macro.dbt.persist_docs": {"unique_id": "macro.dbt.persist_docs", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.0532322}, "macro.dbt.default__persist_docs": {"unique_id": "macro.dbt.default__persist_docs", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.053712}, "macro.dbt.get_catalog": {"unique_id": "macro.dbt.get_catalog", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__get_catalog"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.0551}, "macro.dbt.default__get_catalog": {"unique_id": "macro.dbt.default__get_catalog", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.055352}, "macro.dbt.information_schema_name": {"unique_id": "macro.dbt.information_schema_name", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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.default__information_schema_name"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.055535}, "macro.dbt.default__information_schema_name": {"unique_id": "macro.dbt.default__information_schema_name", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.055682}, "macro.dbt.list_schemas": {"unique_id": "macro.dbt.list_schemas", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__list_schemas"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.05586}, "macro.dbt.default__list_schemas": {"unique_id": "macro.dbt.default__list_schemas", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.0560992}, "macro.dbt.check_schema_exists": {"unique_id": "macro.dbt.check_schema_exists", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__check_schema_exists"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.056306}, "macro.dbt.default__check_schema_exists": {"unique_id": "macro.dbt.default__check_schema_exists", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.replace", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.056608}, "macro.dbt.list_relations_without_caching": {"unique_id": "macro.dbt.list_relations_without_caching", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__list_relations_without_caching"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.056788}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.056941}, "macro.dbt.get_columns_in_relation": {"unique_id": "macro.dbt.get_columns_in_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__get_columns_in_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.058536}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.058757}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.059065}, "macro.dbt.get_columns_in_query": {"unique_id": "macro.dbt.get_columns_in_query", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.059244}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.059575}, "macro.dbt.alter_column_type": {"unique_id": "macro.dbt.alter_column_type", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__alter_column_type"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.0598001}, "macro.dbt.default__alter_column_type": {"unique_id": "macro.dbt.default__alter_column_type", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.060398}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.060653}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.061413}, "macro.dbt.test_unique": {"unique_id": "macro.dbt.test_unique", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__test_unique"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.061954}, "macro.dbt.test_not_null": {"unique_id": "macro.dbt.test_not_null", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.062189}, "macro.dbt.test_accepted_values": {"unique_id": "macro.dbt.test_accepted_values", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.062468}, "macro.dbt.test_relationships": {"unique_id": "macro.dbt.test_relationships", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665702404.0627358}, "macro.shopify_source.get_order_columns": {"unique_id": "macro.shopify_source.get_order_columns", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "macros/staging_columns.sql", "original_file_path": "macros/staging_columns.sql", "name": "get_order_columns", "macro_sql": "{% macro get_order_columns() %}\n\n{% set columns = [\n {\"name\": \"id\", \"datatype\": dbt_utils.type_numeric(), \"alias\": \"order_id\"},\n {\"name\": \"processed_at\", \"datatype\": dbt_utils.type_timestamp(), \"alias\": \"processed_timestamp\"},\n {\"name\": \"updated_at\", \"datatype\": dbt_utils.type_timestamp(), \"alias\": \"updated_timestamp\"},\n {\"name\": \"user_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"total_discounts\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"total_line_items_price\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"total_price\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"total_tax\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"source_name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"subtotal_price\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"taxes_included\", \"datatype\": \"boolean\", \"alias\": \"has_taxes_included\"},\n {\"name\": \"total_weight\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"landing_site_base_url\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"location_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"note\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"number\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"order_number\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"cancel_reason\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"cancelled_at\", \"datatype\": dbt_utils.type_timestamp(), \"alias\": \"cancelled_timestamp\"},\n {\"name\": \"cart_token\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"checkout_token\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"closed_at\", \"datatype\": dbt_utils.type_timestamp(), \"alias\": \"closed_timestamp\"},\n {\"name\": \"created_at\", \"datatype\": dbt_utils.type_timestamp(), \"alias\": \"created_timestamp\"},\n {\"name\": \"currency\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"customer_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"email\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"financial_status\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"fulfillment_status\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"processing_method\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"referring_site\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"billing_address_address_1\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"billing_address_address_2\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"billing_address_city\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"billing_address_company\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"billing_address_country\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"billing_address_country_code\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"billing_address_first_name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"billing_address_last_name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"billing_address_latitude\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"billing_address_longitude\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"billing_address_name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"billing_address_phone\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"billing_address_province\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"billing_address_province_code\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"billing_address_zip\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"browser_ip\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"buyer_accepts_marketing\", \"datatype\": \"boolean\", \"alias\": \"has_buyer_accepted_marketing\"},\n {\"name\": \"total_shipping_price_set\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"shipping_address_address_1\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"shipping_address_address_2\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"shipping_address_city\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"shipping_address_company\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"shipping_address_country\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"shipping_address_country_code\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"shipping_address_first_name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"shipping_address_last_name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"shipping_address_latitude\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"shipping_address_longitude\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"shipping_address_name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"shipping_address_phone\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"shipping_address_province\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"shipping_address_province_code\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"shipping_address_zip\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"test\", \"datatype\": \"boolean\", \"alias\": \"is_test_order\"},\n {\"name\": \"token\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_numeric", "macro.dbt_utils.type_timestamp", "macro.dbt_utils.type_float", "macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.0776498}, "macro.shopify_source.get_customer_columns": {"unique_id": "macro.shopify_source.get_customer_columns", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "macros/staging_columns.sql", "original_file_path": "macros/staging_columns.sql", "name": "get_customer_columns", "macro_sql": "{% macro get_customer_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"accepts_marketing\", \"datatype\": \"boolean\", \"alias\": \"has_accepted_marketing\"},\n {\"name\": \"created_at\", \"datatype\": dbt_utils.type_timestamp(), \"alias\": \"created_timestamp\"},\n {\"name\": \"default_address_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"email\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"first_name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"id\", \"datatype\": dbt_utils.type_numeric(), \"alias\": \"customer_id\"},\n {\"name\": \"last_name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"orders_count\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"phone\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"state\", \"datatype\": dbt_utils.type_string(), \"alias\": \"account_state\"},\n {\"name\": \"tax_exempt\", \"datatype\": \"boolean\", \"alias\": \"is_tax_exempt\"},\n {\"name\": \"total_spent\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"updated_at\", \"datatype\": dbt_utils.type_timestamp(), \"alias\": \"updated_timestamp\"},\n {\"name\": \"verified_email\", \"datatype\": \"boolean\", \"alias\": \"is_verified_email\"}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_timestamp", "macro.dbt_utils.type_numeric", "macro.dbt_utils.type_string", "macro.dbt_utils.type_float"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.0793228}, "macro.shopify_source.get_order_line_refund_columns": {"unique_id": "macro.shopify_source.get_order_line_refund_columns", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "macros/staging_columns.sql", "original_file_path": "macros/staging_columns.sql", "name": "get_order_line_refund_columns", "macro_sql": "{% macro get_order_line_refund_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt_utils.type_numeric(), \"alias\": \"order_line_refund_id\"},\n {\"name\": \"location_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"order_line_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"subtotal\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"total_tax\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"quantity\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"refund_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"restock_type\", \"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_numeric", "macro.dbt_utils.type_float", "macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.080263}, "macro.shopify_source.get_order_line_columns": {"unique_id": "macro.shopify_source.get_order_line_columns", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "macros/staging_columns.sql", "original_file_path": "macros/staging_columns.sql", "name": "get_order_line_columns", "macro_sql": "{% macro get_order_line_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"fulfillable_quantity\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"fulfillment_service\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"fulfillment_status\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"gift_card\", \"datatype\": \"boolean\", \"alias\": \"is_gift_card\"},\n {\"name\": \"grams\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"id\", \"datatype\": dbt_utils.type_numeric(), \"alias\": \"order_line_id\"},\n {\"name\": \"index\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"order_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"pre_tax_price\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"price\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"product_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"property_charge_interval_frequency\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"property_for_shipping_jan_3_rd_2020\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"property_shipping_interval_frequency\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"property_shipping_interval_unit_type\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"property_subscription_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"quantity\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"requires_shipping\", \"datatype\": \"boolean\", \"alias\": \"is_requiring_shipping\"},\n {\"name\": \"sku\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"taxable\", \"datatype\": \"boolean\", \"alias\": \"is_taxable\"},\n {\"name\": \"title\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"total_discount\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"variant_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"vendor\", \"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_numeric", "macro.dbt_utils.type_string", "macro.dbt_utils.type_float"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.082616}, "macro.shopify_source.get_product_columns": {"unique_id": "macro.shopify_source.get_product_columns", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "macros/staging_columns.sql", "original_file_path": "macros/staging_columns.sql", "name": "get_product_columns", "macro_sql": "{% macro get_product_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"created_at\", \"datatype\": dbt_utils.type_timestamp(), \"alias\": \"created_timestamp\"},\n {\"name\": \"handle\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"id\", \"datatype\": dbt_utils.type_numeric(), \"alias\": \"product_id\"},\n {\"name\": \"product_type\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"published_at\", \"datatype\": dbt_utils.type_timestamp(), \"alias\": \"published_timestamp\"},\n {\"name\": \"published_scope\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"title\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"updated_at\", \"datatype\": dbt_utils.type_timestamp(), \"alias\": \"updated_timestamp\"},\n {\"name\": \"vendor\", \"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_numeric"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.0837839}, "macro.shopify_source.get_product_variant_columns": {"unique_id": "macro.shopify_source.get_product_variant_columns", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "macros/staging_columns.sql", "original_file_path": "macros/staging_columns.sql", "name": "get_product_variant_columns", "macro_sql": "{% macro get_product_variant_columns() %}\n\n{% set columns = [\n {\"name\": \"id\", \"datatype\": dbt_utils.type_numeric(), \"alias\": \"variant_id\"},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"created_at\", \"datatype\": dbt_utils.type_timestamp(), \"alias\": \"created_timestamp\"},\n {\"name\": \"updated_at\", \"datatype\": dbt_utils.type_timestamp(), \"alias\": \"updated_timestamp\"},\n {\"name\": \"product_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"inventory_item_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"image_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"title\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"price\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"sku\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"position\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"inventory_policy\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"compare_at_price\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"fulfillment_service\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"inventory_management\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"taxable\", \"datatype\": \"boolean\", \"alias\": \"is_taxable\"},\n {\"name\": \"barcode\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"grams\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"inventory_quantity\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"weight\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"weight_unit\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"option_1\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"option_2\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"option_3\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"tax_code\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"old_inventory_quantity\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"requires_shipping\", \"datatype\": \"boolean\", \"alias\": \"is_requiring_shipping\"}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_numeric", "macro.dbt_utils.type_timestamp", "macro.dbt_utils.type_string", "macro.dbt_utils.type_float"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.08626}, "macro.shopify_source.get_transaction_columns": {"unique_id": "macro.shopify_source.get_transaction_columns", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "macros/staging_columns.sql", "original_file_path": "macros/staging_columns.sql", "name": "get_transaction_columns", "macro_sql": "{% macro get_transaction_columns() %}\n\n{% set columns = [\n {\"name\": \"id\", \"datatype\": dbt_utils.type_numeric(), \"alias\": \"transaction_id\"},\n {\"name\": \"order_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"refund_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"amount\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"created_at\", \"datatype\": dbt_utils.type_timestamp(), \"alias\": \"created_timestamp\"},\n {\"name\": \"processed_at\", \"datatype\": dbt_utils.type_timestamp(), \"alias\": \"processed_timestamp\"},\n {\"name\": \"device_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"gateway\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"source_name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"message\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"currency\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"location_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"parent_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"payment_avs_result_code\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"payment_credit_card_bin\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"payment_cvv_result_code\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"payment_credit_card_number\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"payment_credit_card_company\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"kind\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"receipt\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"currency_exchange_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"currency_exchange_adjustment\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"currency_exchange_original_amount\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"currency_exchange_final_amount\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"currency_exchange_currency\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"error_code\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"status\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"test\", \"datatype\": \"boolean\"},\n {\"name\": \"user_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()}\n] %}\n\n{% if target.type in ('redshift','postgres') %}\n {{ columns.append({\"name\": \"authorization\", \"datatype\": dbt_utils.type_string(), \"quote\": True, \"alias\": \"authorization\"}) }}\n{% else %}\n {\"name\": \"authorization\", \"datatype\": dbt_utils.type_string()}\n{% endif %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_numeric", "macro.dbt_utils.type_timestamp", "macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.089289}, "macro.shopify_source.get_refund_columns": {"unique_id": "macro.shopify_source.get_refund_columns", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "macros/staging_columns.sql", "original_file_path": "macros/staging_columns.sql", "name": "get_refund_columns", "macro_sql": "{% macro get_refund_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"created_at\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt_utils.type_numeric(), \"alias\": \"refund_id\"},\n {\"name\": \"note\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"order_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"processed_at\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"restock\", \"datatype\": \"boolean\"},\n {\"name\": \"user_id\", \"datatype\": dbt_utils.type_numeric()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_timestamp", "macro.dbt_utils.type_numeric", "macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.0901299}, "macro.shopify_source.get_order_adjustment_columns": {"unique_id": "macro.shopify_source.get_order_adjustment_columns", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "macros/staging_columns.sql", "original_file_path": "macros/staging_columns.sql", "name": "get_order_adjustment_columns", "macro_sql": "{% macro get_order_adjustment_columns() %}\n\n{% set columns = [\n {\"name\": \"id\", \"datatype\": dbt_utils.type_numeric(), \"alias\": \"order_adjustment_id\"},\n {\"name\": \"order_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"refund_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"amount\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"tax_amount\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"kind\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"reason\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_numeric", "macro.dbt_utils.type_float", "macro.dbt_utils.type_string", "macro.dbt_utils.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.09098}, "macro.dbt_utils.except": {"unique_id": "macro.dbt_utils.except", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__except"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.091292}, "macro.dbt_utils.default__except": {"unique_id": "macro.dbt_utils.default__except", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.091362}, "macro.dbt_utils.bigquery__except": {"unique_id": "macro.dbt_utils.bigquery__except", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.09143}, "macro.dbt_utils.replace": {"unique_id": "macro.dbt_utils.replace", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.0918121}, "macro.dbt_utils.default__replace": {"unique_id": "macro.dbt_utils.default__replace", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.091969}, "macro.dbt_utils.concat": {"unique_id": "macro.dbt_utils.concat", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.092271}, "macro.dbt_utils.default__concat": {"unique_id": "macro.dbt_utils.default__concat", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.092393}, "macro.dbt_utils.type_string": {"unique_id": "macro.dbt_utils.type_string", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.default__type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.093077}, "macro.dbt_utils.default__type_string": {"unique_id": "macro.dbt_utils.default__type_string", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.093149}, "macro.dbt_utils.redshift__type_string": {"unique_id": "macro.dbt_utils.redshift__type_string", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.093216}, "macro.dbt_utils.postgres__type_string": {"unique_id": "macro.dbt_utils.postgres__type_string", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.093281}, "macro.dbt_utils.snowflake__type_string": {"unique_id": "macro.dbt_utils.snowflake__type_string", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.093348}, "macro.dbt_utils.type_timestamp": {"unique_id": "macro.dbt_utils.type_timestamp", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.default__type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.093502}, "macro.dbt_utils.default__type_timestamp": {"unique_id": "macro.dbt_utils.default__type_timestamp", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.093575}, "macro.dbt_utils.postgres__type_timestamp": {"unique_id": "macro.dbt_utils.postgres__type_timestamp", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.093643}, "macro.dbt_utils.snowflake__type_timestamp": {"unique_id": "macro.dbt_utils.snowflake__type_timestamp", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.093709}, "macro.dbt_utils.type_float": {"unique_id": "macro.dbt_utils.type_float", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__type_float"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.093864}, "macro.dbt_utils.default__type_float": {"unique_id": "macro.dbt_utils.default__type_float", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.093935}, "macro.dbt_utils.bigquery__type_float": {"unique_id": "macro.dbt_utils.bigquery__type_float", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.094}, "macro.dbt_utils.type_numeric": {"unique_id": "macro.dbt_utils.type_numeric", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__type_numeric"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.094214}, "macro.dbt_utils.default__type_numeric": {"unique_id": "macro.dbt_utils.default__type_numeric", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.094285}, "macro.dbt_utils.bigquery__type_numeric": {"unique_id": "macro.dbt_utils.bigquery__type_numeric", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.09435}, "macro.dbt_utils.type_bigint": {"unique_id": "macro.dbt_utils.type_bigint", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__type_bigint"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.0945039}, "macro.dbt_utils.default__type_bigint": {"unique_id": "macro.dbt_utils.default__type_bigint", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.094572}, "macro.dbt_utils.bigquery__type_bigint": {"unique_id": "macro.dbt_utils.bigquery__type_bigint", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.094638}, "macro.dbt_utils.type_int": {"unique_id": "macro.dbt_utils.type_int", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__type_int"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.0947928}, "macro.dbt_utils.default__type_int": {"unique_id": "macro.dbt_utils.default__type_int", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.094861}, "macro.dbt_utils.bigquery__type_int": {"unique_id": "macro.dbt_utils.bigquery__type_int", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.094927}, "macro.dbt_utils._is_relation": {"unique_id": "macro.dbt_utils._is_relation", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.0954182}, "macro.dbt_utils.cast_array_to_string": {"unique_id": "macro.dbt_utils.cast_array_to_string", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__cast_array_to_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.0958579}, "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/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.095995}, "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/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.096292}, "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/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.096431}, "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/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.09653}, "macro.dbt_utils.length": {"unique_id": "macro.dbt_utils.length", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.09687}, "macro.dbt_utils.default__length": {"unique_id": "macro.dbt_utils.default__length", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.096973}, "macro.dbt_utils.redshift__length": {"unique_id": "macro.dbt_utils.redshift__length", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.0970712}, "macro.dbt_utils.dateadd": {"unique_id": "macro.dbt_utils.dateadd", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__dateadd"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.0976489}, "macro.dbt_utils.default__dateadd": {"unique_id": "macro.dbt_utils.default__dateadd", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.097814}, "macro.dbt_utils.bigquery__dateadd": {"unique_id": "macro.dbt_utils.bigquery__dateadd", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.097968}, "macro.dbt_utils.postgres__dateadd": {"unique_id": "macro.dbt_utils.postgres__dateadd", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.098119}, "macro.dbt_utils.redshift__dateadd": {"unique_id": "macro.dbt_utils.redshift__dateadd", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.098378}, "macro.dbt_utils.intersect": {"unique_id": "macro.dbt_utils.intersect", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__intersect"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.098676}, "macro.dbt_utils.default__intersect": {"unique_id": "macro.dbt_utils.default__intersect", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.098749}, "macro.dbt_utils.bigquery__intersect": {"unique_id": "macro.dbt_utils.bigquery__intersect", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.098818}, "macro.dbt_utils.escape_single_quotes": {"unique_id": "macro.dbt_utils.escape_single_quotes", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__escape_single_quotes"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.099189}, "macro.dbt_utils.default__escape_single_quotes": {"unique_id": "macro.dbt_utils.default__escape_single_quotes", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.099326}, "macro.dbt_utils.snowflake__escape_single_quotes": {"unique_id": "macro.dbt_utils.snowflake__escape_single_quotes", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.0994601}, "macro.dbt_utils.bigquery__escape_single_quotes": {"unique_id": "macro.dbt_utils.bigquery__escape_single_quotes", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.0996008}, "macro.dbt_utils.right": {"unique_id": "macro.dbt_utils.right", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__right"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.100168}, "macro.dbt_utils.default__right": {"unique_id": "macro.dbt_utils.default__right", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.100298}, "macro.dbt_utils.bigquery__right": {"unique_id": "macro.dbt_utils.bigquery__right", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.100451}, "macro.dbt_utils.snowflake__right": {"unique_id": "macro.dbt_utils.snowflake__right", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.100598}, "macro.dbt_utils.listagg": {"unique_id": "macro.dbt_utils.listagg", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__listagg"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.10275}, "macro.dbt_utils.default__listagg": {"unique_id": "macro.dbt_utils.default__listagg", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.1031392}, "macro.dbt_utils.bigquery__listagg": {"unique_id": "macro.dbt_utils.bigquery__listagg", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.103408}, "macro.dbt_utils.postgres__listagg": {"unique_id": "macro.dbt_utils.postgres__listagg", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.103785}, "macro.dbt_utils.redshift__listagg": {"unique_id": "macro.dbt_utils.redshift__listagg", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.1047602}, "macro.dbt_utils.datediff": {"unique_id": "macro.dbt_utils.datediff", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__datediff"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.1072068}, "macro.dbt_utils.default__datediff": {"unique_id": "macro.dbt_utils.default__datediff", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.107363}, "macro.dbt_utils.bigquery__datediff": {"unique_id": "macro.dbt_utils.bigquery__datediff", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.107519}, "macro.dbt_utils.postgres__datediff": {"unique_id": "macro.dbt_utils.postgres__datediff", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.10918}, "macro.dbt_utils.redshift__datediff": {"unique_id": "macro.dbt_utils.redshift__datediff", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.109378}, "macro.dbt_utils.safe_cast": {"unique_id": "macro.dbt_utils.safe_cast", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__safe_cast"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.109785}, "macro.dbt_utils.default__safe_cast": {"unique_id": "macro.dbt_utils.default__safe_cast", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.109921}, "macro.dbt_utils.snowflake__safe_cast": {"unique_id": "macro.dbt_utils.snowflake__safe_cast", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.110042}, "macro.dbt_utils.bigquery__safe_cast": {"unique_id": "macro.dbt_utils.bigquery__safe_cast", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.110164}, "macro.dbt_utils.hash": {"unique_id": "macro.dbt_utils.hash", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__hash"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.110501}, "macro.dbt_utils.default__hash": {"unique_id": "macro.dbt_utils.default__hash", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.110637}, "macro.dbt_utils.bigquery__hash": {"unique_id": "macro.dbt_utils.bigquery__hash", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.110762}, "macro.dbt_utils.cast_bool_to_text": {"unique_id": "macro.dbt_utils.cast_bool_to_text", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.11111}, "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/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.111243}, "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/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.1113658}, "macro.dbt_utils.identifier": {"unique_id": "macro.dbt_utils.identifier", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__identifier"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.111866}, "macro.dbt_utils.default__identifier": {"unique_id": "macro.dbt_utils.default__identifier", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.111968}, "macro.dbt_utils.bigquery__identifier": {"unique_id": "macro.dbt_utils.bigquery__identifier", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.112072}, "macro.dbt_utils.any_value": {"unique_id": "macro.dbt_utils.any_value", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.default__any_value"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.112401}, "macro.dbt_utils.default__any_value": {"unique_id": "macro.dbt_utils.default__any_value", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.11256}, "macro.dbt_utils.postgres__any_value": {"unique_id": "macro.dbt_utils.postgres__any_value", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.112664}, "macro.dbt_utils.position": {"unique_id": "macro.dbt_utils.position", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__position"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.113064}, "macro.dbt_utils.default__position": {"unique_id": "macro.dbt_utils.default__position", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.1131961}, "macro.dbt_utils.bigquery__position": {"unique_id": "macro.dbt_utils.bigquery__position", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.113329}, "macro.dbt_utils.string_literal": {"unique_id": "macro.dbt_utils.string_literal", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.113625}, "macro.dbt_utils.default__string_literal": {"unique_id": "macro.dbt_utils.default__string_literal", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.113722}, "macro.dbt_utils.current_timestamp": {"unique_id": "macro.dbt_utils.current_timestamp", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.1142871}, "macro.dbt_utils.default__current_timestamp": {"unique_id": "macro.dbt_utils.default__current_timestamp", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.114398}, "macro.dbt_utils.redshift__current_timestamp": {"unique_id": "macro.dbt_utils.redshift__current_timestamp", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.114464}, "macro.dbt_utils.bigquery__current_timestamp": {"unique_id": "macro.dbt_utils.bigquery__current_timestamp", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.114532}, "macro.dbt_utils.current_timestamp_in_utc": {"unique_id": "macro.dbt_utils.current_timestamp_in_utc", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.default__current_timestamp_in_utc"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.1146848}, "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/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.114797}, "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/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.114935}, "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/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.115038}, "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/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.1151612}, "macro.dbt_utils.width_bucket": {"unique_id": "macro.dbt_utils.width_bucket", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.116535}, "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/dbt_shopify_holistic_reporting/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": 1665702404.1169841}, "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/dbt_shopify_holistic_reporting/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": 1665702404.1175091}, "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/dbt_shopify_holistic_reporting/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": 1665702404.117701}, "macro.dbt_utils.array_concat": {"unique_id": "macro.dbt_utils.array_concat", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__array_concat"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.118111}, "macro.dbt_utils.default__array_concat": {"unique_id": "macro.dbt_utils.default__array_concat", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.118241}, "macro.dbt_utils.bigquery__array_concat": {"unique_id": "macro.dbt_utils.bigquery__array_concat", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.1183648}, "macro.dbt_utils.redshift__array_concat": {"unique_id": "macro.dbt_utils.redshift__array_concat", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.118486}, "macro.dbt_utils.bool_or": {"unique_id": "macro.dbt_utils.bool_or", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__bool_or"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.1188538}, "macro.dbt_utils.default__bool_or": {"unique_id": "macro.dbt_utils.default__bool_or", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.118954}, "macro.dbt_utils.snowflake__bool_or": {"unique_id": "macro.dbt_utils.snowflake__bool_or", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.1190479}, "macro.dbt_utils.bigquery__bool_or": {"unique_id": "macro.dbt_utils.bigquery__bool_or", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.119145}, "macro.dbt_utils.last_day": {"unique_id": "macro.dbt_utils.last_day", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.default__last_day"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.1197262}, "macro.dbt_utils.default_last_day": {"unique_id": "macro.dbt_utils.default_last_day", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.119989}, "macro.dbt_utils.default__last_day": {"unique_id": "macro.dbt_utils.default__last_day", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.1201332}, "macro.dbt_utils.postgres__last_day": {"unique_id": "macro.dbt_utils.postgres__last_day", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.120516}, "macro.dbt_utils.redshift__last_day": {"unique_id": "macro.dbt_utils.redshift__last_day", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.1206882}, "macro.dbt_utils.split_part": {"unique_id": "macro.dbt_utils.split_part", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__split_part"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.122088}, "macro.dbt_utils.default__split_part": {"unique_id": "macro.dbt_utils.default__split_part", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.122249}, "macro.dbt_utils._split_part_negative": {"unique_id": "macro.dbt_utils._split_part_negative", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.122462}, "macro.dbt_utils.postgres__split_part": {"unique_id": "macro.dbt_utils.postgres__split_part", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.122786}, "macro.dbt_utils.redshift__split_part": {"unique_id": "macro.dbt_utils.redshift__split_part", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.1232798}, "macro.dbt_utils.bigquery__split_part": {"unique_id": "macro.dbt_utils.bigquery__split_part", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.12363}, "macro.dbt_utils.date_trunc": {"unique_id": "macro.dbt_utils.date_trunc", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__date_trunc"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.12401}, "macro.dbt_utils.default__date_trunc": {"unique_id": "macro.dbt_utils.default__date_trunc", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.124133}, "macro.dbt_utils.bigquery__date_trunc": {"unique_id": "macro.dbt_utils.bigquery__date_trunc", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.124257}, "macro.dbt_utils.array_construct": {"unique_id": "macro.dbt_utils.array_construct", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__array_construct"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.124801}, "macro.dbt_utils.default__array_construct": {"unique_id": "macro.dbt_utils.default__array_construct", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.125037}, "macro.dbt_utils.snowflake__array_construct": {"unique_id": "macro.dbt_utils.snowflake__array_construct", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.125178}, "macro.dbt_utils.redshift__array_construct": {"unique_id": "macro.dbt_utils.redshift__array_construct", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.125312}, "macro.dbt_utils.bigquery__array_construct": {"unique_id": "macro.dbt_utils.bigquery__array_construct", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.125442}, "macro.dbt_utils._is_ephemeral": {"unique_id": "macro.dbt_utils._is_ephemeral", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.126288}, "macro.dbt_utils.array_append": {"unique_id": "macro.dbt_utils.array_append", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__array_append"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.126691}, "macro.dbt_utils.default__array_append": {"unique_id": "macro.dbt_utils.default__array_append", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.126817}, "macro.dbt_utils.bigquery__array_append": {"unique_id": "macro.dbt_utils.bigquery__array_append", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.126997}, "macro.dbt_utils.redshift__array_append": {"unique_id": "macro.dbt_utils.redshift__array_append", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.12718}, "macro.dbt_utils.get_period_boundaries": {"unique_id": "macro.dbt_utils.get_period_boundaries", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.13262}, "macro.dbt_utils.default__get_period_boundaries": {"unique_id": "macro.dbt_utils.default__get_period_boundaries", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.133128}, "macro.dbt_utils.get_period_sql": {"unique_id": "macro.dbt_utils.get_period_sql", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.133443}, "macro.dbt_utils.default__get_period_sql": {"unique_id": "macro.dbt_utils.default__get_period_sql", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.133992}, "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/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.1389189}, "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/dbt_shopify_holistic_reporting/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": 1665702404.13935}, "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/dbt_shopify_holistic_reporting/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": 1665702404.1398242}, "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/dbt_shopify_holistic_reporting/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": 1665702404.140331}, "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/dbt_shopify_holistic_reporting/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": 1665702404.1409678}, "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/dbt_shopify_holistic_reporting/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": 1665702404.141332}, "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/dbt_shopify_holistic_reporting/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": 1665702404.141649}, "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/dbt_shopify_holistic_reporting/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": 1665702404.142209}, "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/dbt_shopify_holistic_reporting/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": 1665702404.142433}, "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/dbt_shopify_holistic_reporting/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": 1665702404.1428611}, "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/dbt_shopify_holistic_reporting/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": 1665702404.143156}, "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/dbt_shopify_holistic_reporting/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": 1665702404.143828}, "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/dbt_shopify_holistic_reporting/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": 1665702404.144159}, "macro.dbt_utils.test_recency": {"unique_id": "macro.dbt_utils.test_recency", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.1445959}, "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/dbt_shopify_holistic_reporting/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": 1665702404.144922}, "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/dbt_shopify_holistic_reporting/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": 1665702404.1452868}, "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/dbt_shopify_holistic_reporting/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": 1665702404.145453}, "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/dbt_shopify_holistic_reporting/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": 1665702404.146076}, "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/dbt_shopify_holistic_reporting/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": 1665702404.1465988}, "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/dbt_shopify_holistic_reporting/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": 1665702404.147171}, "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/dbt_shopify_holistic_reporting/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": 1665702404.147543}, "macro.dbt_utils.test_unique_where": {"unique_id": "macro.dbt_utils.test_unique_where", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.147991}, "macro.dbt_utils.default__test_unique_where": {"unique_id": "macro.dbt_utils.default__test_unique_where", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.148155}, "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/dbt_shopify_holistic_reporting/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": 1665702404.148524}, "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/dbt_shopify_holistic_reporting/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": 1665702404.1486988}, "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/dbt_shopify_holistic_reporting/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": 1665702404.1493309}, "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/dbt_shopify_holistic_reporting/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": 1665702404.1499588}, "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/dbt_shopify_holistic_reporting/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": 1665702404.150538}, "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/dbt_shopify_holistic_reporting/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": 1665702404.150879}, "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/dbt_shopify_holistic_reporting/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": 1665702404.151375}, "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/dbt_shopify_holistic_reporting/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": 1665702404.1516612}, "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/dbt_shopify_holistic_reporting/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": 1665702404.15212}, "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/dbt_shopify_holistic_reporting/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": 1665702404.152626}, "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/dbt_shopify_holistic_reporting/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": 1665702404.153302}, "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/dbt_shopify_holistic_reporting/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": 1665702404.153961}, "macro.dbt_utils.test_not_null_where": {"unique_id": "macro.dbt_utils.test_not_null_where", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.154412}, "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/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.154578}, "macro.dbt_utils.test_equality": {"unique_id": "macro.dbt_utils.test_equality", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.1553311}, "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/dbt_shopify_holistic_reporting/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": 1665702404.156201}, "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/dbt_shopify_holistic_reporting/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": 1665702404.1591291}, "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/dbt_shopify_holistic_reporting/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": 1665702404.160574}, "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/dbt_shopify_holistic_reporting/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": 1665702404.160898}, "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/dbt_shopify_holistic_reporting/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": 1665702404.1610591}, "macro.dbt_utils.pretty_time": {"unique_id": "macro.dbt_utils.pretty_time", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.161382}, "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/dbt_shopify_holistic_reporting/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": 1665702404.1615748}, "macro.dbt_utils.log_info": {"unique_id": "macro.dbt_utils.log_info", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.161881}, "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/dbt_shopify_holistic_reporting/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": 1665702404.162051}, "macro.dbt_utils.slugify": {"unique_id": "macro.dbt_utils.slugify", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.162557}, "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/dbt_shopify_holistic_reporting/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": 1665702404.163263}, "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/dbt_shopify_holistic_reporting/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": 1665702404.163847}, "macro.dbt_utils.date_spine": {"unique_id": "macro.dbt_utils.date_spine", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.164073}, "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/dbt_shopify_holistic_reporting/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": 1665702404.164423}, "macro.dbt_utils.nullcheck_table": {"unique_id": "macro.dbt_utils.nullcheck_table", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.164783}, "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/dbt_shopify_holistic_reporting/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": 1665702404.1651871}, "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/dbt_shopify_holistic_reporting/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": 1665702404.1658711}, "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/dbt_shopify_holistic_reporting/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": 1665702404.166715}, "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/dbt_shopify_holistic_reporting/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": 1665702404.167536}, "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/dbt_shopify_holistic_reporting/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": 1665702404.1679392}, "macro.dbt_utils.generate_series": {"unique_id": "macro.dbt_utils.generate_series", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.168125}, "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/dbt_shopify_holistic_reporting/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": 1665702404.168632}, "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/dbt_shopify_holistic_reporting/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": 1665702404.169319}, "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/dbt_shopify_holistic_reporting/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": 1665702404.1701498}, "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/dbt_shopify_holistic_reporting/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": 1665702404.170604}, "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/dbt_shopify_holistic_reporting/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": 1665702404.1708832}, "macro.dbt_utils.star": {"unique_id": "macro.dbt_utils.star", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.171585}, "macro.dbt_utils.default__star": {"unique_id": "macro.dbt_utils.default__star", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.172551}, "macro.dbt_utils.unpivot": {"unique_id": "macro.dbt_utils.unpivot", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.1742249}, "macro.dbt_utils.default__unpivot": {"unique_id": "macro.dbt_utils.default__unpivot", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.1762612}, "macro.dbt_utils.union_relations": {"unique_id": "macro.dbt_utils.union_relations", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.178715}, "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/dbt_shopify_holistic_reporting/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": 1665702404.181657}, "macro.dbt_utils.group_by": {"unique_id": "macro.dbt_utils.group_by", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.182005}, "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/dbt_shopify_holistic_reporting/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": 1665702404.18225}, "macro.dbt_utils.deduplicate": {"unique_id": "macro.dbt_utils.deduplicate", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__deduplicate"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.1845949}, "macro.dbt_utils.default__deduplicate": {"unique_id": "macro.dbt_utils.default__deduplicate", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.184814}, "macro.dbt_utils.redshift__deduplicate": {"unique_id": "macro.dbt_utils.redshift__deduplicate", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.185013}, "macro.dbt_utils.postgres__deduplicate": {"unique_id": "macro.dbt_utils.postgres__deduplicate", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.185193}, "macro.dbt_utils.snowflake__deduplicate": {"unique_id": "macro.dbt_utils.snowflake__deduplicate", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.1853518}, "macro.dbt_utils.bigquery__deduplicate": {"unique_id": "macro.dbt_utils.bigquery__deduplicate", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.185516}, "macro.dbt_utils.surrogate_key": {"unique_id": "macro.dbt_utils.surrogate_key", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.1861172}, "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/dbt_shopify_holistic_reporting/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": 1665702404.18703}, "macro.dbt_utils.safe_add": {"unique_id": "macro.dbt_utils.safe_add", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.187449}, "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/dbt_shopify_holistic_reporting/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": 1665702404.187721}, "macro.dbt_utils.nullcheck": {"unique_id": "macro.dbt_utils.nullcheck", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.188092}, "macro.dbt_utils.default__nullcheck": {"unique_id": "macro.dbt_utils.default__nullcheck", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.188421}, "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/dbt_shopify_holistic_reporting/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}, "patch_path": null, "arguments": [], "created_at": 1665702404.189873}, "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/dbt_shopify_holistic_reporting/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": 1665702404.190141}, "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/dbt_shopify_holistic_reporting/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": 1665702404.190898}, "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/dbt_shopify_holistic_reporting/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": 1665702404.191396}, "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/dbt_shopify_holistic_reporting/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": 1665702404.192481}, "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/dbt_shopify_holistic_reporting/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": 1665702404.193965}, "macro.dbt_utils.pivot": {"unique_id": "macro.dbt_utils.pivot", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.195022}, "macro.dbt_utils.default__pivot": {"unique_id": "macro.dbt_utils.default__pivot", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.1958542}, "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/dbt_shopify_holistic_reporting/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": 1665702404.196356}, "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/dbt_shopify_holistic_reporting/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": 1665702404.1970692}, "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/dbt_shopify_holistic_reporting/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": 1665702404.1974971}, "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/dbt_shopify_holistic_reporting/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": 1665702404.198076}, "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/dbt_shopify_holistic_reporting/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.bigquery__get_table_types_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.198563}, "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/dbt_shopify_holistic_reporting/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": 1665702404.1986449}, "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/dbt_shopify_holistic_reporting/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": 1665702404.198723}, "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/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.1987998}, "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/dbt_shopify_holistic_reporting/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": 1665702404.199808}, "macro.dbt_utils.haversine_distance": {"unique_id": "macro.dbt_utils.haversine_distance", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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}, "patch_path": null, "arguments": [], "created_at": 1665702404.200085}, "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/dbt_shopify_holistic_reporting/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": 1665702404.200638}, "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/dbt_shopify_holistic_reporting/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": 1665702404.2014878}, "macro.klaviyo_source.get_campaign_columns": {"unique_id": "macro.klaviyo_source.get_campaign_columns", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "macros/get_campaign_columns.sql", "original_file_path": "macros/get_campaign_columns.sql", "name": "get_campaign_columns", "macro_sql": "{% macro get_campaign_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"campaign_type\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"created\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"email_template_id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"from_email\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"from_name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"is_segmented\", \"datatype\": \"boolean\"},\n {\"name\": \"name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"send_time\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"sent_at\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"status\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"status_id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"status_label\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"subject\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"updated\", \"datatype\": dbt_utils.type_timestamp()}\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"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.203381}, "macro.klaviyo_source.get_metric_columns": {"unique_id": "macro.klaviyo_source.get_metric_columns", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "macros/get_metric_columns.sql", "original_file_path": "macros/get_metric_columns.sql", "name": "get_metric_columns", "macro_sql": "{% macro get_metric_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"created\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"integration_id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"updated\", \"datatype\": dbt_utils.type_timestamp()}\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"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.204294}, "macro.klaviyo_source.get_flow_columns": {"unique_id": "macro.klaviyo_source.get_flow_columns", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "macros/get_flow_columns.sql", "original_file_path": "macros/get_flow_columns.sql", "name": "get_flow_columns", "macro_sql": "{% macro get_flow_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"created\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"status\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"trigger\", \"datatype\": dbt_utils.type_string(), \"quote\": True},\n {\"name\": \"updated\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"customer_filter\", \"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"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.205426}, "macro.klaviyo_source.get_integration_columns": {"unique_id": "macro.klaviyo_source.get_integration_columns", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "macros/get_integration_columns.sql", "original_file_path": "macros/get_integration_columns.sql", "name": "get_integration_columns", "macro_sql": "{% macro get_integration_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"category\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"name\", \"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"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.206135}, "macro.klaviyo_source.get_person_columns": {"unique_id": "macro.klaviyo_source.get_person_columns", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "macros/get_person_columns.sql", "original_file_path": "macros/get_person_columns.sql", "name": "get_person_columns", "macro_sql": "{% macro get_person_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"address_1\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"address_2\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"city\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"country\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"created\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"email\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"first_name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"last_name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"latitude\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"longitude\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"organization\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"phone_number\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"region\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"timezone\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"title\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"updated\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"zip\", \"datatype\": dbt_utils.type_string()}\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('klaviyo__person_pass_through_columns')) }}\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_float", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.2084239}, "macro.klaviyo_source.get_event_columns": {"unique_id": "macro.klaviyo_source.get_event_columns", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "macros/get_event_columns.sql", "original_file_path": "macros/get_event_columns.sql", "name": "get_event_columns", "macro_sql": "{% macro get_event_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"_variation\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"campaign_id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"datetime\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"flow_id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"flow_message_id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"metric_id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"person_id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"timestamp\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"type\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"uuid\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"property_value\", \"datatype\": dbt_utils.type_string()}\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('klaviyo__event_pass_through_columns')) }}\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.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665702404.210104}, "macro.spark_utils.get_tables": {"unique_id": "macro.spark_utils.get_tables", "package_name": "spark_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.214804}, "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/dbt_shopify_holistic_reporting/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": 1665702404.215504}, "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/dbt_shopify_holistic_reporting/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": 1665702404.216375}, "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/dbt_shopify_holistic_reporting/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": 1665702404.2171562}, "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/dbt_shopify_holistic_reporting/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": 1665702404.217877}, "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/dbt_shopify_holistic_reporting/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": 1665702404.218766}, "macro.spark_utils.spark__concat": {"unique_id": "macro.spark_utils.spark__concat", "package_name": "spark_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.219004}, "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/dbt_shopify_holistic_reporting/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": 1665702404.219164}, "macro.spark_utils.spark__dateadd": {"unique_id": "macro.spark_utils.spark__dateadd", "package_name": "spark_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.221855}, "macro.spark_utils.spark__datediff": {"unique_id": "macro.spark_utils.spark__datediff", "package_name": "spark_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.22875}, "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/dbt_shopify_holistic_reporting/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": 1665702404.228941}, "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/dbt_shopify_holistic_reporting/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": 1665702404.229012}, "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/dbt_shopify_holistic_reporting/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": 1665702404.229606}, "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/dbt_shopify_holistic_reporting/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": 1665702404.231161}, "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/dbt_shopify_holistic_reporting/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": 1665702404.231494}, "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/dbt_shopify_holistic_reporting/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": 1665702404.231766}, "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/dbt_shopify_holistic_reporting/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": 1665702404.232037}, "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/dbt_shopify_holistic_reporting/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": 1665702404.232404}, "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/dbt_shopify_holistic_reporting/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": 1665702404.2326028}, "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/dbt_shopify_holistic_reporting/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": 1665702404.2328582}, "macro.fivetran_utils.enabled_vars": {"unique_id": "macro.fivetran_utils.enabled_vars", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.233296}, "macro.fivetran_utils.percentile": {"unique_id": "macro.fivetran_utils.percentile", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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}, "patch_path": null, "arguments": [], "created_at": 1665702404.234198}, "macro.fivetran_utils.default__percentile": {"unique_id": "macro.fivetran_utils.default__percentile", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.234356}, "macro.fivetran_utils.redshift__percentile": {"unique_id": "macro.fivetran_utils.redshift__percentile", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.234516}, "macro.fivetran_utils.bigquery__percentile": {"unique_id": "macro.fivetran_utils.bigquery__percentile", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.234676}, "macro.fivetran_utils.postgres__percentile": {"unique_id": "macro.fivetran_utils.postgres__percentile", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.234815}, "macro.fivetran_utils.spark__percentile": {"unique_id": "macro.fivetran_utils.spark__percentile", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.234968}, "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/dbt_shopify_holistic_reporting/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": 1665702404.235438}, "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/dbt_shopify_holistic_reporting/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": 1665702404.236274}, "macro.fivetran_utils.json_parse": {"unique_id": "macro.fivetran_utils.json_parse", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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}, "patch_path": null, "arguments": [], "created_at": 1665702404.237317}, "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/dbt_shopify_holistic_reporting/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": 1665702404.237563}, "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/dbt_shopify_holistic_reporting/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": 1665702404.237807}, "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/dbt_shopify_holistic_reporting/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": 1665702404.238039}, "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/dbt_shopify_holistic_reporting/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": 1665702404.238268}, "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/dbt_shopify_holistic_reporting/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": 1665702404.238527}, "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/dbt_shopify_holistic_reporting/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": 1665702404.238786}, "macro.fivetran_utils.max_bool": {"unique_id": "macro.fivetran_utils.max_bool", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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}, "patch_path": null, "arguments": [], "created_at": 1665702404.2391481}, "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/dbt_shopify_holistic_reporting/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": 1665702404.2392461}, "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/dbt_shopify_holistic_reporting/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": 1665702404.239341}, "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/dbt_shopify_holistic_reporting/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": 1665702404.239438}, "macro.fivetran_utils.calculated_fields": {"unique_id": "macro.fivetran_utils.calculated_fields", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.2398531}, "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/dbt_shopify_holistic_reporting/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": 1665702404.240463}, "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/dbt_shopify_holistic_reporting/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": 1665702404.2411}, "macro.fivetran_utils.string_agg": {"unique_id": "macro.fivetran_utils.string_agg", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.2415948}, "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/dbt_shopify_holistic_reporting/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": 1665702404.2417228}, "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/dbt_shopify_holistic_reporting/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": 1665702404.241846}, "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/dbt_shopify_holistic_reporting/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": 1665702404.241975}, "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/dbt_shopify_holistic_reporting/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": 1665702404.2421079}, "macro.fivetran_utils.timestamp_diff": {"unique_id": "macro.fivetran_utils.timestamp_diff", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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}, "patch_path": null, "arguments": [], "created_at": 1665702404.244826}, "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/dbt_shopify_holistic_reporting/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": 1665702404.244988}, "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/dbt_shopify_holistic_reporting/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": 1665702404.245141}, "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/dbt_shopify_holistic_reporting/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": 1665702404.245292}, "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/dbt_shopify_holistic_reporting/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": 1665702404.2469609}, "macro.fivetran_utils.try_cast": {"unique_id": "macro.fivetran_utils.try_cast", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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}, "patch_path": null, "arguments": [], "created_at": 1665702404.247791}, "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/dbt_shopify_holistic_reporting/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": 1665702404.247927}, "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/dbt_shopify_holistic_reporting/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": 1665702404.248193}, "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/dbt_shopify_holistic_reporting/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": 1665702404.24847}, "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/dbt_shopify_holistic_reporting/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": 1665702404.248598}, "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/dbt_shopify_holistic_reporting/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": 1665702404.248718}, "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/dbt_shopify_holistic_reporting/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": 1665702404.248839}, "macro.fivetran_utils.source_relation": {"unique_id": "macro.fivetran_utils.source_relation", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.249349}, "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/dbt_shopify_holistic_reporting/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": 1665702404.2499158}, "macro.fivetran_utils.first_value": {"unique_id": "macro.fivetran_utils.first_value", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.25044}, "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/dbt_shopify_holistic_reporting/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": 1665702404.250637}, "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/dbt_shopify_holistic_reporting/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": 1665702404.250858}, "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/dbt_shopify_holistic_reporting/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": 1665702404.2511628}, "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/dbt_shopify_holistic_reporting/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": 1665702404.252075}, "macro.fivetran_utils.union_relations": {"unique_id": "macro.fivetran_utils.union_relations", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.255859}, "macro.fivetran_utils.union_tables": {"unique_id": "macro.fivetran_utils.union_tables", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.256213}, "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/dbt_shopify_holistic_reporting/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": 1665702404.2566369}, "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/dbt_shopify_holistic_reporting/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": 1665702404.258143}, "macro.fivetran_utils.quote_column": {"unique_id": "macro.fivetran_utils.quote_column", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.25868}, "macro.fivetran_utils.json_extract": {"unique_id": "macro.fivetran_utils.json_extract", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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}, "patch_path": null, "arguments": [], "created_at": 1665702404.259259}, "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/dbt_shopify_holistic_reporting/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": 1665702404.259412}, "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/dbt_shopify_holistic_reporting/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": 1665702404.259562}, "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/dbt_shopify_holistic_reporting/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": 1665702404.259726}, "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/dbt_shopify_holistic_reporting/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": 1665702404.259874}, "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/dbt_shopify_holistic_reporting/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": 1665702404.260025}, "macro.fivetran_utils.collect_freshness": {"unique_id": "macro.fivetran_utils.collect_freshness", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.26073}, "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/dbt_shopify_holistic_reporting/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": 1665702404.261682}, "macro.fivetran_utils.timestamp_add": {"unique_id": "macro.fivetran_utils.timestamp_add", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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}, "patch_path": null, "arguments": [], "created_at": 1665702404.262378}, "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/dbt_shopify_holistic_reporting/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": 1665702404.262537}, "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/dbt_shopify_holistic_reporting/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": 1665702404.26269}, "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/dbt_shopify_holistic_reporting/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": 1665702404.2628422}, "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/dbt_shopify_holistic_reporting/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": 1665702404.2629938}, "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/dbt_shopify_holistic_reporting/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": 1665702404.263165}, "macro.fivetran_utils.ceiling": {"unique_id": "macro.fivetran_utils.ceiling", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.263461}, "macro.fivetran_utils.default__ceiling": {"unique_id": "macro.fivetran_utils.default__ceiling", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.2636192}, "macro.fivetran_utils.snowflake__ceiling": {"unique_id": "macro.fivetran_utils.snowflake__ceiling", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.2637172}, "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/dbt_shopify_holistic_reporting/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": 1665702404.264388}, "macro.fivetran_utils.union_data": {"unique_id": "macro.fivetran_utils.union_data", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.2655842}, "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/dbt_shopify_holistic_reporting/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": 1665702404.267287}, "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/dbt_shopify_holistic_reporting/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": 1665702404.268695}, "macro.fivetran_utils.array_agg": {"unique_id": "macro.fivetran_utils.array_agg", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665702404.2690089}, "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/dbt_shopify_holistic_reporting/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": 1665702404.2691069}, "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/dbt_shopify_holistic_reporting/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": 1665702404.269207}, "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/dbt_shopify_holistic_reporting/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": 1665702404.269645}, "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/dbt_shopify_holistic_reporting/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": 1665702404.270079}}, "docs": {"dbt.__overview__": {"unique_id": "dbt.__overview__", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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"}, "shopify_source._fivetran_synced": {"unique_id": "shopify_source._fivetran_synced", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "docs.md", "original_file_path": "models/docs.md", "name": "_fivetran_synced", "block_contents": "The time when a record was last updated by Fivetran."}}, "exposures": {}, "metrics": {}, "selectors": {}, "disabled": {"seed.shopify_holistic_reporting_integration_tests.flow_snowflake": [{"raw_sql": "", "resource_type": "seed", "depends_on": {"macros": [], "nodes": []}, "config": {"enabled": false, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "seed", "persist_docs": {}, "quoting": {}, "column_types": {"_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "linkedin_integration_tests", "fqn": ["shopify_holistic_reporting_integration_tests", "flow_snowflake"], "unique_id": "seed.shopify_holistic_reporting_integration_tests.flow_snowflake", "package_name": "shopify_holistic_reporting_integration_tests", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests", "path": "flow_snowflake.csv", "original_file_path": "seeds/flow_snowflake.csv", "name": "flow_snowflake", "alias": "flow_snowflake", "checksum": {"name": "sha256", "checksum": "6bdc1fd92ee1a5bd818f2c9dc35cb33e0b4549d4d0b325569e0518843ce02711"}, "tags": [], "refs": [], "sources": [], "metrics": [], "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 in ('redshift', 'postgres') else false }}", "column_types": {"_fivetran_synced": "timestamp"}, "enabled": "{{ true if target.type == 'snowflake' else false }}"}, "created_at": 1665702404.5314429, "config_call_dict": {}}]}, "parent_map": {"seed.shopify_holistic_reporting_integration_tests.shopify_order_data": [], "seed.shopify_holistic_reporting_integration_tests.shopify_order_line_refund_data": [], "seed.shopify_holistic_reporting_integration_tests.shopify_order_adjustment_data": [], "seed.shopify_holistic_reporting_integration_tests.shopify_product_variant_data": [], "seed.shopify_holistic_reporting_integration_tests.shopify_refund_data": [], "seed.shopify_holistic_reporting_integration_tests.shopify_transaction_data": [], "seed.shopify_holistic_reporting_integration_tests.flow": [], "seed.shopify_holistic_reporting_integration_tests.shopify_product_data": [], "seed.shopify_holistic_reporting_integration_tests.integration": [], "seed.shopify_holistic_reporting_integration_tests.metric": [], "seed.shopify_holistic_reporting_integration_tests.person": [], "seed.shopify_holistic_reporting_integration_tests.event": [], "seed.shopify_holistic_reporting_integration_tests.shopify_customer_data": [], "seed.shopify_holistic_reporting_integration_tests.shopify_order_line_data": [], "seed.shopify_holistic_reporting_integration_tests.campaign": [], "model.shopify_source.stg_shopify__order_line": ["model.shopify_source.stg_shopify__order_line_tmp", "model.shopify_source.stg_shopify__order_line_tmp"], "model.shopify_source.stg_shopify__refund": ["model.shopify_source.stg_shopify__refund_tmp", "model.shopify_source.stg_shopify__refund_tmp"], "model.shopify_source.stg_shopify__product": ["model.shopify_source.stg_shopify__product_tmp", "model.shopify_source.stg_shopify__product_tmp"], "model.shopify_source.stg_shopify__product_variant": ["model.shopify_source.stg_shopify__product_variant_tmp", "model.shopify_source.stg_shopify__product_variant_tmp"], "model.shopify_source.stg_shopify__order": ["model.shopify_source.stg_shopify__order_tmp", "model.shopify_source.stg_shopify__order_tmp"], "model.shopify_source.stg_shopify__transaction": ["model.shopify_source.stg_shopify__transaction_tmp", "model.shopify_source.stg_shopify__transaction_tmp"], "model.shopify_source.stg_shopify__order_adjustment": ["model.shopify_source.stg_shopify__order_adjustment_tmp", "model.shopify_source.stg_shopify__order_adjustment_tmp"], "model.shopify_source.stg_shopify__customer": ["model.shopify_source.stg_shopify__customer_tmp", "model.shopify_source.stg_shopify__customer_tmp"], "model.shopify_source.stg_shopify__order_line_refund": ["model.shopify_source.stg_shopify__order_line_refund_tmp", "model.shopify_source.stg_shopify__order_line_refund_tmp"], "model.shopify_source.stg_shopify__customer_tmp": ["seed.shopify_holistic_reporting_integration_tests.shopify_customer_data"], "model.shopify_source.stg_shopify__order_line_tmp": ["seed.shopify_holistic_reporting_integration_tests.shopify_order_line_data"], "model.shopify_source.stg_shopify__refund_tmp": ["seed.shopify_holistic_reporting_integration_tests.shopify_refund_data"], "model.shopify_source.stg_shopify__product_tmp": ["seed.shopify_holistic_reporting_integration_tests.shopify_product_data"], "model.shopify_source.stg_shopify__order_adjustment_tmp": ["seed.shopify_holistic_reporting_integration_tests.shopify_order_adjustment_data"], "model.shopify_source.stg_shopify__order_line_refund_tmp": ["seed.shopify_holistic_reporting_integration_tests.shopify_order_line_refund_data"], "model.shopify_source.stg_shopify__transaction_tmp": ["seed.shopify_holistic_reporting_integration_tests.shopify_transaction_data"], "model.shopify_source.stg_shopify__product_variant_tmp": ["seed.shopify_holistic_reporting_integration_tests.shopify_product_variant_data"], "model.shopify_source.stg_shopify__order_tmp": ["seed.shopify_holistic_reporting_integration_tests.shopify_order_data"], "model.klaviyo_source.stg_klaviyo__person": ["model.klaviyo_source.stg_klaviyo__person_tmp", "model.klaviyo_source.stg_klaviyo__person_tmp"], "model.klaviyo_source.stg_klaviyo__campaign": ["model.klaviyo_source.stg_klaviyo__campaign_tmp", "model.klaviyo_source.stg_klaviyo__campaign_tmp"], "model.klaviyo_source.stg_klaviyo__metric": ["model.klaviyo_source.stg_klaviyo__metric_tmp", "model.klaviyo_source.stg_klaviyo__metric_tmp"], "model.klaviyo_source.stg_klaviyo__integration": ["model.klaviyo_source.stg_klaviyo__integration_tmp", "model.klaviyo_source.stg_klaviyo__integration_tmp"], "model.klaviyo_source.stg_klaviyo__flow": ["model.klaviyo_source.stg_klaviyo__flow_tmp", "model.klaviyo_source.stg_klaviyo__flow_tmp"], "model.klaviyo_source.stg_klaviyo__event": ["model.klaviyo_source.stg_klaviyo__event_tmp", "model.klaviyo_source.stg_klaviyo__event_tmp"], "model.klaviyo_source.stg_klaviyo__event_tmp": ["seed.shopify_holistic_reporting_integration_tests.event"], "model.klaviyo_source.stg_klaviyo__metric_tmp": ["seed.shopify_holistic_reporting_integration_tests.metric"], "model.klaviyo_source.stg_klaviyo__campaign_tmp": ["seed.shopify_holistic_reporting_integration_tests.campaign"], "model.klaviyo_source.stg_klaviyo__integration_tmp": ["seed.shopify_holistic_reporting_integration_tests.integration"], "model.klaviyo_source.stg_klaviyo__flow_tmp": ["seed.shopify_holistic_reporting_integration_tests.flow"], "model.klaviyo_source.stg_klaviyo__person_tmp": ["seed.shopify_holistic_reporting_integration_tests.person"], "model.klaviyo.klaviyo__person_campaign_flow": ["model.klaviyo.klaviyo__events"], "model.klaviyo.klaviyo__persons": ["model.klaviyo.int_klaviyo__person_metrics", "model.klaviyo.int_klaviyo__person_metrics", "model.klaviyo_source.stg_klaviyo__person"], "model.klaviyo.klaviyo__flows": ["model.klaviyo.int_klaviyo__campaign_flow_metrics", "model.klaviyo.int_klaviyo__campaign_flow_metrics", "model.klaviyo_source.stg_klaviyo__flow"], "model.klaviyo.klaviyo__campaigns": ["model.klaviyo.int_klaviyo__campaign_flow_metrics", "model.klaviyo.int_klaviyo__campaign_flow_metrics", "model.klaviyo_source.stg_klaviyo__campaign"], "model.klaviyo.klaviyo__events": ["model.klaviyo.int_klaviyo__event_attribution", "model.klaviyo.int_klaviyo__event_attribution", "model.klaviyo_source.stg_klaviyo__campaign", "model.klaviyo_source.stg_klaviyo__flow", "model.klaviyo_source.stg_klaviyo__integration", "model.klaviyo_source.stg_klaviyo__metric", "model.klaviyo_source.stg_klaviyo__person"], "model.klaviyo.int_klaviyo__campaign_flow_metrics": ["model.klaviyo.klaviyo__person_campaign_flow", "model.klaviyo.klaviyo__person_campaign_flow"], "model.klaviyo.int_klaviyo__person_metrics": ["model.klaviyo.klaviyo__person_campaign_flow", "model.klaviyo.klaviyo__person_campaign_flow"], "model.klaviyo.int_klaviyo__event_attribution": ["model.klaviyo_source.stg_klaviyo__event"], "model.shopify.shopify__customer_cohorts": ["model.shopify.shopify__calendar", "model.shopify.shopify__customers", "model.shopify.shopify__orders"], "model.shopify.shopify__orders": ["model.shopify.shopify__orders__order_line_aggregates", "model.shopify.shopify__orders__order_refunds", "model.shopify_source.stg_shopify__order", "model.shopify_source.stg_shopify__order_adjustment"], "model.shopify.shopify__products": ["model.shopify.shopify__order_lines", "model.shopify.shopify__orders", "model.shopify_source.stg_shopify__product"], "model.shopify.shopify__transactions": ["model.shopify_source.stg_shopify__transaction"], "model.shopify.shopify__customers": ["model.shopify.shopify__customers__order_aggregates", "model.shopify_source.stg_shopify__customer", "model.shopify_source.stg_shopify__customer"], "model.shopify.shopify__order_lines": ["model.shopify.shopify__orders__order_refunds", "model.shopify_source.stg_shopify__order_line", "model.shopify_source.stg_shopify__product_variant"], "model.shopify.shopify__calendar": [], "model.shopify.shopify__orders__order_line_aggregates": ["model.shopify_source.stg_shopify__order_line"], "model.shopify.shopify__customers__order_aggregates": ["model.shopify.shopify__transactions", "model.shopify_source.stg_shopify__order"], "model.shopify.shopify__orders__order_refunds": ["model.shopify_source.stg_shopify__order_line_refund", "model.shopify_source.stg_shopify__refund"], "model.shopify_holistic_reporting.shopify_holistic_reporting__customer_enhanced": ["model.shopify_holistic_reporting.int__klaviyo_person_rollup", "model.shopify_holistic_reporting.int__klaviyo_person_rollup", "model.shopify_holistic_reporting.int__shopify_customer_rollup", "model.shopify_holistic_reporting.int__shopify_customer_rollup"], "model.shopify_holistic_reporting.shopify_holistic_reporting__orders_attribution": ["model.klaviyo.klaviyo__events", "model.shopify.shopify__orders", "model.shopify.shopify__orders"], "model.shopify_holistic_reporting.shopify_holistic_reporting__daily_customer_metrics": ["model.shopify_holistic_reporting.int__daily_klaviyo_user_metrics", "model.shopify_holistic_reporting.int__daily_klaviyo_user_metrics", "model.shopify_holistic_reporting.int__daily_shopify_customer_orders", "model.shopify_holistic_reporting.int__daily_shopify_customer_orders"], "model.shopify_holistic_reporting.int__daily_shopify_customer_orders": ["model.shopify.shopify__order_lines", "model.shopify_holistic_reporting.shopify_holistic_reporting__orders_attribution"], "model.shopify_holistic_reporting.int__shopify_customer_rollup": ["model.shopify.shopify__customers", "model.shopify.shopify__customers"], "model.shopify_holistic_reporting.int__daily_klaviyo_user_metrics": ["model.klaviyo.klaviyo__events"], "model.shopify_holistic_reporting.int__klaviyo_person_rollup": ["model.klaviyo.klaviyo__persons", "model.klaviyo.klaviyo__persons"], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__customer_customer_id__source_relation.1b2185db25": ["model.shopify_source.stg_shopify__customer"], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_line_refund_order_line_refund_id__source_relation.1877420c29": ["model.shopify_source.stg_shopify__order_line_refund"], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_line_order_line_id__source_relation.c2797e7a9c": ["model.shopify_source.stg_shopify__order_line"], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_order_id__source_relation.81d10381c1": ["model.shopify_source.stg_shopify__order"], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__product_product_id__source_relation.48b32ab6a2": ["model.shopify_source.stg_shopify__product"], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__product_variant_variant_id__source_relation.7506695ec0": ["model.shopify_source.stg_shopify__product_variant"], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__transaction_transaction_id__source_relation.d55a33652a": ["model.shopify_source.stg_shopify__transaction"], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__refund_refund_id__source_relation.cd4dbc2b35": ["model.shopify_source.stg_shopify__refund"], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_adjustment_order_adjustment_id__source_relation.00b7d10cb0": ["model.shopify_source.stg_shopify__order_adjustment"], "test.klaviyo_source.not_null_stg_klaviyo__campaign_campaign_id.5dfc47dc1d": ["model.klaviyo_source.stg_klaviyo__campaign"], "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__campaign_campaign_id__source_relation.59158488ff": ["model.klaviyo_source.stg_klaviyo__campaign"], "test.klaviyo_source.not_null_stg_klaviyo__event_event_id.7a09ac6ec1": ["model.klaviyo_source.stg_klaviyo__event"], "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__event_event_id__source_relation.3778c651d7": ["model.klaviyo_source.stg_klaviyo__event"], "test.klaviyo_source.not_null_stg_klaviyo__flow_flow_id.a00a897e42": ["model.klaviyo_source.stg_klaviyo__flow"], "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__flow_flow_id__source_relation.015215d481": ["model.klaviyo_source.stg_klaviyo__flow"], "test.klaviyo_source.not_null_stg_klaviyo__integration_integration_id.fe572c5f1b": ["model.klaviyo_source.stg_klaviyo__integration"], "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__integration_integration_id__source_relation.be6158ad21": ["model.klaviyo_source.stg_klaviyo__integration"], "test.klaviyo_source.not_null_stg_klaviyo__person_person_id.bd77ffc8aa": ["model.klaviyo_source.stg_klaviyo__person"], "test.klaviyo_source.unique_stg_klaviyo__person_email.dc3a98b014": ["model.klaviyo_source.stg_klaviyo__person"], "test.klaviyo_source.not_null_stg_klaviyo__person_email.c7094cfe27": ["model.klaviyo_source.stg_klaviyo__person"], "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__person_person_id__source_relation.33a4f9ca24": ["model.klaviyo_source.stg_klaviyo__person"], "test.klaviyo_source.not_null_stg_klaviyo__metric_metric_id.4759d62078": ["model.klaviyo_source.stg_klaviyo__metric"], "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__metric_metric_id__source_relation.e9f33c04e5": ["model.klaviyo_source.stg_klaviyo__metric"], "test.klaviyo.not_null_klaviyo__events_event_id.eada7340ba": ["model.klaviyo.klaviyo__events"], "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__events_event_id__source_relation.847dad4174": ["model.klaviyo.klaviyo__events"], "test.klaviyo.not_null_klaviyo__person_campaign_flow_person_id.e27d13b0f2": ["model.klaviyo.klaviyo__person_campaign_flow"], "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__person_campaign_flow_person_id__last_touch_campaign_id__last_touch_flow_id__variation_id__source_relation.30e1824079": ["model.klaviyo.klaviyo__person_campaign_flow"], "test.klaviyo.not_null_klaviyo__campaigns_campaign_variation_key.c4588cdadc": ["model.klaviyo.klaviyo__campaigns"], "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__campaigns_campaign_variation_key__source_relation.e5d14aee28": ["model.klaviyo.klaviyo__campaigns"], "test.klaviyo.not_null_klaviyo__flows_flow_variation_key.152c0d960b": ["model.klaviyo.klaviyo__flows"], "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__flows_flow_variation_key__source_relation.925d4118dc": ["model.klaviyo.klaviyo__flows"], "test.klaviyo.not_null_klaviyo__persons_person_id.624a41e75a": ["model.klaviyo.klaviyo__persons"], "test.klaviyo.unique_klaviyo__persons_email.a330194dd6": ["model.klaviyo.klaviyo__persons"], "test.klaviyo.not_null_klaviyo__persons_email.072e38d07d": ["model.klaviyo.klaviyo__persons"], "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__persons_person_id__source_relation.b223d703b3": ["model.klaviyo.klaviyo__persons"], "test.klaviyo.not_null_int_klaviyo__event_attribution_event_id.8d186152c4": ["model.klaviyo.int_klaviyo__event_attribution"], "test.klaviyo.dbt_utils_unique_combination_of_columns_int_klaviyo__event_attribution_event_id__source_relation.654b98ad2c": ["model.klaviyo.int_klaviyo__event_attribution"], "test.klaviyo.dbt_utils_unique_combination_of_columns_int_klaviyo__campaign_flow_metrics_variation_id__source_relation__last_touch_campaign_id__last_touch_flow_id.3ea05faa81": ["model.klaviyo.int_klaviyo__campaign_flow_metrics"], "test.klaviyo.not_null_int_klaviyo__person_metrics_person_id.2c0f4e5a67": ["model.klaviyo.int_klaviyo__person_metrics"], "test.klaviyo.dbt_utils_unique_combination_of_columns_int_klaviyo__person_metrics_person_id__source_relation.4897d57f8b": ["model.klaviyo.int_klaviyo__person_metrics"], "test.shopify.unique_shopify__customer_cohorts_customer_cohort_id.c5e4855c7a": ["model.shopify.shopify__customer_cohorts"], "test.shopify.not_null_shopify__customer_cohorts_customer_cohort_id.88e9c30925": ["model.shopify.shopify__customer_cohorts"], "test.shopify.dbt_utils_unique_combination_of_columns_shopify__orders_order_id__source_relation.b2d1eaf63d": ["model.shopify.shopify__orders"], "test.shopify.dbt_utils_unique_combination_of_columns_shopify__customers_customer_id__source_relation.88d3656469": ["model.shopify.shopify__customers"], "test.shopify.dbt_utils_unique_combination_of_columns_shopify__products_product_id__source_relation.f00b2fb95a": ["model.shopify.shopify__products"], "test.shopify.dbt_utils_unique_combination_of_columns_shopify__order_lines_order_line_id__source_relation.2483d5ef95": ["model.shopify.shopify__order_lines"], "test.shopify.dbt_utils_unique_combination_of_columns_shopify__transactions_transaction_id__source_relation.7341b755c0": ["model.shopify.shopify__transactions"], "test.shopify.dbt_utils_unique_combination_of_columns_shopify__customers__order_aggregates_customer_id__source_relation.5a5e85c8a9": ["model.shopify.shopify__customers__order_aggregates"], "test.shopify.dbt_utils_unique_combination_of_columns_shopify__orders__order_line_aggregates_order_id__source_relation.09d921d473": ["model.shopify.shopify__orders__order_line_aggregates"], "test.shopify_holistic_reporting.dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__customer_enhanced_email__klaviyo_source_relation__shopify_source_relation.2ea9394109": ["model.shopify_holistic_reporting.shopify_holistic_reporting__customer_enhanced"], "test.shopify_holistic_reporting.dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__daily_customer_metrics_date_day__email__klaviyo_source_relation__shopify_source_relation__campaign_id__flow_id__variation_id.0489c190fd": ["model.shopify_holistic_reporting.shopify_holistic_reporting__daily_customer_metrics"], "test.shopify_holistic_reporting.dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__orders_attribution_order_id__shopify_source_relation.0eb46743bb": ["model.shopify_holistic_reporting.shopify_holistic_reporting__orders_attribution"], "source.shopify_source.shopify.order": [], "source.shopify_source.shopify.customer": [], "source.shopify_source.shopify.order_line": [], "source.shopify_source.shopify.order_line_refund": [], "source.shopify_source.shopify.product": [], "source.shopify_source.shopify.product_variant": [], "source.shopify_source.shopify.transaction": [], "source.shopify_source.shopify.refund": [], "source.shopify_source.shopify.order_adjustment": [], "source.klaviyo_source.klaviyo.campaign": [], "source.klaviyo_source.klaviyo.event": [], "source.klaviyo_source.klaviyo.flow": [], "source.klaviyo_source.klaviyo.integration": [], "source.klaviyo_source.klaviyo.person": [], "source.klaviyo_source.klaviyo.metric": []}, "child_map": {"seed.shopify_holistic_reporting_integration_tests.shopify_order_data": ["model.shopify_source.stg_shopify__order_tmp"], "seed.shopify_holistic_reporting_integration_tests.shopify_order_line_refund_data": ["model.shopify_source.stg_shopify__order_line_refund_tmp"], "seed.shopify_holistic_reporting_integration_tests.shopify_order_adjustment_data": ["model.shopify_source.stg_shopify__order_adjustment_tmp"], "seed.shopify_holistic_reporting_integration_tests.shopify_product_variant_data": ["model.shopify_source.stg_shopify__product_variant_tmp"], "seed.shopify_holistic_reporting_integration_tests.shopify_refund_data": ["model.shopify_source.stg_shopify__refund_tmp"], "seed.shopify_holistic_reporting_integration_tests.shopify_transaction_data": ["model.shopify_source.stg_shopify__transaction_tmp"], "seed.shopify_holistic_reporting_integration_tests.flow": ["model.klaviyo_source.stg_klaviyo__flow_tmp"], "seed.shopify_holistic_reporting_integration_tests.shopify_product_data": ["model.shopify_source.stg_shopify__product_tmp"], "seed.shopify_holistic_reporting_integration_tests.integration": ["model.klaviyo_source.stg_klaviyo__integration_tmp"], "seed.shopify_holistic_reporting_integration_tests.metric": ["model.klaviyo_source.stg_klaviyo__metric_tmp"], "seed.shopify_holistic_reporting_integration_tests.person": ["model.klaviyo_source.stg_klaviyo__person_tmp"], "seed.shopify_holistic_reporting_integration_tests.event": ["model.klaviyo_source.stg_klaviyo__event_tmp"], "seed.shopify_holistic_reporting_integration_tests.shopify_customer_data": ["model.shopify_source.stg_shopify__customer_tmp"], "seed.shopify_holistic_reporting_integration_tests.shopify_order_line_data": ["model.shopify_source.stg_shopify__order_line_tmp"], "seed.shopify_holistic_reporting_integration_tests.campaign": ["model.klaviyo_source.stg_klaviyo__campaign_tmp"], "model.shopify_source.stg_shopify__order_line": ["model.shopify.shopify__order_lines", "model.shopify.shopify__orders__order_line_aggregates", "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_line_order_line_id__source_relation.c2797e7a9c"], "model.shopify_source.stg_shopify__refund": ["model.shopify.shopify__orders__order_refunds", "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__refund_refund_id__source_relation.cd4dbc2b35"], "model.shopify_source.stg_shopify__product": ["model.shopify.shopify__products", "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__product_product_id__source_relation.48b32ab6a2"], "model.shopify_source.stg_shopify__product_variant": ["model.shopify.shopify__order_lines", "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__product_variant_variant_id__source_relation.7506695ec0"], "model.shopify_source.stg_shopify__order": ["model.shopify.shopify__customers__order_aggregates", "model.shopify.shopify__orders", "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_order_id__source_relation.81d10381c1"], "model.shopify_source.stg_shopify__transaction": ["model.shopify.shopify__transactions", "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__transaction_transaction_id__source_relation.d55a33652a"], "model.shopify_source.stg_shopify__order_adjustment": ["model.shopify.shopify__orders", "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_adjustment_order_adjustment_id__source_relation.00b7d10cb0"], "model.shopify_source.stg_shopify__customer": ["model.shopify.shopify__customers", "model.shopify.shopify__customers", "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__customer_customer_id__source_relation.1b2185db25"], "model.shopify_source.stg_shopify__order_line_refund": ["model.shopify.shopify__orders__order_refunds", "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_line_refund_order_line_refund_id__source_relation.1877420c29"], "model.shopify_source.stg_shopify__customer_tmp": ["model.shopify_source.stg_shopify__customer", "model.shopify_source.stg_shopify__customer"], "model.shopify_source.stg_shopify__order_line_tmp": ["model.shopify_source.stg_shopify__order_line", "model.shopify_source.stg_shopify__order_line"], "model.shopify_source.stg_shopify__refund_tmp": ["model.shopify_source.stg_shopify__refund", "model.shopify_source.stg_shopify__refund"], "model.shopify_source.stg_shopify__product_tmp": ["model.shopify_source.stg_shopify__product", "model.shopify_source.stg_shopify__product"], "model.shopify_source.stg_shopify__order_adjustment_tmp": ["model.shopify_source.stg_shopify__order_adjustment", "model.shopify_source.stg_shopify__order_adjustment"], "model.shopify_source.stg_shopify__order_line_refund_tmp": ["model.shopify_source.stg_shopify__order_line_refund", "model.shopify_source.stg_shopify__order_line_refund"], "model.shopify_source.stg_shopify__transaction_tmp": ["model.shopify_source.stg_shopify__transaction", "model.shopify_source.stg_shopify__transaction"], "model.shopify_source.stg_shopify__product_variant_tmp": ["model.shopify_source.stg_shopify__product_variant", "model.shopify_source.stg_shopify__product_variant"], "model.shopify_source.stg_shopify__order_tmp": ["model.shopify_source.stg_shopify__order", "model.shopify_source.stg_shopify__order"], "model.klaviyo_source.stg_klaviyo__person": ["model.klaviyo.klaviyo__events", "model.klaviyo.klaviyo__persons", "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__person_person_id__source_relation.33a4f9ca24", "test.klaviyo_source.not_null_stg_klaviyo__person_email.c7094cfe27", "test.klaviyo_source.not_null_stg_klaviyo__person_person_id.bd77ffc8aa", "test.klaviyo_source.unique_stg_klaviyo__person_email.dc3a98b014"], "model.klaviyo_source.stg_klaviyo__campaign": ["model.klaviyo.klaviyo__campaigns", "model.klaviyo.klaviyo__events", "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__campaign_campaign_id__source_relation.59158488ff", "test.klaviyo_source.not_null_stg_klaviyo__campaign_campaign_id.5dfc47dc1d"], "model.klaviyo_source.stg_klaviyo__metric": ["model.klaviyo.klaviyo__events", "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__metric_metric_id__source_relation.e9f33c04e5", "test.klaviyo_source.not_null_stg_klaviyo__metric_metric_id.4759d62078"], "model.klaviyo_source.stg_klaviyo__integration": ["model.klaviyo.klaviyo__events", "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__integration_integration_id__source_relation.be6158ad21", "test.klaviyo_source.not_null_stg_klaviyo__integration_integration_id.fe572c5f1b"], "model.klaviyo_source.stg_klaviyo__flow": ["model.klaviyo.klaviyo__events", "model.klaviyo.klaviyo__flows", "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__flow_flow_id__source_relation.015215d481", "test.klaviyo_source.not_null_stg_klaviyo__flow_flow_id.a00a897e42"], "model.klaviyo_source.stg_klaviyo__event": ["model.klaviyo.int_klaviyo__event_attribution", "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__event_event_id__source_relation.3778c651d7", "test.klaviyo_source.not_null_stg_klaviyo__event_event_id.7a09ac6ec1"], "model.klaviyo_source.stg_klaviyo__event_tmp": ["model.klaviyo_source.stg_klaviyo__event", "model.klaviyo_source.stg_klaviyo__event"], "model.klaviyo_source.stg_klaviyo__metric_tmp": ["model.klaviyo_source.stg_klaviyo__metric", "model.klaviyo_source.stg_klaviyo__metric"], "model.klaviyo_source.stg_klaviyo__campaign_tmp": ["model.klaviyo_source.stg_klaviyo__campaign", "model.klaviyo_source.stg_klaviyo__campaign"], "model.klaviyo_source.stg_klaviyo__integration_tmp": ["model.klaviyo_source.stg_klaviyo__integration", "model.klaviyo_source.stg_klaviyo__integration"], "model.klaviyo_source.stg_klaviyo__flow_tmp": ["model.klaviyo_source.stg_klaviyo__flow", "model.klaviyo_source.stg_klaviyo__flow"], "model.klaviyo_source.stg_klaviyo__person_tmp": ["model.klaviyo_source.stg_klaviyo__person", "model.klaviyo_source.stg_klaviyo__person"], "model.klaviyo.klaviyo__person_campaign_flow": ["model.klaviyo.int_klaviyo__campaign_flow_metrics", "model.klaviyo.int_klaviyo__campaign_flow_metrics", "model.klaviyo.int_klaviyo__person_metrics", "model.klaviyo.int_klaviyo__person_metrics", "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__person_campaign_flow_person_id__last_touch_campaign_id__last_touch_flow_id__variation_id__source_relation.30e1824079", "test.klaviyo.not_null_klaviyo__person_campaign_flow_person_id.e27d13b0f2"], "model.klaviyo.klaviyo__persons": ["model.shopify_holistic_reporting.int__klaviyo_person_rollup", "model.shopify_holistic_reporting.int__klaviyo_person_rollup", "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__persons_person_id__source_relation.b223d703b3", "test.klaviyo.not_null_klaviyo__persons_email.072e38d07d", "test.klaviyo.not_null_klaviyo__persons_person_id.624a41e75a", "test.klaviyo.unique_klaviyo__persons_email.a330194dd6"], "model.klaviyo.klaviyo__flows": ["test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__flows_flow_variation_key__source_relation.925d4118dc", "test.klaviyo.not_null_klaviyo__flows_flow_variation_key.152c0d960b"], "model.klaviyo.klaviyo__campaigns": ["test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__campaigns_campaign_variation_key__source_relation.e5d14aee28", "test.klaviyo.not_null_klaviyo__campaigns_campaign_variation_key.c4588cdadc"], "model.klaviyo.klaviyo__events": ["model.klaviyo.klaviyo__person_campaign_flow", "model.shopify_holistic_reporting.int__daily_klaviyo_user_metrics", "model.shopify_holistic_reporting.shopify_holistic_reporting__orders_attribution", "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__events_event_id__source_relation.847dad4174", "test.klaviyo.not_null_klaviyo__events_event_id.eada7340ba"], "model.klaviyo.int_klaviyo__campaign_flow_metrics": ["model.klaviyo.klaviyo__campaigns", "model.klaviyo.klaviyo__campaigns", "model.klaviyo.klaviyo__flows", "model.klaviyo.klaviyo__flows", "test.klaviyo.dbt_utils_unique_combination_of_columns_int_klaviyo__campaign_flow_metrics_variation_id__source_relation__last_touch_campaign_id__last_touch_flow_id.3ea05faa81"], "model.klaviyo.int_klaviyo__person_metrics": ["model.klaviyo.klaviyo__persons", "model.klaviyo.klaviyo__persons", "test.klaviyo.dbt_utils_unique_combination_of_columns_int_klaviyo__person_metrics_person_id__source_relation.4897d57f8b", "test.klaviyo.not_null_int_klaviyo__person_metrics_person_id.2c0f4e5a67"], "model.klaviyo.int_klaviyo__event_attribution": ["model.klaviyo.klaviyo__events", "model.klaviyo.klaviyo__events", "test.klaviyo.dbt_utils_unique_combination_of_columns_int_klaviyo__event_attribution_event_id__source_relation.654b98ad2c", "test.klaviyo.not_null_int_klaviyo__event_attribution_event_id.8d186152c4"], "model.shopify.shopify__customer_cohorts": ["test.shopify.not_null_shopify__customer_cohorts_customer_cohort_id.88e9c30925", "test.shopify.unique_shopify__customer_cohorts_customer_cohort_id.c5e4855c7a"], "model.shopify.shopify__orders": ["model.shopify.shopify__customer_cohorts", "model.shopify.shopify__products", "model.shopify_holistic_reporting.shopify_holistic_reporting__orders_attribution", "model.shopify_holistic_reporting.shopify_holistic_reporting__orders_attribution", "test.shopify.dbt_utils_unique_combination_of_columns_shopify__orders_order_id__source_relation.b2d1eaf63d"], "model.shopify.shopify__products": ["test.shopify.dbt_utils_unique_combination_of_columns_shopify__products_product_id__source_relation.f00b2fb95a"], "model.shopify.shopify__transactions": ["model.shopify.shopify__customers__order_aggregates", "test.shopify.dbt_utils_unique_combination_of_columns_shopify__transactions_transaction_id__source_relation.7341b755c0"], "model.shopify.shopify__customers": ["model.shopify.shopify__customer_cohorts", "model.shopify_holistic_reporting.int__shopify_customer_rollup", "model.shopify_holistic_reporting.int__shopify_customer_rollup", "test.shopify.dbt_utils_unique_combination_of_columns_shopify__customers_customer_id__source_relation.88d3656469"], "model.shopify.shopify__order_lines": ["model.shopify.shopify__products", "model.shopify_holistic_reporting.int__daily_shopify_customer_orders", "test.shopify.dbt_utils_unique_combination_of_columns_shopify__order_lines_order_line_id__source_relation.2483d5ef95"], "model.shopify.shopify__calendar": ["model.shopify.shopify__customer_cohorts"], "model.shopify.shopify__orders__order_line_aggregates": ["model.shopify.shopify__orders", "test.shopify.dbt_utils_unique_combination_of_columns_shopify__orders__order_line_aggregates_order_id__source_relation.09d921d473"], "model.shopify.shopify__customers__order_aggregates": ["model.shopify.shopify__customers", "test.shopify.dbt_utils_unique_combination_of_columns_shopify__customers__order_aggregates_customer_id__source_relation.5a5e85c8a9"], "model.shopify.shopify__orders__order_refunds": ["model.shopify.shopify__order_lines", "model.shopify.shopify__orders"], "model.shopify_holistic_reporting.shopify_holistic_reporting__customer_enhanced": ["test.shopify_holistic_reporting.dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__customer_enhanced_email__klaviyo_source_relation__shopify_source_relation.2ea9394109"], "model.shopify_holistic_reporting.shopify_holistic_reporting__orders_attribution": ["model.shopify_holistic_reporting.int__daily_shopify_customer_orders", "test.shopify_holistic_reporting.dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__orders_attribution_order_id__shopify_source_relation.0eb46743bb"], "model.shopify_holistic_reporting.shopify_holistic_reporting__daily_customer_metrics": ["test.shopify_holistic_reporting.dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__daily_customer_metrics_date_day__email__klaviyo_source_relation__shopify_source_relation__campaign_id__flow_id__variation_id.0489c190fd"], "model.shopify_holistic_reporting.int__daily_shopify_customer_orders": ["model.shopify_holistic_reporting.shopify_holistic_reporting__daily_customer_metrics", "model.shopify_holistic_reporting.shopify_holistic_reporting__daily_customer_metrics"], "model.shopify_holistic_reporting.int__shopify_customer_rollup": ["model.shopify_holistic_reporting.shopify_holistic_reporting__customer_enhanced", "model.shopify_holistic_reporting.shopify_holistic_reporting__customer_enhanced"], "model.shopify_holistic_reporting.int__daily_klaviyo_user_metrics": ["model.shopify_holistic_reporting.shopify_holistic_reporting__daily_customer_metrics", "model.shopify_holistic_reporting.shopify_holistic_reporting__daily_customer_metrics"], "model.shopify_holistic_reporting.int__klaviyo_person_rollup": ["model.shopify_holistic_reporting.shopify_holistic_reporting__customer_enhanced", "model.shopify_holistic_reporting.shopify_holistic_reporting__customer_enhanced"], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__customer_customer_id__source_relation.1b2185db25": [], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_line_refund_order_line_refund_id__source_relation.1877420c29": [], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_line_order_line_id__source_relation.c2797e7a9c": [], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_order_id__source_relation.81d10381c1": [], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__product_product_id__source_relation.48b32ab6a2": [], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__product_variant_variant_id__source_relation.7506695ec0": [], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__transaction_transaction_id__source_relation.d55a33652a": [], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__refund_refund_id__source_relation.cd4dbc2b35": [], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_adjustment_order_adjustment_id__source_relation.00b7d10cb0": [], "test.klaviyo_source.not_null_stg_klaviyo__campaign_campaign_id.5dfc47dc1d": [], "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__campaign_campaign_id__source_relation.59158488ff": [], "test.klaviyo_source.not_null_stg_klaviyo__event_event_id.7a09ac6ec1": [], "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__event_event_id__source_relation.3778c651d7": [], "test.klaviyo_source.not_null_stg_klaviyo__flow_flow_id.a00a897e42": [], "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__flow_flow_id__source_relation.015215d481": [], "test.klaviyo_source.not_null_stg_klaviyo__integration_integration_id.fe572c5f1b": [], "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__integration_integration_id__source_relation.be6158ad21": [], "test.klaviyo_source.not_null_stg_klaviyo__person_person_id.bd77ffc8aa": [], "test.klaviyo_source.unique_stg_klaviyo__person_email.dc3a98b014": [], "test.klaviyo_source.not_null_stg_klaviyo__person_email.c7094cfe27": [], "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__person_person_id__source_relation.33a4f9ca24": [], "test.klaviyo_source.not_null_stg_klaviyo__metric_metric_id.4759d62078": [], "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__metric_metric_id__source_relation.e9f33c04e5": [], "test.klaviyo.not_null_klaviyo__events_event_id.eada7340ba": [], "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__events_event_id__source_relation.847dad4174": [], "test.klaviyo.not_null_klaviyo__person_campaign_flow_person_id.e27d13b0f2": [], "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__person_campaign_flow_person_id__last_touch_campaign_id__last_touch_flow_id__variation_id__source_relation.30e1824079": [], "test.klaviyo.not_null_klaviyo__campaigns_campaign_variation_key.c4588cdadc": [], "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__campaigns_campaign_variation_key__source_relation.e5d14aee28": [], "test.klaviyo.not_null_klaviyo__flows_flow_variation_key.152c0d960b": [], "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__flows_flow_variation_key__source_relation.925d4118dc": [], "test.klaviyo.not_null_klaviyo__persons_person_id.624a41e75a": [], "test.klaviyo.unique_klaviyo__persons_email.a330194dd6": [], "test.klaviyo.not_null_klaviyo__persons_email.072e38d07d": [], "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__persons_person_id__source_relation.b223d703b3": [], "test.klaviyo.not_null_int_klaviyo__event_attribution_event_id.8d186152c4": [], "test.klaviyo.dbt_utils_unique_combination_of_columns_int_klaviyo__event_attribution_event_id__source_relation.654b98ad2c": [], "test.klaviyo.dbt_utils_unique_combination_of_columns_int_klaviyo__campaign_flow_metrics_variation_id__source_relation__last_touch_campaign_id__last_touch_flow_id.3ea05faa81": [], "test.klaviyo.not_null_int_klaviyo__person_metrics_person_id.2c0f4e5a67": [], "test.klaviyo.dbt_utils_unique_combination_of_columns_int_klaviyo__person_metrics_person_id__source_relation.4897d57f8b": [], "test.shopify.unique_shopify__customer_cohorts_customer_cohort_id.c5e4855c7a": [], "test.shopify.not_null_shopify__customer_cohorts_customer_cohort_id.88e9c30925": [], "test.shopify.dbt_utils_unique_combination_of_columns_shopify__orders_order_id__source_relation.b2d1eaf63d": [], "test.shopify.dbt_utils_unique_combination_of_columns_shopify__customers_customer_id__source_relation.88d3656469": [], "test.shopify.dbt_utils_unique_combination_of_columns_shopify__products_product_id__source_relation.f00b2fb95a": [], "test.shopify.dbt_utils_unique_combination_of_columns_shopify__order_lines_order_line_id__source_relation.2483d5ef95": [], "test.shopify.dbt_utils_unique_combination_of_columns_shopify__transactions_transaction_id__source_relation.7341b755c0": [], "test.shopify.dbt_utils_unique_combination_of_columns_shopify__customers__order_aggregates_customer_id__source_relation.5a5e85c8a9": [], "test.shopify.dbt_utils_unique_combination_of_columns_shopify__orders__order_line_aggregates_order_id__source_relation.09d921d473": [], "test.shopify_holistic_reporting.dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__customer_enhanced_email__klaviyo_source_relation__shopify_source_relation.2ea9394109": [], "test.shopify_holistic_reporting.dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__daily_customer_metrics_date_day__email__klaviyo_source_relation__shopify_source_relation__campaign_id__flow_id__variation_id.0489c190fd": [], "test.shopify_holistic_reporting.dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__orders_attribution_order_id__shopify_source_relation.0eb46743bb": [], "source.shopify_source.shopify.order": [], "source.shopify_source.shopify.customer": [], "source.shopify_source.shopify.order_line": [], "source.shopify_source.shopify.order_line_refund": [], "source.shopify_source.shopify.product": [], "source.shopify_source.shopify.product_variant": [], "source.shopify_source.shopify.transaction": [], "source.shopify_source.shopify.refund": [], "source.shopify_source.shopify.order_adjustment": [], "source.klaviyo_source.klaviyo.campaign": [], "source.klaviyo_source.klaviyo.event": [], "source.klaviyo_source.klaviyo.flow": [], "source.klaviyo_source.klaviyo.integration": [], "source.klaviyo_source.klaviyo.person": [], "source.klaviyo_source.klaviyo.metric": []}} \ No newline at end of file +{"metadata": {"dbt_schema_version": "https://schemas.getdbt.com/dbt/manifest/v6.json", "dbt_version": "1.2.0", "generated_at": "2022-10-13T23:21:00.158592Z", "invocation_id": "09cf5607-4d3b-4819-bd09-baa959605110", "env": {}, "project_id": "0d919ec91381ade1c67705291b214e1c", "user_id": "2bfa9082-ea6e-467b-abdc-d0514ab111d9", "send_anonymous_usage_stats": true, "adapter_type": "bigquery"}, "nodes": {"seed.shopify_holistic_reporting_integration_tests.shopify_order_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": {"_fivetran_synced": "timestamp", "created_at": "timestamp", "updated_at": "timestamp", "processed_at": "timestamp", "cancelled_at": "timestamp", "id": "INT64", "customer_id": "INT64", "location_id": "INT64", "user_id": "INT64"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test", "fqn": ["shopify_holistic_reporting_integration_tests", "shopify_order_data"], "unique_id": "seed.shopify_holistic_reporting_integration_tests.shopify_order_data", "package_name": "shopify_holistic_reporting_integration_tests", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests", "path": "shopify_order_data.csv", "original_file_path": "seeds/shopify_order_data.csv", "name": "shopify_order_data", "alias": "shopify_order_data", "checksum": {"name": "sha256", "checksum": "4d0dd043a886a0d9e7680e7ee2cd132717490f75d3a06fe7c38956d901976146"}, "tags": [], "refs": [], "sources": [], "metrics": [], "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 in ('redshift', 'postgres') else false }}", "column_types": {"created_at": "timestamp", "updated_at": "timestamp", "processed_at": "timestamp", "cancelled_at": "timestamp", "_fivetran_synced": "timestamp", "id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}", "customer_id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}", "location_id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}", "user_id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}"}}, "created_at": 1665703194.804136, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_test`.`shopify_order_data`"}, "seed.shopify_holistic_reporting_integration_tests.shopify_order_line_refund_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": {"_fivetran_synced": "timestamp", "id": "INT64", "location_id": "INT64", "refund_id": "INT64", "order_line_id": "INT64"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test", "fqn": ["shopify_holistic_reporting_integration_tests", "shopify_order_line_refund_data"], "unique_id": "seed.shopify_holistic_reporting_integration_tests.shopify_order_line_refund_data", "package_name": "shopify_holistic_reporting_integration_tests", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests", "path": "shopify_order_line_refund_data.csv", "original_file_path": "seeds/shopify_order_line_refund_data.csv", "name": "shopify_order_line_refund_data", "alias": "shopify_order_line_refund_data", "checksum": {"name": "sha256", "checksum": "0564bef778890f3e086e4057b2536aaa6cfeceb2f9c9bd95f44d4b9f04a33dc6"}, "tags": [], "refs": [], "sources": [], "metrics": [], "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 in ('redshift', 'postgres') else false }}", "column_types": {"_fivetran_synced": "timestamp", "id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}", "location_id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}", "refund_id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}", "order_line_id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}"}}, "created_at": 1665703194.809502, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_test`.`shopify_order_line_refund_data`"}, "seed.shopify_holistic_reporting_integration_tests.shopify_order_adjustment_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": {"_fivetran_synced": "timestamp", "id": "INT64", "order_id": "INT64", "refund_id": "INT64"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test", "fqn": ["shopify_holistic_reporting_integration_tests", "shopify_order_adjustment_data"], "unique_id": "seed.shopify_holistic_reporting_integration_tests.shopify_order_adjustment_data", "package_name": "shopify_holistic_reporting_integration_tests", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests", "path": "shopify_order_adjustment_data.csv", "original_file_path": "seeds/shopify_order_adjustment_data.csv", "name": "shopify_order_adjustment_data", "alias": "shopify_order_adjustment_data", "checksum": {"name": "sha256", "checksum": "48ce96540f19450088c661fd48bd8f6d58bb4ca13a1f048880e9984be367172e"}, "tags": [], "refs": [], "sources": [], "metrics": [], "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 in ('redshift', 'postgres') else false }}", "column_types": {"id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}", "order_id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}", "refund_id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}"}}, "created_at": 1665703194.810554, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_test`.`shopify_order_adjustment_data`"}, "seed.shopify_holistic_reporting_integration_tests.shopify_product_variant_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": {"_fivetran_synced": "timestamp", "id": "INT64", "product_id": "INT64", "inventory_item_id": "INT64"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test", "fqn": ["shopify_holistic_reporting_integration_tests", "shopify_product_variant_data"], "unique_id": "seed.shopify_holistic_reporting_integration_tests.shopify_product_variant_data", "package_name": "shopify_holistic_reporting_integration_tests", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests", "path": "shopify_product_variant_data.csv", "original_file_path": "seeds/shopify_product_variant_data.csv", "name": "shopify_product_variant_data", "alias": "shopify_product_variant_data", "checksum": {"name": "sha256", "checksum": "3430f8a8a9139a753a727caa7e10ac2ac02c4e2683a37ed933566367d2f6200e"}, "tags": [], "refs": [], "sources": [], "metrics": [], "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 in ('redshift', 'postgres') else false }}", "column_types": {"id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}", "product_id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}", "inventory_item_id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}"}}, "created_at": 1665703194.811645, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_test`.`shopify_product_variant_data`"}, "seed.shopify_holistic_reporting_integration_tests.shopify_refund_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": {"_fivetran_synced": "timestamp", "id": "INT64", "order_id": "INT64", "user_id": "INT64"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test", "fqn": ["shopify_holistic_reporting_integration_tests", "shopify_refund_data"], "unique_id": "seed.shopify_holistic_reporting_integration_tests.shopify_refund_data", "package_name": "shopify_holistic_reporting_integration_tests", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests", "path": "shopify_refund_data.csv", "original_file_path": "seeds/shopify_refund_data.csv", "name": "shopify_refund_data", "alias": "shopify_refund_data", "checksum": {"name": "sha256", "checksum": "8d8bc98681d9b0d57a43af3fc99ff13cc42401d97e49bba41c1fafb28f858d23"}, "tags": [], "refs": [], "sources": [], "metrics": [], "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 in ('redshift', 'postgres') else false }}", "column_types": {"id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}", "order_id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}", "user_id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}"}}, "created_at": 1665703194.81262, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_test`.`shopify_refund_data`"}, "seed.shopify_holistic_reporting_integration_tests.shopify_transaction_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": {"_fivetran_synced": "timestamp", "id": "INT64", "order_id": "INT64", "refund_id": "INT64", "receipt": "string"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test", "fqn": ["shopify_holistic_reporting_integration_tests", "shopify_transaction_data"], "unique_id": "seed.shopify_holistic_reporting_integration_tests.shopify_transaction_data", "package_name": "shopify_holistic_reporting_integration_tests", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests", "path": "shopify_transaction_data.csv", "original_file_path": "seeds/shopify_transaction_data.csv", "name": "shopify_transaction_data", "alias": "shopify_transaction_data", "checksum": {"name": "sha256", "checksum": "def7b7fc64e42148b900dcd1f7327b470e5d3b0ed8e73f263e46a715ecb09199"}, "tags": [], "refs": [], "sources": [], "metrics": [], "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 in ('redshift', 'postgres') else false }}", "column_types": {"id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}", "order_id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}", "refund_id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}", "receipt": "{{ 'varchar(100)' if target.name in ('redshift', 'postgres') else 'string' }}"}}, "created_at": 1665703194.813594, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_test`.`shopify_transaction_data`"}, "seed.shopify_holistic_reporting_integration_tests.flow": {"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": {"_fivetran_synced": "timestamp", "trigger": "string"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test", "fqn": ["shopify_holistic_reporting_integration_tests", "flow"], "unique_id": "seed.shopify_holistic_reporting_integration_tests.flow", "package_name": "shopify_holistic_reporting_integration_tests", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests", "path": "flow.csv", "original_file_path": "seeds/flow.csv", "name": "flow", "alias": "flow", "checksum": {"name": "sha256", "checksum": "8a59e1c986a7509b15603761cb0225587bd8db8ae81ee0b146ca821be8103627"}, "tags": [], "refs": [], "sources": [], "metrics": [], "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": {"trigger": "{{ 'string' if target.type in ('bigquery', 'spark') else 'varchar' }}"}, "enabled": "{{ true if target.type != 'snowflake' else false }}"}, "created_at": 1665703194.815833, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_test`.`flow`"}, "seed.shopify_holistic_reporting_integration_tests.shopify_product_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": {"_fivetran_synced": "timestamp", "created_at": "timestamp", "updated_at": "timestamp", "published_at": "timestamp", "id": "INT64"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test", "fqn": ["shopify_holistic_reporting_integration_tests", "shopify_product_data"], "unique_id": "seed.shopify_holistic_reporting_integration_tests.shopify_product_data", "package_name": "shopify_holistic_reporting_integration_tests", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests", "path": "shopify_product_data.csv", "original_file_path": "seeds/shopify_product_data.csv", "name": "shopify_product_data", "alias": "shopify_product_data", "checksum": {"name": "sha256", "checksum": "5cc03f90512ac04a6526220040085e4e0488b62ef22e8b201424c7d7cf1bf847"}, "tags": [], "refs": [], "sources": [], "metrics": [], "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 in ('redshift', 'postgres') else false }}", "column_types": {"created_at": "timestamp", "updated_at": "timestamp", "published_at": "timestamp", "_fivetran_synced": "timestamp", "id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}"}}, "created_at": 1665703194.816853, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_test`.`shopify_product_data`"}, "seed.shopify_holistic_reporting_integration_tests.integration": {"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": {"_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test", "fqn": ["shopify_holistic_reporting_integration_tests", "integration"], "unique_id": "seed.shopify_holistic_reporting_integration_tests.integration", "package_name": "shopify_holistic_reporting_integration_tests", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests", "path": "integration.csv", "original_file_path": "seeds/integration.csv", "name": "integration", "alias": "integration", "checksum": {"name": "sha256", "checksum": "7d65e88ffe7faca2f24289441001007cc8222d5bb8f788c2807072bd7bb0b022"}, "tags": [], "refs": [], "sources": [], "metrics": [], "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 in ('redshift', 'postgres') else false }}", "column_types": {"_fivetran_synced": "timestamp"}}, "created_at": 1665703194.817846, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_test`.`integration`"}, "seed.shopify_holistic_reporting_integration_tests.metric": {"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": {"_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test", "fqn": ["shopify_holistic_reporting_integration_tests", "metric"], "unique_id": "seed.shopify_holistic_reporting_integration_tests.metric", "package_name": "shopify_holistic_reporting_integration_tests", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests", "path": "metric.csv", "original_file_path": "seeds/metric.csv", "name": "metric", "alias": "metric", "checksum": {"name": "sha256", "checksum": "155dde6f21d4cf0d8d11b898b4c1f310c2ffbe44c897aaacd5dd31a607bd447a"}, "tags": [], "refs": [], "sources": [], "metrics": [], "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 in ('redshift', 'postgres') else false }}", "column_types": {"_fivetran_synced": "timestamp"}}, "created_at": 1665703194.818774, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_test`.`metric`"}, "seed.shopify_holistic_reporting_integration_tests.person": {"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": {"_fivetran_synced": "timestamp", "phone_number": "string"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test", "fqn": ["shopify_holistic_reporting_integration_tests", "person"], "unique_id": "seed.shopify_holistic_reporting_integration_tests.person", "package_name": "shopify_holistic_reporting_integration_tests", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests", "path": "person.csv", "original_file_path": "seeds/person.csv", "name": "person", "alias": "person", "checksum": {"name": "sha256", "checksum": "6f915292a8aba951a356baacc8e65fac88b0a28e98d6cff84f708aeaf68d9ceb"}, "tags": [], "refs": [], "sources": [], "metrics": [], "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 in ('redshift', 'postgres') else false }}", "column_types": {"phone_number": "{{ 'string' if target.type in ('bigquery', 'spark') else 'varchar' }}"}}, "created_at": 1665703194.819842, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_test`.`person`"}, "seed.shopify_holistic_reporting_integration_tests.event": {"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": {"_fivetran_synced": "timestamp", "flow_id": "string", "campaign_id": "string"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test", "fqn": ["shopify_holistic_reporting_integration_tests", "event"], "unique_id": "seed.shopify_holistic_reporting_integration_tests.event", "package_name": "shopify_holistic_reporting_integration_tests", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests", "path": "event.csv", "original_file_path": "seeds/event.csv", "name": "event", "alias": "event", "checksum": {"name": "sha256", "checksum": "fb7883912895ceb24123ecd1e37c8cd3d8e837493d1ed2007fd64daf45a8581c"}, "tags": [], "refs": [], "sources": [], "metrics": [], "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 in ('redshift', 'postgres') else false }}", "column_types": {"flow_id": "{{ 'string' if target.type in ('bigquery', 'spark') else 'varchar' }}", "campaign_id": "{{ 'string' if target.type in ('bigquery', 'spark') else 'varchar' }}"}}, "created_at": 1665703194.820801, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_test`.`event`"}, "seed.shopify_holistic_reporting_integration_tests.shopify_customer_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": {"_fivetran_synced": "timestamp", "created_at": "timestamp", "updated_at": "timestamp", "id": "INT64", "default_address_id": "INT64"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test", "fqn": ["shopify_holistic_reporting_integration_tests", "shopify_customer_data"], "unique_id": "seed.shopify_holistic_reporting_integration_tests.shopify_customer_data", "package_name": "shopify_holistic_reporting_integration_tests", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests", "path": "shopify_customer_data.csv", "original_file_path": "seeds/shopify_customer_data.csv", "name": "shopify_customer_data", "alias": "shopify_customer_data", "checksum": {"name": "sha256", "checksum": "79bc0a5972c321cefe2973acdd443ce1d42e36b3b23b2298151046d23bdf4bea"}, "tags": [], "refs": [], "sources": [], "metrics": [], "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 in ('redshift', 'postgres') else false }}", "column_types": {"created_at": "timestamp", "updated_at": "timestamp", "_fivetran_synced": "timestamp", "id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}", "default_address_id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}"}}, "created_at": 1665703194.821768, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_test`.`shopify_customer_data`"}, "seed.shopify_holistic_reporting_integration_tests.shopify_order_line_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": {"_fivetran_synced": "timestamp", "order_id": "INT64", "id": "INT64", "product_id": "INT64", "variant_id": "INT64"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test", "fqn": ["shopify_holistic_reporting_integration_tests", "shopify_order_line_data"], "unique_id": "seed.shopify_holistic_reporting_integration_tests.shopify_order_line_data", "package_name": "shopify_holistic_reporting_integration_tests", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests", "path": "shopify_order_line_data.csv", "original_file_path": "seeds/shopify_order_line_data.csv", "name": "shopify_order_line_data", "alias": "shopify_order_line_data", "checksum": {"name": "sha256", "checksum": "cabaa49c9bd299b34eb2154893a6dd399fbbad7e4ad7036293c8b4cb599199e0"}, "tags": [], "refs": [], "sources": [], "metrics": [], "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 in ('redshift', 'postgres') else false }}", "column_types": {"_fivetran_synced": "timestamp", "order_id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}", "id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}", "product_id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}", "variant_id": "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}"}}, "created_at": 1665703194.822731, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_test`.`shopify_order_line_data`"}, "seed.shopify_holistic_reporting_integration_tests.campaign": {"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": {"_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test", "fqn": ["shopify_holistic_reporting_integration_tests", "campaign"], "unique_id": "seed.shopify_holistic_reporting_integration_tests.campaign", "package_name": "shopify_holistic_reporting_integration_tests", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests", "path": "campaign.csv", "original_file_path": "seeds/campaign.csv", "name": "campaign", "alias": "campaign", "checksum": {"name": "sha256", "checksum": "e80312165b7d9198633569c5c50aaaf7e73df74dff2d46600adca3fef4b8dd43"}, "tags": [], "refs": [], "sources": [], "metrics": [], "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 in ('redshift', 'postgres') else false }}", "column_types": {"_fivetran_synced": "timestamp"}}, "created_at": 1665703194.82379, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_test`.`campaign`"}, "model.shopify_source.stg_shopify__order_line": {"raw_sql": "with source as (\n\n select * from {{ ref('stg_shopify__order_line_tmp') }}\n\n),\n\nrenamed as (\n\n select\n \n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_shopify__order_line_tmp')),\n staging_columns=get_order_line_columns()\n )\n }}\n\n --The below script allows for pass through columns.\n {% if var('order_line_pass_through_columns') %}\n ,\n {{ var('order_line_pass_through_columns') | join (\", \")}}\n\n {% endif %}\n\n {{ fivetran_utils.source_relation(\n union_schema_variable='shopify_union_schemas', \n union_database_variable='shopify_union_databases') \n }}\n\n from source\n\n)\n\nselect * from renamed", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.shopify_source.get_order_line_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.source_relation"], "nodes": ["model.shopify_source.stg_shopify__order_line_tmp", "model.shopify_source.stg_shopify__order_line_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test_stg_shopify", "fqn": ["shopify_source", "stg_shopify__order_line"], "unique_id": "model.shopify_source.stg_shopify__order_line", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "stg_shopify__order_line.sql", "original_file_path": "models/stg_shopify__order_line.sql", "name": "stg_shopify__order_line", "alias": "stg_shopify__order_line", "checksum": {"name": "sha256", "checksum": "bb641f0d784534dc9d6d86bda3391b7c905b0a739c6cf34ef60e4716b5fd86ce"}, "tags": [], "refs": [["stg_shopify__order_line_tmp"], ["stg_shopify__order_line_tmp"]], "sources": [], "metrics": [], "description": "Each record represents a line item from an order in Shopify.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "fulfillable_quantity": {"name": "fulfillable_quantity", "description": "The amount available to fulfill, calculated as follows: quantity - max(refunded_quantity, fulfilled_quantity) - pending_fulfilled_quantity - open_fulfilled_quantity", "meta": {}, "data_type": null, "quote": null, "tags": []}, "fulfillment_service": {"name": "fulfillment_service", "description": "The service provider that's fulfilling the item.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "fulfillment_status": {"name": "fulfillment_status", "description": "How far along an order is in terms line items fulfilled.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_gift_card": {"name": "is_gift_card", "description": "Whether the item is a gift card. If true, then the item is not taxed or considered for shipping charges.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "grams": {"name": "grams", "description": "The weight of the item in grams.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_line_id": {"name": "order_line_id", "description": "The ID of the line item.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "name": {"name": "name", "description": "The name of the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_id": {"name": "order_id", "description": "The ID of the related order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "price": {"name": "price", "description": "The price of the item before discounts have been applied in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "product_id": {"name": "product_id", "description": "The ID of the product that the line item belongs to. Can be null if the original product associated with the order is deleted at a later date.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "quantity": {"name": "quantity", "description": "The number of items that were purchased.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_requiring_shipping": {"name": "is_requiring_shipping", "description": "Whether the item requires shipping.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "sku": {"name": "sku", "description": "The item's SKU (stock keeping unit).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_taxable": {"name": "is_taxable", "description": "Whether the item was taxable.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "title": {"name": "title", "description": "The title of the product.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_discount": {"name": "total_discount", "description": "The total amount of the discount allocated to the line item in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_id": {"name": "variant_id", "description": "The ID of the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "vendor": {"name": "vendor", "description": "The name of the item's supplier.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify_source://models/stg_shopify.yml", "compiled_path": "target/compiled/shopify_source/models/stg_shopify__order_line.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify", "materialized": "table"}, "created_at": 1665703195.322504, "compiled_sql": "with source as (\n\n select * from `dbt-package-testing`.`dbt_test_stg_shopify`.`stg_shopify__order_line_tmp`\n\n),\n\nrenamed as (\n\n select\n \n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n fulfillable_quantity\n \n as \n \n fulfillable_quantity\n \n, \n \n \n fulfillment_service\n \n as \n \n fulfillment_service\n \n, \n \n \n fulfillment_status\n \n as \n \n fulfillment_status\n \n, \n \n \n gift_card\n \n as is_gift_card , \n \n \n grams\n \n as \n \n grams\n \n, \n \n \n id\n \n as order_line_id , \n \n \n index\n \n as \n \n index\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n order_id\n \n as \n \n order_id\n \n, \n \n \n pre_tax_price\n \n as \n \n pre_tax_price\n \n, \n \n \n price\n \n as \n \n price\n \n, \n \n \n product_id\n \n as \n \n product_id\n \n, \n cast(null as \n numeric\n) as \n \n property_charge_interval_frequency\n \n , \n cast(null as \n string\n) as \n \n property_for_shipping_jan_3_rd_2020\n \n , \n cast(null as \n numeric\n) as \n \n property_shipping_interval_frequency\n \n , \n cast(null as \n string\n) as \n \n property_shipping_interval_unit_type\n \n , \n cast(null as \n numeric\n) as \n \n property_subscription_id\n \n , \n \n \n quantity\n \n as \n \n quantity\n \n, \n \n \n requires_shipping\n \n as is_requiring_shipping , \n \n \n sku\n \n as \n \n sku\n \n, \n \n \n taxable\n \n as is_taxable , \n \n \n title\n \n as \n \n title\n \n, \n \n \n total_discount\n \n as \n \n total_discount\n \n, \n \n \n variant_id\n \n as \n \n variant_id\n \n, \n \n \n vendor\n \n as \n \n vendor\n \n\n\n\n\n --The below script allows for pass through columns.\n \n\n \n\n\n, cast('' as \n string\n) as source_relation\n\n\n\n\n from source\n\n)\n\nselect * from renamed", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_test_stg_shopify`.`stg_shopify__order_line`"}, "model.shopify_source.stg_shopify__refund": {"raw_sql": "--To disable this model, set the shopify__using_refund variable within your dbt_project.yml file to False.\n{{ config(enabled=var('shopify__using_refund', True)) }}\n\nwith source as (\n\n select * \n from {{ ref('stg_shopify__refund_tmp') }}\n\n),\n\nrenamed as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_shopify__refund_tmp')),\n staging_columns=get_refund_columns()\n )\n }}\n\n {{ fivetran_utils.source_relation(\n union_schema_variable='shopify_union_schemas', \n union_database_variable='shopify_union_databases') \n }}\n \n from source\n)\n\nselect * from renamed", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.shopify_source.get_refund_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.source_relation"], "nodes": ["model.shopify_source.stg_shopify__refund_tmp", "model.shopify_source.stg_shopify__refund_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test_stg_shopify", "fqn": ["shopify_source", "stg_shopify__refund"], "unique_id": "model.shopify_source.stg_shopify__refund", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "stg_shopify__refund.sql", "original_file_path": "models/stg_shopify__refund.sql", "name": "stg_shopify__refund", "alias": "stg_shopify__refund", "checksum": {"name": "sha256", "checksum": "db92848ca19e65385f44b51e662bc9a3c773fecefe896cbddd1f23d22d078e82"}, "tags": [], "refs": [["stg_shopify__refund_tmp"], ["stg_shopify__refund_tmp"]], "sources": [], "metrics": [], "description": "Each record represents a refund within Shopify.", "columns": {"refund_id": {"name": "refund_id", "description": "The unique numeric identifier for the refund.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "Timestamp of the date when the refund was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "processed_at": {"name": "processed_at", "description": "Timestamp of the date when the refund was processed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "note": {"name": "note", "description": "User generated note attached to the refund.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "restock": {"name": "restock", "description": "Boolean indicating if the refund is a result of a restock.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "user_id": {"name": "user_id", "description": "Reference to the user id which generated the refund.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_duties_set": {"name": "total_duties_set", "description": "Record representing total duties set for the refund.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_id": {"name": "order_id", "description": "Reference to the order which the refund is associated.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify_source://models/stg_shopify.yml", "compiled_path": "target/compiled/shopify_source/models/stg_shopify__refund.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify", "materialized": "table", "enabled": true}, "created_at": 1665703195.3425841, "compiled_sql": "--To disable this model, set the shopify__using_refund variable within your dbt_project.yml file to False.\n\n\nwith source as (\n\n select * \n from `dbt-package-testing`.`dbt_test_stg_shopify`.`stg_shopify__refund_tmp`\n\n),\n\nrenamed as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n created_at\n \n as \n \n created_at\n \n, \n \n \n id\n \n as refund_id , \n \n \n note\n \n as \n \n note\n \n, \n \n \n order_id\n \n as \n \n order_id\n \n, \n \n \n processed_at\n \n as \n \n processed_at\n \n, \n \n \n restock\n \n as \n \n restock\n \n, \n \n \n user_id\n \n as \n \n user_id\n \n\n\n\n\n \n\n\n, cast('' as \n string\n) as source_relation\n\n\n\n \n from source\n)\n\nselect * from renamed", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_test_stg_shopify`.`stg_shopify__refund`"}, "model.shopify_source.stg_shopify__product": {"raw_sql": "with source as (\n\n select * from {{ ref('stg_shopify__product_tmp') }}\n\n),\n\nrenamed as (\n\n select\n \n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_shopify__product_tmp')),\n staging_columns=get_product_columns()\n )\n }}\n\n --The below script allows for pass through columns.\n {% if var('product_pass_through_columns') %}\n ,\n {{ var('product_pass_through_columns') | join (\", \")}}\n\n {% endif %}\n\n {{ fivetran_utils.source_relation(\n union_schema_variable='shopify_union_schemas', \n union_database_variable='shopify_union_databases') \n }}\n\n from source\n\n)\n\nselect * from renamed", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.shopify_source.get_product_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.source_relation"], "nodes": ["model.shopify_source.stg_shopify__product_tmp", "model.shopify_source.stg_shopify__product_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test_stg_shopify", "fqn": ["shopify_source", "stg_shopify__product"], "unique_id": "model.shopify_source.stg_shopify__product", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "stg_shopify__product.sql", "original_file_path": "models/stg_shopify__product.sql", "name": "stg_shopify__product", "alias": "stg_shopify__product", "checksum": {"name": "sha256", "checksum": "dd30ab5bbf28fc246f4d4625c8057bd05f59c9e8f115d8c72f301b22236b59eb"}, "tags": [], "refs": [["stg_shopify__product_tmp"], ["stg_shopify__product_tmp"]], "sources": [], "metrics": [], "description": "Each record represents a product in Shopify.", "columns": {"_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Whether the record has been deleted in the source system.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_timestamp": {"name": "created_timestamp", "description": "The date and time when the product was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "handle": {"name": "handle", "description": "A unique human-friendly string for the product. Automatically generated from the product's title.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "product_id": {"name": "product_id", "description": "An unsigned 64-bit integer that's used as a unique identifier for the product. Each id is unique across the Shopify system. No two products will have the same id, even if they're from different shops.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "product_type": {"name": "product_type", "description": "A categorization for the product used for filtering and searching products.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "published_timestamp": {"name": "published_timestamp", "description": "The date and time (ISO 8601 format) when the product was published. Can be set to null to unpublish the product from the Online Store channel.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "published_scope": {"name": "published_scope", "description": "Whether the product is published to the Point of Sale channel.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "title": {"name": "title", "description": "The name of the product.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_timestamp": {"name": "updated_timestamp", "description": "The date and time when the product was last modified.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "vendor": {"name": "vendor", "description": "The name of the product's vendor.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify_source://models/stg_shopify.yml", "compiled_path": "target/compiled/shopify_source/models/stg_shopify__product.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify", "materialized": "table"}, "created_at": 1665703195.333279, "compiled_sql": "with source as (\n\n select * from `dbt-package-testing`.`dbt_test_stg_shopify`.`stg_shopify__product_tmp`\n\n),\n\nrenamed as (\n\n select\n \n \n \n \n _fivetran_deleted\n \n as \n \n _fivetran_deleted\n \n, \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n created_at\n \n as created_timestamp , \n \n \n handle\n \n as \n \n handle\n \n, \n \n \n id\n \n as product_id , \n \n \n product_type\n \n as \n \n product_type\n \n, \n \n \n published_at\n \n as published_timestamp , \n \n \n published_scope\n \n as \n \n published_scope\n \n, \n \n \n title\n \n as \n \n title\n \n, \n \n \n updated_at\n \n as updated_timestamp , \n \n \n vendor\n \n as \n \n vendor\n \n\n\n\n\n --The below script allows for pass through columns.\n \n\n \n\n\n, cast('' as \n string\n) as source_relation\n\n\n\n\n from source\n\n)\n\nselect * from renamed", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_test_stg_shopify`.`stg_shopify__product`"}, "model.shopify_source.stg_shopify__product_variant": {"raw_sql": "with source as (\n\n select * from {{ ref('stg_shopify__product_variant_tmp') }}\n\n),\n\nrenamed as (\n\n select\n \n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_shopify__product_variant_tmp')),\n staging_columns=get_product_variant_columns()\n )\n }}\n\n --The below script allows for pass through columns.\n {% if var('product_variant_pass_through_columns') %}\n ,\n {{ var('product_variant_pass_through_columns') | join (\", \")}}\n\n {% endif %}\n\n {{ fivetran_utils.source_relation(\n union_schema_variable='shopify_union_schemas', \n union_database_variable='shopify_union_databases') \n }}\n\n from source\n\n)\n\nselect * from renamed", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.shopify_source.get_product_variant_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.source_relation"], "nodes": ["model.shopify_source.stg_shopify__product_variant_tmp", "model.shopify_source.stg_shopify__product_variant_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test_stg_shopify", "fqn": ["shopify_source", "stg_shopify__product_variant"], "unique_id": "model.shopify_source.stg_shopify__product_variant", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "stg_shopify__product_variant.sql", "original_file_path": "models/stg_shopify__product_variant.sql", "name": "stg_shopify__product_variant", "alias": "stg_shopify__product_variant", "checksum": {"name": "sha256", "checksum": "6d09962a9153df0f1b3220ecfe3ecd87997d5e5b87187a985a7c25006ca8b229"}, "tags": [], "refs": [["stg_shopify__product_variant_tmp"], ["stg_shopify__product_variant_tmp"]], "sources": [], "metrics": [], "description": "Each record represents a product variant in Shopify", "columns": {"barcode": {"name": "barcode", "description": "The barcode, UPC, or ISBN number for the product.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "compare_at_price": {"name": "compare_at_price", "description": "The original price of the item before an adjustment or a sale.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_timestamp": {"name": "created_timestamp", "description": "The date and time (ISO 8601 format) when the product variant was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "fulfillment_service": {"name": "fulfillment_service", "description": "The fulfillment service associated with the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "grams": {"name": "grams", "description": "The weight of the product variant in grams.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_id": {"name": "variant_id", "description": "The unique numeric identifier for the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "image_id": {"name": "image_id", "description": "The unique numeric identifier for a product's image. The image must be associated to the same product as the variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "inventory_item_id": {"name": "inventory_item_id", "description": "The unique identifier for the inventory item, which is used in the Inventory API to query for inventory information.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "inventory_management": {"name": "inventory_management", "description": "The fulfillment service that tracks the number of items in stock for the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "inventory_policy": {"name": "inventory_policy", "description": "Whether customers are allowed to place an order for the product variant when it's out of stock.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "inventory_quantity": {"name": "inventory_quantity", "description": "An aggregate of inventory across all locations. To adjust inventory at a specific location, use the InventoryLevel resource.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "old_inventory_quantity": {"name": "old_inventory_quantity", "description": "This property is deprecated. Use the InventoryLevel resource instead.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "option_1": {"name": "option_1", "description": "The custom properties that a shop owner uses to define product variants. You can define three options for a product variant: option1, option2, option3.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "option_2": {"name": "option_2", "description": "The custom properties that a shop owner uses to define product variants. You can define three options for a product variant: option1, option2, option3.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "option_3": {"name": "option_3", "description": "The custom properties that a shop owner uses to define product variants. You can define three options for a product variant: option1, option2, option3.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "position": {"name": "position", "description": "The order of the product variant in the list of product variants. The first position in the list is 1. The position of variants is indicated by the order in which they are listed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "price": {"name": "price", "description": "The price of the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "product_id": {"name": "product_id", "description": "The unique numeric identifier for the product.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_requiring_shipping": {"name": "is_requiring_shipping", "description": "This property is deprecated. Use the `requires_shipping` property on the InventoryItem resource instead.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "sku": {"name": "sku", "description": "A unique identifier for the product variant in the shop. Required in order to connect to a FulfillmentService.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_taxable": {"name": "is_taxable", "description": "Whether a tax is charged when the product variant is sold.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tax_code": {"name": "tax_code", "description": "This parameter applies only to the stores that have the Avalara AvaTax app installed. Specifies the Avalara tax code for the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "title": {"name": "title", "description": "The title of the product variant. The title field is a concatenation of the option1, option2, and option3 fields. You can only update title indirectly using the option fields.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_timestamp": {"name": "updated_timestamp", "description": "The date and time when the product variant was last modified. Gets returned in ISO 8601 format.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "weight": {"name": "weight", "description": "The weight of the product variant in the unit system specified with weight_unit.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "weight_unit": {"name": "weight_unit", "description": "The unit of measurement that applies to the product variant's weight. If you don't specify a value for weight_unit, then the shop's default unit of measurement is applied. Valid values: g, kg, oz, and lb.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify_source://models/stg_shopify.yml", "compiled_path": "target/compiled/shopify_source/models/stg_shopify__product_variant.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify", "materialized": "table"}, "created_at": 1665703195.336997, "compiled_sql": "with source as (\n\n select * from `dbt-package-testing`.`dbt_test_stg_shopify`.`stg_shopify__product_variant_tmp`\n\n),\n\nrenamed as (\n\n select\n \n \n \n \n id\n \n as variant_id , \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n created_at\n \n as created_timestamp , \n \n \n updated_at\n \n as updated_timestamp , \n \n \n product_id\n \n as \n \n product_id\n \n, \n \n \n inventory_item_id\n \n as \n \n inventory_item_id\n \n, \n \n \n image_id\n \n as \n \n image_id\n \n, \n \n \n title\n \n as \n \n title\n \n, \n \n \n price\n \n as \n \n price\n \n, \n \n \n sku\n \n as \n \n sku\n \n, \n \n \n position\n \n as \n \n position\n \n, \n \n \n inventory_policy\n \n as \n \n inventory_policy\n \n, \n \n \n compare_at_price\n \n as \n \n compare_at_price\n \n, \n \n \n fulfillment_service\n \n as \n \n fulfillment_service\n \n, \n \n \n inventory_management\n \n as \n \n inventory_management\n \n, \n \n \n taxable\n \n as is_taxable , \n \n \n barcode\n \n as \n \n barcode\n \n, \n \n \n grams\n \n as \n \n grams\n \n, \n \n \n inventory_quantity\n \n as \n \n inventory_quantity\n \n, \n \n \n weight\n \n as \n \n weight\n \n, \n \n \n weight_unit\n \n as \n \n weight_unit\n \n, \n \n \n option_1\n \n as \n \n option_1\n \n, \n \n \n option_2\n \n as \n \n option_2\n \n, \n \n \n option_3\n \n as \n \n option_3\n \n, \n \n \n tax_code\n \n as \n \n tax_code\n \n, \n \n \n old_inventory_quantity\n \n as \n \n old_inventory_quantity\n \n, \n \n \n requires_shipping\n \n as is_requiring_shipping \n\n\n\n --The below script allows for pass through columns.\n \n\n \n\n\n, cast('' as \n string\n) as source_relation\n\n\n\n\n from source\n\n)\n\nselect * from renamed", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_test_stg_shopify`.`stg_shopify__product_variant`"}, "model.shopify_source.stg_shopify__order": {"raw_sql": "with source as (\n\n select * from {{ ref('stg_shopify__order_tmp') }}\n\n),\n\nrenamed as (\n\n select\n \n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_shopify__order_tmp')),\n staging_columns=get_order_columns()\n )\n }}\n\n --The below script allows for pass through columns.\n {% if var('order_pass_through_columns') %}\n ,\n {{ var('order_pass_through_columns') | join (\", \")}}\n\n {% endif %}\n\n {{ fivetran_utils.source_relation(\n union_schema_variable='shopify_union_schemas', \n union_database_variable='shopify_union_databases') \n }}\n\n from source\n\n)\n\nselect * from renamed", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.shopify_source.get_order_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.source_relation"], "nodes": ["model.shopify_source.stg_shopify__order_tmp", "model.shopify_source.stg_shopify__order_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test_stg_shopify", "fqn": ["shopify_source", "stg_shopify__order"], "unique_id": "model.shopify_source.stg_shopify__order", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "stg_shopify__order.sql", "original_file_path": "models/stg_shopify__order.sql", "name": "stg_shopify__order", "alias": "stg_shopify__order", "checksum": {"name": "sha256", "checksum": "a4b7cdee44f261fe11e487f1022c1f7bd57196220a453bff382c1876ee5a2192"}, "tags": [], "refs": [["stg_shopify__order_tmp"], ["stg_shopify__order_tmp"]], "sources": [], "metrics": [], "description": "Each record represents an order in Shopify.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "app_id": {"name": "app_id", "description": "The ID of the app that created the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_address_1": {"name": "billing_address_address_1", "description": "The street address of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_address_2": {"name": "billing_address_address_2", "description": "An optional additional field for the street address of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_city": {"name": "billing_address_city", "description": "The city, town, or village of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_company": {"name": "billing_address_company", "description": "The company of the person associated with the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_country": {"name": "billing_address_country", "description": "The name of the country of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_country_code": {"name": "billing_address_country_code", "description": "The two-letter code (ISO 3166-1 format) for the country of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_first_name": {"name": "billing_address_first_name", "description": "The first name of the person associated with the payment method.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_last_name": {"name": "billing_address_last_name", "description": "The last name of the person associated with the payment method.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_latitude": {"name": "billing_address_latitude", "description": "The latitude of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_longitude": {"name": "billing_address_longitude", "description": "The longitude of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_name": {"name": "billing_address_name", "description": "The full name of the person associated with the payment method.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_phone": {"name": "billing_address_phone", "description": "The phone number at the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_province": {"name": "billing_address_province", "description": "The name of the region (province, state, prefecture, \u2026) of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_province_code": {"name": "billing_address_province_code", "description": "The two-letter abbreviation of the region of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_zip": {"name": "billing_address_zip", "description": "The postal code (zip, postcode, Eircode, \u2026) of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "browser_ip": {"name": "browser_ip", "description": "The IP address of the browser used by the customer when they placed the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "has_buyer_accepted_marketing": {"name": "has_buyer_accepted_marketing", "description": "Whether the customer consented to receive email updates from the shop.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "cancel_reason": {"name": "cancel_reason", "description": "The reason why the order was canceled.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "cancelled_timestamp": {"name": "cancelled_timestamp", "description": "The date and time when the order was canceled.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "cart_token": {"name": "cart_token", "description": "The ID of the cart that's associated with the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "closed_timestamp": {"name": "closed_timestamp", "description": "The date and time when the order was closed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_timestamp": {"name": "created_timestamp", "description": "The autogenerated date and time when the order was created in Shopify.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "The three-letter code for the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "customer_id": {"name": "customer_id", "description": "The ID of the order's customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email": {"name": "email", "description": "The customer's email address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "financial_status": {"name": "financial_status", "description": "The status of payments associated with the order. Can only be set when the order is created", "meta": {}, "data_type": null, "quote": null, "tags": []}, "fulfillment_status": {"name": "fulfillment_status", "description": "The order's status in terms of fulfilled line items.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_id": {"name": "order_id", "description": "The ID of the order, used for API purposes. This is different from the order_number property, which is the ID used by the shop owner and customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "landing_site_base_url": {"name": "landing_site_base_url", "description": "The URL for the page where the buyer landed when they entered the shop.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "location_id": {"name": "location_id", "description": "The ID of the physical location where the order was processed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "name": {"name": "name", "description": "The order name, generated by combining the order_number property with the order prefix and suffix that are set in the merchant's general settings.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "note": {"name": "note", "description": "An optional note that a shop owner can attach to the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "number": {"name": "number", "description": "The order's position in the shop's count of orders. Numbers are sequential and start at 1.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_number": {"name": "order_number", "description": "The order 's position in the shop's count of orders starting at 1001. Order numbers are sequential and start at 1001.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "processed_timestamp": {"name": "processed_timestamp", "description": "The date and time when an order was processed. This value is the date that appears on your orders and that's used in the analytic reports.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "processing_method": {"name": "processing_method", "description": "How the payment was processed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "referring_site": {"name": "referring_site", "description": "The website where the customer clicked a link to the shop.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_address_1": {"name": "shipping_address_address_1", "description": "The street address of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_address_2": {"name": "shipping_address_address_2", "description": "An optional additional field for the street address of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_city": {"name": "shipping_address_city", "description": "The city, town, or village of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_company": {"name": "shipping_address_company", "description": "The company of the person associated with the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_country": {"name": "shipping_address_country", "description": "The name of the country of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_country_code": {"name": "shipping_address_country_code", "description": "The two-letter code (ISO 3166-1 format) for the country of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_first_name": {"name": "shipping_address_first_name", "description": "The first name of the person associated with the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_last_name": {"name": "shipping_address_last_name", "description": "The last name of the person associated with the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_latitude": {"name": "shipping_address_latitude", "description": "The latitude of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_longitude": {"name": "shipping_address_longitude", "description": "The longitude of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_name": {"name": "shipping_address_name", "description": "The full name of the person associated with the payment method.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_phone": {"name": "shipping_address_phone", "description": "The phone number at the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_province": {"name": "shipping_address_province", "description": "The name of the region (province, state, prefecture, \u2026) of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_province_code": {"name": "shipping_address_province_code", "description": "The two-letter abbreviation of the region of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_zip": {"name": "shipping_address_zip", "description": "The postal code (zip, postcode, Eircode, \u2026) of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_name": {"name": "source_name", "description": "Where the order originated. Can be set only during order creation, and is not writeable afterwards.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "subtotal_price": {"name": "subtotal_price", "description": "The price of the order in the shop currency after discounts but before shipping, taxes, and tips.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "has_taxes_included": {"name": "has_taxes_included", "description": "Whether taxes are included in the order subtotal.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_test_order": {"name": "is_test_order", "description": "Whether this is a test order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "token": {"name": "token", "description": "A unique token for the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_discounts": {"name": "total_discounts", "description": "The total discounts applied to the price of the order in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_line_items_price": {"name": "total_line_items_price", "description": "The sum of all line item prices in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_price": {"name": "total_price", "description": "The sum of all line item prices, discounts, shipping, taxes, and tips in the shop currency. Must be positive.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_tax": {"name": "total_tax", "description": "The sum of all the taxes applied to the order in th shop currency. Must be positive).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_weight": {"name": "total_weight", "description": "The sum of all line item weights in grams.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_timestamp": {"name": "updated_timestamp", "description": "The date and time (ISO 8601 format) when the order was last modified.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "user_id": {"name": "user_id", "description": "The ID of the user logged into Shopify POS who processed the order, if applicable.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_shipping_price_set": {"name": "total_shipping_price_set", "description": "The total shipping price set for the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "index": {"name": "index", "description": "The index associated with the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "pre_tax_price": {"name": "pre_tax_price", "description": "The total pre tax price of the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify_source://models/stg_shopify.yml", "compiled_path": "target/compiled/shopify_source/models/stg_shopify__order.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify", "materialized": "table"}, "created_at": 1665703195.33163, "compiled_sql": "with source as (\n\n select * from `dbt-package-testing`.`dbt_test_stg_shopify`.`stg_shopify__order_tmp`\n\n),\n\nrenamed as (\n\n select\n \n \n \n \n id\n \n as order_id , \n \n \n processed_at\n \n as processed_timestamp , \n \n \n updated_at\n \n as updated_timestamp , \n \n \n user_id\n \n as \n \n user_id\n \n, \n \n \n total_discounts\n \n as \n \n total_discounts\n \n, \n \n \n total_line_items_price\n \n as \n \n total_line_items_price\n \n, \n \n \n total_price\n \n as \n \n total_price\n \n, \n \n \n total_tax\n \n as \n \n total_tax\n \n, \n \n \n source_name\n \n as \n \n source_name\n \n, \n \n \n subtotal_price\n \n as \n \n subtotal_price\n \n, \n \n \n taxes_included\n \n as has_taxes_included , \n \n \n total_weight\n \n as \n \n total_weight\n \n, \n \n \n landing_site_base_url\n \n as \n \n landing_site_base_url\n \n, \n \n \n location_id\n \n as \n \n location_id\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n note\n \n as \n \n note\n \n, \n \n \n number\n \n as \n \n number\n \n, \n \n \n order_number\n \n as \n \n order_number\n \n, \n \n \n cancel_reason\n \n as \n \n cancel_reason\n \n, \n \n \n cancelled_at\n \n as cancelled_timestamp , \n \n \n cart_token\n \n as \n \n cart_token\n \n, \n \n \n checkout_token\n \n as \n \n checkout_token\n \n, \n \n \n closed_at\n \n as closed_timestamp , \n \n \n created_at\n \n as created_timestamp , \n \n \n currency\n \n as \n \n currency\n \n, \n \n \n customer_id\n \n as \n \n customer_id\n \n, \n \n \n email\n \n as \n \n email\n \n, \n \n \n financial_status\n \n as \n \n financial_status\n \n, \n \n \n fulfillment_status\n \n as \n \n fulfillment_status\n \n, \n \n \n processing_method\n \n as \n \n processing_method\n \n, \n \n \n referring_site\n \n as \n \n referring_site\n \n, \n \n \n billing_address_address_1\n \n as \n \n billing_address_address_1\n \n, \n \n \n billing_address_address_2\n \n as \n \n billing_address_address_2\n \n, \n \n \n billing_address_city\n \n as \n \n billing_address_city\n \n, \n \n \n billing_address_company\n \n as \n \n billing_address_company\n \n, \n \n \n billing_address_country\n \n as \n \n billing_address_country\n \n, \n \n \n billing_address_country_code\n \n as \n \n billing_address_country_code\n \n, \n \n \n billing_address_first_name\n \n as \n \n billing_address_first_name\n \n, \n \n \n billing_address_last_name\n \n as \n \n billing_address_last_name\n \n, \n \n \n billing_address_latitude\n \n as \n \n billing_address_latitude\n \n, \n \n \n billing_address_longitude\n \n as \n \n billing_address_longitude\n \n, \n \n \n billing_address_name\n \n as \n \n billing_address_name\n \n, \n \n \n billing_address_phone\n \n as \n \n billing_address_phone\n \n, \n \n \n billing_address_province\n \n as \n \n billing_address_province\n \n, \n \n \n billing_address_province_code\n \n as \n \n billing_address_province_code\n \n, \n \n \n billing_address_zip\n \n as \n \n billing_address_zip\n \n, \n \n \n browser_ip\n \n as \n \n browser_ip\n \n, \n \n \n buyer_accepts_marketing\n \n as has_buyer_accepted_marketing , \n cast(null as \n string\n) as \n \n total_shipping_price_set\n \n , \n \n \n shipping_address_address_1\n \n as \n \n shipping_address_address_1\n \n, \n \n \n shipping_address_address_2\n \n as \n \n shipping_address_address_2\n \n, \n \n \n shipping_address_city\n \n as \n \n shipping_address_city\n \n, \n \n \n shipping_address_company\n \n as \n \n shipping_address_company\n \n, \n \n \n shipping_address_country\n \n as \n \n shipping_address_country\n \n, \n \n \n shipping_address_country_code\n \n as \n \n shipping_address_country_code\n \n, \n \n \n shipping_address_first_name\n \n as \n \n shipping_address_first_name\n \n, \n \n \n shipping_address_last_name\n \n as \n \n shipping_address_last_name\n \n, \n \n \n shipping_address_latitude\n \n as \n \n shipping_address_latitude\n \n, \n \n \n shipping_address_longitude\n \n as \n \n shipping_address_longitude\n \n, \n \n \n shipping_address_name\n \n as \n \n shipping_address_name\n \n, \n \n \n shipping_address_phone\n \n as \n \n shipping_address_phone\n \n, \n \n \n shipping_address_province\n \n as \n \n shipping_address_province\n \n, \n \n \n shipping_address_province_code\n \n as \n \n shipping_address_province_code\n \n, \n \n \n shipping_address_zip\n \n as \n \n shipping_address_zip\n \n, \n \n \n test\n \n as is_test_order , \n \n \n token\n \n as \n \n token\n \n, \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n\n\n\n\n --The below script allows for pass through columns.\n \n\n \n\n\n, cast('' as \n string\n) as source_relation\n\n\n\n\n from source\n\n)\n\nselect * from renamed", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_test_stg_shopify`.`stg_shopify__order`"}, "model.shopify_source.stg_shopify__transaction": {"raw_sql": "with source as (\n\n select * from {{ ref('stg_shopify__transaction_tmp') }}\n\n),\n\nrenamed as (\n\n select\n\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_shopify__transaction_tmp')),\n staging_columns=get_transaction_columns()\n )\n }}\n\n --The below script allows for pass through columns.\n {% if var('transaction_pass_through_columns') %}\n ,\n {{ var('transaction_pass_through_columns') | join (\", \")}}\n\n {% endif %}\n\n {{ fivetran_utils.source_relation(\n union_schema_variable='shopify_union_schemas', \n union_database_variable='shopify_union_databases') \n }}\n\n from source\n where not test\n\n)\n\nselect * from renamed", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.shopify_source.get_transaction_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.source_relation"], "nodes": ["model.shopify_source.stg_shopify__transaction_tmp", "model.shopify_source.stg_shopify__transaction_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test_stg_shopify", "fqn": ["shopify_source", "stg_shopify__transaction"], "unique_id": "model.shopify_source.stg_shopify__transaction", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "stg_shopify__transaction.sql", "original_file_path": "models/stg_shopify__transaction.sql", "name": "stg_shopify__transaction", "alias": "stg_shopify__transaction", "checksum": {"name": "sha256", "checksum": "b837eb0c1661d2817ccb6a1c3123e7d146dbbd9a63ea1fe0ad52ba8a1742ecbe"}, "tags": [], "refs": [["stg_shopify__transaction_tmp"], ["stg_shopify__transaction_tmp"]], "sources": [], "metrics": [], "description": "Each record represents a transaction in Shopify.", "columns": {"transaction_id": {"name": "transaction_id", "description": "The ID for the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_id": {"name": "order_id", "description": "The ID for the order that the transaction is associated with.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refund_id": {"name": "refund_id", "description": "The ID associated with a refund in the refund table.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "amount": {"name": "amount", "description": "The amount of money included in the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "authorization": {"name": "authorization", "description": "The authorization code associated with the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_timestamp": {"name": "created_timestamp", "description": "The date and time when the transaction was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "processed_timestamp": {"name": "processed_timestamp", "description": "The date and time when a transaction was processed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "device_id": {"name": "device_id", "description": "The ID for the device.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "gateway": {"name": "gateway", "description": "The name of the gateway the transaction was issued through.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_name": {"name": "source_name", "description": "The origin of the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "message": {"name": "message", "description": "A string generated by the payment provider with additional information about why the transaction succeeded or failed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "The three-letter code (ISO 4217 format) for the currency used for the payment.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "location_id": {"name": "location_id", "description": "The ID of the physical location where the transaction was processed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "parent_id": {"name": "parent_id", "description": "The ID of an associated transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payment_avs_result_code": {"name": "payment_avs_result_code", "description": "The response code from the address verification system.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payment_credit_card_bin": {"name": "payment_credit_card_bin", "description": "The issuer identification number (IIN), formerly known as bank identification number (BIN) of the customer's credit card.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payment_cvv_result_code": {"name": "payment_cvv_result_code", "description": "The response code from the credit card company indicating whether the customer entered the card security code, or card verification value, correctly.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payment_credit_card_number": {"name": "payment_credit_card_number", "description": "The customer's credit card number, with most of the leading digits redacted.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payment_credit_card_company": {"name": "payment_credit_card_company", "description": "The name of the company that issued the customer's credit card.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "kind": {"name": "kind", "description": "The transaction's type.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "receipt": {"name": "receipt", "description": "A transaction receipt attached to the transaction by the gateway.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency_exchange_id": {"name": "currency_exchange_id", "description": "The ID of the adjustment.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency_exchange_adjustment": {"name": "currency_exchange_adjustment", "description": "The difference between the amounts on the associated transaction and the parent transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency_exchange_original_amount": {"name": "currency_exchange_original_amount", "description": "The amount of the parent transaction in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency_exchange_final_amount": {"name": "currency_exchange_final_amount", "description": "The amount of the associated transaction in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency_exchange_currency": {"name": "currency_exchange_currency", "description": "The shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "error_code": {"name": "error_code", "description": "A standardized error code, independent of the payment provider.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status": {"name": "status", "description": "The status of the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "test": {"name": "test", "description": "Whether the transaction is a test transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "user_id": {"name": "user_id", "description": "The ID for the user who was logged into the Shopify POS device when the order was processed, if applicable.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify_source://models/stg_shopify.yml", "compiled_path": "target/compiled/shopify_source/models/stg_shopify__transaction.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify", "materialized": "table"}, "created_at": 1665703195.341165, "compiled_sql": "with source as (\n\n select * from `dbt-package-testing`.`dbt_test_stg_shopify`.`stg_shopify__transaction_tmp`\n\n),\n\nrenamed as (\n\n select\n\n \n \n \n id\n \n as transaction_id , \n \n \n order_id\n \n as \n \n order_id\n \n, \n \n \n refund_id\n \n as \n \n refund_id\n \n, \n \n \n amount\n \n as \n \n amount\n \n, \n \n \n created_at\n \n as created_timestamp , \n \n \n processed_at\n \n as processed_timestamp , \n \n \n device_id\n \n as \n \n device_id\n \n, \n \n \n gateway\n \n as \n \n gateway\n \n, \n \n \n source_name\n \n as \n \n source_name\n \n, \n \n \n message\n \n as \n \n message\n \n, \n \n \n currency\n \n as \n \n currency\n \n, \n \n \n location_id\n \n as \n \n location_id\n \n, \n \n \n parent_id\n \n as \n \n parent_id\n \n, \n \n \n payment_avs_result_code\n \n as \n \n payment_avs_result_code\n \n, \n \n \n payment_credit_card_bin\n \n as \n \n payment_credit_card_bin\n \n, \n \n \n payment_cvv_result_code\n \n as \n \n payment_cvv_result_code\n \n, \n \n \n payment_credit_card_number\n \n as \n \n payment_credit_card_number\n \n, \n \n \n payment_credit_card_company\n \n as \n \n payment_credit_card_company\n \n, \n \n \n kind\n \n as \n \n kind\n \n, \n \n \n receipt\n \n as \n \n receipt\n \n, \n \n \n currency_exchange_id\n \n as \n \n currency_exchange_id\n \n, \n \n \n currency_exchange_adjustment\n \n as \n \n currency_exchange_adjustment\n \n, \n \n \n currency_exchange_original_amount\n \n as \n \n currency_exchange_original_amount\n \n, \n \n \n currency_exchange_final_amount\n \n as \n \n currency_exchange_final_amount\n \n, \n \n \n currency_exchange_currency\n \n as \n \n currency_exchange_currency\n \n, \n \n \n error_code\n \n as \n \n error_code\n \n, \n \n \n status\n \n as \n \n status\n \n, \n \n \n test\n \n as \n \n test\n \n, \n \n \n user_id\n \n as \n \n user_id\n \n, \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n\n\n\n\n --The below script allows for pass through columns.\n \n\n \n\n\n, cast('' as \n string\n) as source_relation\n\n\n\n\n from source\n where not test\n\n)\n\nselect * from renamed", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_test_stg_shopify`.`stg_shopify__transaction`"}, "model.shopify_source.stg_shopify__order_adjustment": {"raw_sql": "--To disable this model, set the shopify__using_order_adjustment variable within your dbt_project.yml file to False.\n{{ config(enabled=var('shopify__using_order_adjustment', True)) }}\n\nwith source as (\n\n select * \n from {{ ref('stg_shopify__order_adjustment_tmp') }}\n\n),\n\nrenamed as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_shopify__order_adjustment_tmp')),\n staging_columns=get_order_adjustment_columns()\n )\n }}\n\n {{ fivetran_utils.source_relation(\n union_schema_variable='shopify_union_schemas', \n union_database_variable='shopify_union_databases') \n }}\n \n from source\n)\n\nselect * from renamed", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.shopify_source.get_order_adjustment_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.source_relation"], "nodes": ["model.shopify_source.stg_shopify__order_adjustment_tmp", "model.shopify_source.stg_shopify__order_adjustment_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test_stg_shopify", "fqn": ["shopify_source", "stg_shopify__order_adjustment"], "unique_id": "model.shopify_source.stg_shopify__order_adjustment", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "stg_shopify__order_adjustment.sql", "original_file_path": "models/stg_shopify__order_adjustment.sql", "name": "stg_shopify__order_adjustment", "alias": "stg_shopify__order_adjustment", "checksum": {"name": "sha256", "checksum": "b494a4c88cf235fb0b11c020d004bcf0904e9d1ae235144330d3d24b37ad4318"}, "tags": [], "refs": [["stg_shopify__order_adjustment_tmp"], ["stg_shopify__order_adjustment_tmp"]], "sources": [], "metrics": [], "description": "Each record represents and adjustment to and order within Shopify.", "columns": {"order_adjustment_id": {"name": "order_adjustment_id", "description": "The unique numeric identifier for the order adjustment.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_id": {"name": "order_id", "description": "Reference to the order which the adjustment is associated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refund_id": {"name": "refund_id", "description": "Reference to the refund which the adjustment is associated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "amount": {"name": "amount", "description": "Amount of the adjustment.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tax_amount": {"name": "tax_amount", "description": "Tax amount applied to the order adjustment.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "kind": {"name": "kind", "description": "The kind of order adjustment (eg. refund, restock, etc.).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "reason": {"name": "reason", "description": "The reason for the order adjustment.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "amount_set": {"name": "amount_set", "description": "Amount set towards the order adjustment", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tax_amount_set": {"name": "tax_amount_set", "description": "Tax amount set towards the order adjustment.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify_source://models/stg_shopify.yml", "compiled_path": "target/compiled/shopify_source/models/stg_shopify__order_adjustment.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify", "materialized": "table", "enabled": true}, "created_at": 1665703195.344127, "compiled_sql": "--To disable this model, set the shopify__using_order_adjustment variable within your dbt_project.yml file to False.\n\n\nwith source as (\n\n select * \n from `dbt-package-testing`.`dbt_test_stg_shopify`.`stg_shopify__order_adjustment_tmp`\n\n),\n\nrenamed as (\n\n select\n \n \n \n id\n \n as order_adjustment_id , \n \n \n order_id\n \n as \n \n order_id\n \n, \n \n \n refund_id\n \n as \n \n refund_id\n \n, \n \n \n amount\n \n as \n \n amount\n \n, \n \n \n tax_amount\n \n as \n \n tax_amount\n \n, \n \n \n kind\n \n as \n \n kind\n \n, \n \n \n reason\n \n as \n \n reason\n \n, \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n\n\n\n\n \n\n\n, cast('' as \n string\n) as source_relation\n\n\n\n \n from source\n)\n\nselect * from renamed", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_test_stg_shopify`.`stg_shopify__order_adjustment`"}, "model.shopify_source.stg_shopify__customer": {"raw_sql": "with source as (\n\n select * from {{ ref('stg_shopify__customer_tmp') }}\n\n),\n\nrenamed as (\n\n select\n \n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_shopify__customer_tmp')),\n staging_columns=get_customer_columns()\n )\n }}\n\n --The below script allows for pass through columns.\n {% if var('customer_pass_through_columns') %}\n ,\n {{ var('customer_pass_through_columns') | join (\", \")}}\n\n {% endif %}\n\n {{ fivetran_utils.source_relation(\n union_schema_variable='shopify_union_schemas', \n union_database_variable='shopify_union_databases') \n }}\n\n from source\n\n)\n\nselect * from renamed", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.shopify_source.get_customer_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.source_relation"], "nodes": ["model.shopify_source.stg_shopify__customer_tmp", "model.shopify_source.stg_shopify__customer_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test_stg_shopify", "fqn": ["shopify_source", "stg_shopify__customer"], "unique_id": "model.shopify_source.stg_shopify__customer", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "stg_shopify__customer.sql", "original_file_path": "models/stg_shopify__customer.sql", "name": "stg_shopify__customer", "alias": "stg_shopify__customer", "checksum": {"name": "sha256", "checksum": "e43df3b376bae7b581cfb9514f59c82263bbba83447e9bd440a214e8c2dca709"}, "tags": [], "refs": [["stg_shopify__customer_tmp"], ["stg_shopify__customer_tmp"]], "sources": [], "metrics": [], "description": "Each record represents a customer in Shopify.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "has_accepted_marketing": {"name": "has_accepted_marketing", "description": "Whether the customer has consented to receive marketing material via email.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_timestamp": {"name": "created_timestamp", "description": "The date and time when the customer was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "default_address_id": {"name": "default_address_id", "description": "The default address for the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email": {"name": "email", "description": "The unique email address of the customer. Attempting to assign the same email address to multiple customers returns an error.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_name": {"name": "first_name", "description": "The customer's first name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "customer_id": {"name": "customer_id", "description": "A unique identifier for the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_name": {"name": "last_name", "description": "The customer's last name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "orders_count": {"name": "orders_count", "description": "The number of orders associated with this customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "phone": {"name": "phone", "description": "The unique phone number (E.164 format) for this customer. Attempting to assign the same phone number to multiple customers returns an error.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "account_state": {"name": "account_state", "description": "The state of the customer's account with a shop.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_tax_exempt": {"name": "is_tax_exempt", "description": "Whether the customer is exempt from paying taxes on their order. If true, then taxes won't be applied to an order at checkout. If false, then taxes will be applied at checkout.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_spent": {"name": "total_spent", "description": "The total amount of money that the customer has spent across their order history.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_timestamp": {"name": "updated_timestamp", "description": "The date and time when the customer information was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_verified_email": {"name": "is_verified_email", "description": "Whether the customer has verified their email address.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify_source://models/stg_shopify.yml", "compiled_path": "target/compiled/shopify_source/models/stg_shopify__customer.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify", "materialized": "table"}, "created_at": 1665703195.317596, "compiled_sql": "with source as (\n\n select * from `dbt-package-testing`.`dbt_test_stg_shopify`.`stg_shopify__customer_tmp`\n\n),\n\nrenamed as (\n\n select\n \n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n accepts_marketing\n \n as has_accepted_marketing , \n \n \n created_at\n \n as created_timestamp , \n \n \n default_address_id\n \n as \n \n default_address_id\n \n, \n \n \n email\n \n as \n \n email\n \n, \n \n \n first_name\n \n as \n \n first_name\n \n, \n \n \n id\n \n as customer_id , \n \n \n last_name\n \n as \n \n last_name\n \n, \n \n \n orders_count\n \n as \n \n orders_count\n \n, \n \n \n phone\n \n as \n \n phone\n \n, \n \n \n state\n \n as account_state , \n \n \n tax_exempt\n \n as is_tax_exempt , \n \n \n total_spent\n \n as \n \n total_spent\n \n, \n \n \n updated_at\n \n as updated_timestamp , \n \n \n verified_email\n \n as is_verified_email \n\n\n\n --The below script allows for pass through columns.\n \n\n \n\n\n, cast('' as \n string\n) as source_relation\n\n\n\n\n from source\n\n)\n\nselect * from renamed", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_test_stg_shopify`.`stg_shopify__customer`"}, "model.shopify_source.stg_shopify__order_line_refund": {"raw_sql": "--To disable this model, set the shopify__using_order_line_refund variable within your dbt_project.yml file to False.\n{{ config(enabled=var('shopify__using_order_line_refund', True)) }}\n\nwith source as (\n\n select * from {{ ref('stg_shopify__order_line_refund_tmp') }}\n\n),\n\nrenamed as (\n\n select\n \n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_shopify__order_line_refund_tmp')),\n staging_columns=get_order_line_refund_columns()\n )\n }}\n\n --The below script allows for pass through columns.\n {% if var('order_line_refund_pass_through_columns') %}\n ,\n {{ var('order_line_refund_pass_through_columns') | join (\", \")}}\n\n {% endif %}\n\n {{ fivetran_utils.source_relation(\n union_schema_variable='shopify_union_schemas', \n union_database_variable='shopify_union_databases') \n }}\n\n from source\n\n)\n\nselect * from renamed", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.shopify_source.get_order_line_refund_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.source_relation"], "nodes": ["model.shopify_source.stg_shopify__order_line_refund_tmp", "model.shopify_source.stg_shopify__order_line_refund_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test_stg_shopify", "fqn": ["shopify_source", "stg_shopify__order_line_refund"], "unique_id": "model.shopify_source.stg_shopify__order_line_refund", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "stg_shopify__order_line_refund.sql", "original_file_path": "models/stg_shopify__order_line_refund.sql", "name": "stg_shopify__order_line_refund", "alias": "stg_shopify__order_line_refund", "checksum": {"name": "sha256", "checksum": "0d7b02b07f95694dd5358ec919659f16bdccf708f906546b99f448355b1253cd"}, "tags": [], "refs": [["stg_shopify__order_line_refund_tmp"], ["stg_shopify__order_line_refund_tmp"]], "sources": [], "metrics": [], "description": "Each record represents a line item from an order in Shopify.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_line_refund_id": {"name": "order_line_refund_id", "description": "The unique identifier of the line item in the refund.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "location_id": {"name": "location_id", "description": "TThe unique identifier of the location where the items will be restockedBD", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_line_id": {"name": "order_line_id", "description": "The ID of the related line item in the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "quantity": {"name": "quantity", "description": "The quantity of the associated line item that was returned.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refund_id": {"name": "refund_id", "description": "The ID of the related refund.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "restock_type": {"name": "restock_type", "description": "How this refund line item affects inventory levels.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "subtotal": {"name": "subtotal", "description": "Subtotal amount of the order line refund", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_tax": {"name": "total_tax", "description": "The total tax applied to the refund.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify_source://models/stg_shopify.yml", "compiled_path": "target/compiled/shopify_source/models/stg_shopify__order_line_refund.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify", "materialized": "table", "enabled": true}, "created_at": 1665703195.3192441, "compiled_sql": "--To disable this model, set the shopify__using_order_line_refund variable within your dbt_project.yml file to False.\n\n\nwith source as (\n\n select * from `dbt-package-testing`.`dbt_test_stg_shopify`.`stg_shopify__order_line_refund_tmp`\n\n),\n\nrenamed as (\n\n select\n \n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n id\n \n as order_line_refund_id , \n \n \n location_id\n \n as \n \n location_id\n \n, \n \n \n order_line_id\n \n as \n \n order_line_id\n \n, \n cast(null as \n numeric\n) as \n \n subtotal\n \n , \n cast(null as \n numeric\n) as \n \n total_tax\n \n , \n \n \n quantity\n \n as \n \n quantity\n \n, \n \n \n refund_id\n \n as \n \n refund_id\n \n, \n \n \n restock_type\n \n as \n \n restock_type\n \n\n\n\n\n --The below script allows for pass through columns.\n \n\n \n\n\n, cast('' as \n string\n) as source_relation\n\n\n\n\n from source\n\n)\n\nselect * from renamed", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_test_stg_shopify`.`stg_shopify__order_line_refund`"}, "model.shopify_source.stg_shopify__customer_tmp": {"raw_sql": "{{\n fivetran_utils.union_data(\n table_identifier='customer', \n database_variable='shopify_database', \n schema_variable='shopify_schema', \n default_database=target.database,\n default_schema='shopify',\n default_variable='customer_source',\n union_schema_variable='shopify_union_schemas',\n union_database_variable='shopify_union_databases'\n )\n}}", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.union_data"], "nodes": ["seed.shopify_holistic_reporting_integration_tests.shopify_customer_data"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test_stg_shopify", "fqn": ["shopify_source", "tmp", "stg_shopify__customer_tmp"], "unique_id": "model.shopify_source.stg_shopify__customer_tmp", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "tmp/stg_shopify__customer_tmp.sql", "original_file_path": "models/tmp/stg_shopify__customer_tmp.sql", "name": "stg_shopify__customer_tmp", "alias": "stg_shopify__customer_tmp", "checksum": {"name": "sha256", "checksum": "1f896e84164292f48db1c4eddfd6b3afef9ce4661ad2ab160c8721c8e620026c"}, "tags": [], "refs": [["shopify_customer_data"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/tmp/stg_shopify__customer_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify", "materialized": "view"}, "created_at": 1665703194.964294, "compiled_sql": "\n\n\n\n select * \n from `dbt-package-testing`.`dbt_test`.`shopify_customer_data`\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_test_stg_shopify`.`stg_shopify__customer_tmp`"}, "model.shopify_source.stg_shopify__order_line_tmp": {"raw_sql": "{{\n fivetran_utils.union_data(\n table_identifier='order_line', \n database_variable='shopify_database', \n schema_variable='shopify_schema', \n default_database=target.database,\n default_schema='shopify',\n default_variable='order_line_source',\n union_schema_variable='shopify_union_schemas',\n union_database_variable='shopify_union_databases'\n )\n}}", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.union_data"], "nodes": ["seed.shopify_holistic_reporting_integration_tests.shopify_order_line_data"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test_stg_shopify", "fqn": ["shopify_source", "tmp", "stg_shopify__order_line_tmp"], "unique_id": "model.shopify_source.stg_shopify__order_line_tmp", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "tmp/stg_shopify__order_line_tmp.sql", "original_file_path": "models/tmp/stg_shopify__order_line_tmp.sql", "name": "stg_shopify__order_line_tmp", "alias": "stg_shopify__order_line_tmp", "checksum": {"name": "sha256", "checksum": "778359b2c17590b95d7b5709bfdd28b50d323b905e4277c74203416f08ee458e"}, "tags": [], "refs": [["shopify_order_line_data"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/tmp/stg_shopify__order_line_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify", "materialized": "view"}, "created_at": 1665703194.9737659, "compiled_sql": "\n\n\n\n select * \n from `dbt-package-testing`.`dbt_test`.`shopify_order_line_data`\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_test_stg_shopify`.`stg_shopify__order_line_tmp`"}, "model.shopify_source.stg_shopify__refund_tmp": {"raw_sql": "--To disable this model, set the shopify__using_refund variable within your dbt_project.yml file to False.\n{{ config(enabled=var('shopify__using_refund', True)) }}\n\n{{\n fivetran_utils.union_data(\n table_identifier='refund', \n database_variable='shopify_database', \n schema_variable='shopify_schema', \n default_database=target.database,\n default_schema='shopify',\n default_variable='refund_source',\n union_schema_variable='shopify_union_schemas',\n union_database_variable='shopify_union_databases'\n )\n}}", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.union_data"], "nodes": ["seed.shopify_holistic_reporting_integration_tests.shopify_refund_data"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test_stg_shopify", "fqn": ["shopify_source", "tmp", "stg_shopify__refund_tmp"], "unique_id": "model.shopify_source.stg_shopify__refund_tmp", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "tmp/stg_shopify__refund_tmp.sql", "original_file_path": "models/tmp/stg_shopify__refund_tmp.sql", "name": "stg_shopify__refund_tmp", "alias": "stg_shopify__refund_tmp", "checksum": {"name": "sha256", "checksum": "2bcf1d64f126acc4d271984df2b6332286bf10a7345962f7037c391d8ecdbdbd"}, "tags": [], "refs": [["shopify_refund_data"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/tmp/stg_shopify__refund_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify", "materialized": "view", "enabled": true}, "created_at": 1665703194.9770648, "compiled_sql": "--To disable this model, set the shopify__using_refund variable within your dbt_project.yml file to False.\n\n\n\n\n\n\n select * \n from `dbt-package-testing`.`dbt_test`.`shopify_refund_data`\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_test_stg_shopify`.`stg_shopify__refund_tmp`"}, "model.shopify_source.stg_shopify__product_tmp": {"raw_sql": "{{\n fivetran_utils.union_data(\n table_identifier='product', \n database_variable='shopify_database', \n schema_variable='shopify_schema', \n default_database=target.database,\n default_schema='shopify',\n default_variable='product_source',\n union_schema_variable='shopify_union_schemas',\n union_database_variable='shopify_union_databases'\n )\n}}", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.union_data"], "nodes": ["seed.shopify_holistic_reporting_integration_tests.shopify_product_data"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test_stg_shopify", "fqn": ["shopify_source", "tmp", "stg_shopify__product_tmp"], "unique_id": "model.shopify_source.stg_shopify__product_tmp", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "tmp/stg_shopify__product_tmp.sql", "original_file_path": "models/tmp/stg_shopify__product_tmp.sql", "name": "stg_shopify__product_tmp", "alias": "stg_shopify__product_tmp", "checksum": {"name": "sha256", "checksum": "4c88fa0dabe17fa99b7509af7b3518c844df1747e28e6c7ac4f0a8262424e91a"}, "tags": [], "refs": [["shopify_product_data"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/tmp/stg_shopify__product_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify", "materialized": "view"}, "created_at": 1665703194.9806762, "compiled_sql": "\n\n\n\n select * \n from `dbt-package-testing`.`dbt_test`.`shopify_product_data`\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_test_stg_shopify`.`stg_shopify__product_tmp`"}, "model.shopify_source.stg_shopify__order_adjustment_tmp": {"raw_sql": "--To disable this model, set the shopify__using_order_adjustment variable within your dbt_project.yml file to False.\n{{ config(enabled=var('shopify__using_order_adjustment', True)) }}\n\n{{\n fivetran_utils.union_data(\n table_identifier='order_adjustment', \n database_variable='shopify_database', \n schema_variable='shopify_schema', \n default_database=target.database,\n default_schema='shopify',\n default_variable='order_adjustment_source',\n union_schema_variable='shopify_union_schemas',\n union_database_variable='shopify_union_databases'\n )\n}}", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.union_data"], "nodes": ["seed.shopify_holistic_reporting_integration_tests.shopify_order_adjustment_data"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test_stg_shopify", "fqn": ["shopify_source", "tmp", "stg_shopify__order_adjustment_tmp"], "unique_id": "model.shopify_source.stg_shopify__order_adjustment_tmp", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "tmp/stg_shopify__order_adjustment_tmp.sql", "original_file_path": "models/tmp/stg_shopify__order_adjustment_tmp.sql", "name": "stg_shopify__order_adjustment_tmp", "alias": "stg_shopify__order_adjustment_tmp", "checksum": {"name": "sha256", "checksum": "e3d5e7ba5a680437560ef21796b014718c45d20c52fbf4ac950d8eb687348d96"}, "tags": [], "refs": [["shopify_order_adjustment_data"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/tmp/stg_shopify__order_adjustment_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify", "materialized": "view", "enabled": true}, "created_at": 1665703194.984044, "compiled_sql": "--To disable this model, set the shopify__using_order_adjustment variable within your dbt_project.yml file to False.\n\n\n\n\n\n\n select * \n from `dbt-package-testing`.`dbt_test`.`shopify_order_adjustment_data`\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_test_stg_shopify`.`stg_shopify__order_adjustment_tmp`"}, "model.shopify_source.stg_shopify__order_line_refund_tmp": {"raw_sql": "--To disable this model, set the shopify__using_order_line_refund variable within your dbt_project.yml file to False.\n{{ config(enabled=var('shopify__using_order_line_refund', True)) }}\n\n{{\n fivetran_utils.union_data(\n table_identifier='order_line_refund', \n database_variable='shopify_database', \n schema_variable='shopify_schema', \n default_database=target.database,\n default_schema='shopify',\n default_variable='order_line_refund_source',\n union_schema_variable='shopify_union_schemas',\n union_database_variable='shopify_union_databases'\n )\n}}", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.union_data"], "nodes": ["seed.shopify_holistic_reporting_integration_tests.shopify_order_line_refund_data"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test_stg_shopify", "fqn": ["shopify_source", "tmp", "stg_shopify__order_line_refund_tmp"], "unique_id": "model.shopify_source.stg_shopify__order_line_refund_tmp", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "tmp/stg_shopify__order_line_refund_tmp.sql", "original_file_path": "models/tmp/stg_shopify__order_line_refund_tmp.sql", "name": "stg_shopify__order_line_refund_tmp", "alias": "stg_shopify__order_line_refund_tmp", "checksum": {"name": "sha256", "checksum": "33bb981405f33c32bbe9c2107a9ba93fd70b9e59578befc3c9e7f78a68c27eb2"}, "tags": [], "refs": [["shopify_order_line_refund_data"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/tmp/stg_shopify__order_line_refund_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify", "materialized": "view", "enabled": true}, "created_at": 1665703194.987639, "compiled_sql": "--To disable this model, set the shopify__using_order_line_refund variable within your dbt_project.yml file to False.\n\n\n\n\n\n\n select * \n from `dbt-package-testing`.`dbt_test`.`shopify_order_line_refund_data`\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_test_stg_shopify`.`stg_shopify__order_line_refund_tmp`"}, "model.shopify_source.stg_shopify__transaction_tmp": {"raw_sql": "{{\n fivetran_utils.union_data(\n table_identifier='transaction', \n database_variable='shopify_database', \n schema_variable='shopify_schema', \n default_database=target.database,\n default_schema='shopify',\n default_variable='transaction_source',\n union_schema_variable='shopify_union_schemas',\n union_database_variable='shopify_union_databases'\n )\n}}", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.union_data"], "nodes": ["seed.shopify_holistic_reporting_integration_tests.shopify_transaction_data"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test_stg_shopify", "fqn": ["shopify_source", "tmp", "stg_shopify__transaction_tmp"], "unique_id": "model.shopify_source.stg_shopify__transaction_tmp", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "tmp/stg_shopify__transaction_tmp.sql", "original_file_path": "models/tmp/stg_shopify__transaction_tmp.sql", "name": "stg_shopify__transaction_tmp", "alias": "stg_shopify__transaction_tmp", "checksum": {"name": "sha256", "checksum": "9a4cf0c7a2495c01fd10f0d88655aaffe63ef8b3cc94883e10507b034285f978"}, "tags": [], "refs": [["shopify_transaction_data"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/tmp/stg_shopify__transaction_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify", "materialized": "view"}, "created_at": 1665703194.991796, "compiled_sql": "\n\n\n\n select * \n from `dbt-package-testing`.`dbt_test`.`shopify_transaction_data`\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_test_stg_shopify`.`stg_shopify__transaction_tmp`"}, "model.shopify_source.stg_shopify__product_variant_tmp": {"raw_sql": "{{\n fivetran_utils.union_data(\n table_identifier='product_variant', \n database_variable='shopify_database', \n schema_variable='shopify_schema', \n default_database=target.database,\n default_schema='shopify',\n default_variable='product_variant_source',\n union_schema_variable='shopify_union_schemas',\n union_database_variable='shopify_union_databases'\n )\n}}", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.union_data"], "nodes": ["seed.shopify_holistic_reporting_integration_tests.shopify_product_variant_data"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test_stg_shopify", "fqn": ["shopify_source", "tmp", "stg_shopify__product_variant_tmp"], "unique_id": "model.shopify_source.stg_shopify__product_variant_tmp", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "tmp/stg_shopify__product_variant_tmp.sql", "original_file_path": "models/tmp/stg_shopify__product_variant_tmp.sql", "name": "stg_shopify__product_variant_tmp", "alias": "stg_shopify__product_variant_tmp", "checksum": {"name": "sha256", "checksum": "cbb9a84c332f17d90ad953536a449714fac6f77f871da604d43ffb846f6d5621"}, "tags": [], "refs": [["shopify_product_variant_data"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/tmp/stg_shopify__product_variant_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify", "materialized": "view"}, "created_at": 1665703194.995038, "compiled_sql": "\n\n\n\n select * \n from `dbt-package-testing`.`dbt_test`.`shopify_product_variant_data`\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_test_stg_shopify`.`stg_shopify__product_variant_tmp`"}, "model.shopify_source.stg_shopify__order_tmp": {"raw_sql": "{{\n fivetran_utils.union_data(\n table_identifier='order', \n database_variable='shopify_database', \n schema_variable='shopify_schema', \n default_database=target.database,\n default_schema='shopify',\n default_variable='order_source',\n union_schema_variable='shopify_union_schemas',\n union_database_variable='shopify_union_databases'\n )\n}}", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.union_data"], "nodes": ["seed.shopify_holistic_reporting_integration_tests.shopify_order_data"]}, "config": {"enabled": true, "alias": null, "schema": "stg_shopify", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test_stg_shopify", "fqn": ["shopify_source", "tmp", "stg_shopify__order_tmp"], "unique_id": "model.shopify_source.stg_shopify__order_tmp", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "tmp/stg_shopify__order_tmp.sql", "original_file_path": "models/tmp/stg_shopify__order_tmp.sql", "name": "stg_shopify__order_tmp", "alias": "stg_shopify__order_tmp", "checksum": {"name": "sha256", "checksum": "f4fd2563557b13c2b54531a7fa9995e496aa1b39432d729a010ddcb7e10001ae"}, "tags": [], "refs": [["shopify_order_data"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/tmp/stg_shopify__order_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "stg_shopify", "materialized": "view"}, "created_at": 1665703194.998407, "compiled_sql": "\n\n\n\n select * \n from `dbt-package-testing`.`dbt_test`.`shopify_order_data`\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_test_stg_shopify`.`stg_shopify__order_tmp`"}, "model.klaviyo_source.stg_klaviyo__person": {"raw_sql": "with base as (\n\n select * \n from {{ ref('stg_klaviyo__person_tmp') }}\n\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_klaviyo__person_tmp')),\n staging_columns=get_person_columns()\n )\n }}\n {{ fivetran_utils.source_relation(\n union_schema_variable='klaviyo_union_schemas', \n union_database_variable='klaviyo_union_databases') \n }}\n from base\n),\n\nfinal as (\n \n select \n id as person_id,\n address_1,\n address_2,\n city,\n country,\n zip,\n created as created_at,\n email,\n first_name || ' ' || last_name as full_name,\n latitude,\n longitude,\n organization,\n phone_number,\n region, -- state in USA\n timezone,\n title,\n updated as updated_at,\n source_relation\n \n {{ fivetran_utils.fill_pass_through_columns('klaviyo__person_pass_through_columns') }}\n\n from fields\n where not coalesce(_fivetran_deleted, false)\n)\n\nselect * from final", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.klaviyo_source.get_person_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.source_relation", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["model.klaviyo_source.stg_klaviyo__person_tmp", "model.klaviyo_source.stg_klaviyo__person_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_klaviyo", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test_stg_klaviyo", "fqn": ["klaviyo_source", "stg_klaviyo__person"], "unique_id": "model.klaviyo_source.stg_klaviyo__person", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "stg_klaviyo__person.sql", "original_file_path": "models/stg_klaviyo__person.sql", "name": "stg_klaviyo__person", "alias": "stg_klaviyo__person", "checksum": {"name": "sha256", "checksum": "0c4d31fb3c257dff6d4c5123f3352ee790db81b766ac4f3be3b1cdb06d19b45f"}, "tags": [], "refs": [["stg_klaviyo__person_tmp"], ["stg_klaviyo__person_tmp"]], "sources": [], "metrics": [], "description": "Table storing the profiles of all people/users interacted with. Custom columns can be passed through to downstream models via the `klaviyo__person_pass_through_columns` variable (see README for details).\n", "columns": {"person_id": {"name": "person_id", "description": "Unique ID of the user if you use your own unique identifier. Otherwise, Klaviyo recommends using the email as the primary key. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "address_1": {"name": "address_1", "description": "First line of the person's address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "address_2": {"name": "address_2", "description": "Second line of the person's address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "city": {"name": "city", "description": "City they live in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "country": {"name": "country", "description": "Country they live in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "zip": {"name": "zip", "description": "Postal code where they live.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "Timestamp of when the person's profile was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email": {"name": "email", "description": "The email address and the unique identifier for a profile.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "full_name": {"name": "full_name", "description": "Person's full name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "latitude": {"name": "latitude", "description": "Latitude of the person's location.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "longitude": {"name": "longitude", "description": "Longitude of the person's location.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization": {"name": "organization", "description": "Business organization they belong to.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "phone_number": {"name": "phone_number", "description": "Associated phone number.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "region": {"name": "region", "description": "Region or state they live in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "timezone": {"name": "timezone", "description": "Timezone they are situated in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "title": {"name": "title", "description": "Title at their business or organization.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the person profile was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_relation": {"name": "source_relation", "description": "The source where this data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioining together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "klaviyo_source://models/stg_klaviyo.yml", "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo__person.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "stg_klaviyo"}, "created_at": 1665703195.462246, "compiled_sql": "with base as (\n\n select * \n from `dbt-package-testing`.`dbt_test_stg_klaviyo`.`stg_klaviyo__person_tmp`\n\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_deleted\n \n as \n \n _fivetran_deleted\n \n, \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n address_1\n \n as \n \n address_1\n \n, \n \n \n address_2\n \n as \n \n address_2\n \n, \n \n \n city\n \n as \n \n city\n \n, \n \n \n country\n \n as \n \n country\n \n, \n \n \n created\n \n as \n \n created\n \n, \n \n \n email\n \n as \n \n email\n \n, \n \n \n first_name\n \n as \n \n first_name\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n last_name\n \n as \n \n last_name\n \n, \n \n \n latitude\n \n as \n \n latitude\n \n, \n \n \n longitude\n \n as \n \n longitude\n \n, \n \n \n organization\n \n as \n \n organization\n \n, \n \n \n phone_number\n \n as \n \n phone_number\n \n, \n \n \n region\n \n as \n \n region\n \n, \n \n \n timezone\n \n as \n \n timezone\n \n, \n \n \n title\n \n as \n \n title\n \n, \n \n \n updated\n \n as \n \n updated\n \n, \n \n \n zip\n \n as \n \n zip\n \n\n\n\n \n\n\n, cast('' as \n string\n) as source_relation\n\n\n\n from base\n),\n\nfinal as (\n \n select \n id as person_id,\n address_1,\n address_2,\n city,\n country,\n zip,\n created as created_at,\n email,\n first_name || ' ' || last_name as full_name,\n latitude,\n longitude,\n organization,\n phone_number,\n region, -- state in USA\n timezone,\n title,\n updated as updated_at,\n source_relation\n \n \n\n\n\n\n\n from fields\n where not coalesce(_fivetran_deleted, false)\n)\n\nselect * from final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_test_stg_klaviyo`.`stg_klaviyo__person`"}, "model.klaviyo_source.stg_klaviyo__campaign": {"raw_sql": "with base as (\n\n select * \n from {{ ref('stg_klaviyo__campaign_tmp') }}\n\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_klaviyo__campaign_tmp')),\n staging_columns=get_campaign_columns()\n )\n }}\n {{ fivetran_utils.source_relation(\n union_schema_variable='klaviyo_union_schemas', \n union_database_variable='klaviyo_union_databases') \n }}\n from base\n),\n\nfinal as (\n \n select\n campaign_type,\n created as created_at,\n email_template_id,\n from_email,\n from_name,\n id as campaign_id,\n is_segmented,\n name as campaign_name,\n send_time as scheduled_to_send_at,\n sent_at,\n coalesce(status, lower(status_label)) as status,\n status_id,\n subject,\n updated as updated_at,\n source_relation\n\n from fields\n\n where not coalesce(_fivetran_deleted, false)\n)\n\nselect * from final", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.klaviyo_source.get_campaign_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.source_relation"], "nodes": ["model.klaviyo_source.stg_klaviyo__campaign_tmp", "model.klaviyo_source.stg_klaviyo__campaign_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_klaviyo", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test_stg_klaviyo", "fqn": ["klaviyo_source", "stg_klaviyo__campaign"], "unique_id": "model.klaviyo_source.stg_klaviyo__campaign", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "stg_klaviyo__campaign.sql", "original_file_path": "models/stg_klaviyo__campaign.sql", "name": "stg_klaviyo__campaign", "alias": "stg_klaviyo__campaign", "checksum": {"name": "sha256", "checksum": "3bb055bc8484630176011790a666821ae220126184e05eaff411aa44406048e2"}, "tags": [], "refs": [["stg_klaviyo__campaign_tmp"], ["stg_klaviyo__campaign_tmp"]], "sources": [], "metrics": [], "description": "Table capturing email campaigns in Klaviyo.\n", "columns": {"campaign_type": {"name": "campaign_type", "description": "Type of campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "Timestamp of when the campaign was created, in UTC.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email_template_id": {"name": "email_template_id", "description": "Foreign key referencing the ID of the `email_template` object that will be the content of this campaign. Note the Email Template is copied when creating this campaign, so future changes to that Email Template will not alter the content of this campaign.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "from_email": {"name": "from_email", "description": "The email address your email will be sent from and will be used in the reply-to header.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "from_name": {"name": "from_name", "description": "The name or label associated with the email address you're sending from.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Unique ID of the campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_segmented": {"name": "is_segmented", "description": "Boolean that is true if the campaign is directed at a Klaviyo segment (not a list).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_name": {"name": "campaign_name", "description": "A name for this campaign. If not specified, this will default to the subject of the campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "scheduled_to_send_at": {"name": "scheduled_to_send_at", "description": "Timestamp of when the campaign is scheduled to be sent in the future, if [\"smart send time\"](https://help.klaviyo.com/hc/en-us/articles/360029794371-Smart-Send-Time-in-Klaviyo#how-to-utilize-smart-send-time3) is used. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "sent_at": {"name": "sent_at", "description": "Timestamp of when the campaign was first sent out to users.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status": {"name": "status", "description": "Current status of the campaign. Either \"draft\", \"scheduled\", \"sent\", or \"cancelled\".", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status_id": {"name": "status_id", "description": "Corresponding ID to the current status.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "subject": {"name": "subject", "description": "The subject line of the campaign's email.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the campaign was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_relation": {"name": "source_relation", "description": "The source where this data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioining together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "klaviyo_source://models/stg_klaviyo.yml", "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo__campaign.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "stg_klaviyo"}, "created_at": 1665703195.4540539, "compiled_sql": "with base as (\n\n select * \n from `dbt-package-testing`.`dbt_test_stg_klaviyo`.`stg_klaviyo__campaign_tmp`\n\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_deleted\n \n as \n \n _fivetran_deleted\n \n, \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n campaign_type\n \n as \n \n campaign_type\n \n, \n \n \n created\n \n as \n \n created\n \n, \n \n \n email_template_id\n \n as \n \n email_template_id\n \n, \n \n \n from_email\n \n as \n \n from_email\n \n, \n \n \n from_name\n \n as \n \n from_name\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n is_segmented\n \n as \n \n is_segmented\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n send_time\n \n as \n \n send_time\n \n, \n \n \n sent_at\n \n as \n \n sent_at\n \n, \n \n \n status\n \n as \n \n status\n \n, \n \n \n status_id\n \n as \n \n status_id\n \n, \n \n \n status_label\n \n as \n \n status_label\n \n, \n \n \n subject\n \n as \n \n subject\n \n, \n \n \n updated\n \n as \n \n updated\n \n\n\n\n \n\n\n, cast('' as \n string\n) as source_relation\n\n\n\n from base\n),\n\nfinal as (\n \n select\n campaign_type,\n created as created_at,\n email_template_id,\n from_email,\n from_name,\n id as campaign_id,\n is_segmented,\n name as campaign_name,\n send_time as scheduled_to_send_at,\n sent_at,\n coalesce(status, lower(status_label)) as status,\n status_id,\n subject,\n updated as updated_at,\n source_relation\n\n from fields\n\n where not coalesce(_fivetran_deleted, false)\n)\n\nselect * from final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_test_stg_klaviyo`.`stg_klaviyo__campaign`"}, "model.klaviyo_source.stg_klaviyo__metric": {"raw_sql": "with base as (\n\n select * \n from {{ ref('stg_klaviyo__metric_tmp') }}\n\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_klaviyo__metric_tmp')),\n staging_columns=get_metric_columns()\n )\n }}\n {{ fivetran_utils.source_relation(\n union_schema_variable='klaviyo_union_schemas', \n union_database_variable='klaviyo_union_databases') \n }}\n from base\n),\n\nfinal as (\n \n select \n created as created_at,\n id as metric_id,\n integration_id,\n name as metric_name,\n updated as updated_at,\n source_relation\n\n from fields\n\n where not coalesce(_fivetran_deleted, false)\n)\n\nselect * from final", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.klaviyo_source.get_metric_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.source_relation"], "nodes": ["model.klaviyo_source.stg_klaviyo__metric_tmp", "model.klaviyo_source.stg_klaviyo__metric_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_klaviyo", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test_stg_klaviyo", "fqn": ["klaviyo_source", "stg_klaviyo__metric"], "unique_id": "model.klaviyo_source.stg_klaviyo__metric", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "stg_klaviyo__metric.sql", "original_file_path": "models/stg_klaviyo__metric.sql", "name": "stg_klaviyo__metric", "alias": "stg_klaviyo__metric", "checksum": {"name": "sha256", "checksum": "d131ba8b5c6b489c12dc687514ef82b359aecaa82175b66d77fa44344b4eb58f"}, "tags": [], "refs": [["stg_klaviyo__metric_tmp"], ["stg_klaviyo__metric_tmp"]], "sources": [], "metrics": [], "description": "Table of tracked metrics across integrations in Klaviyo.", "columns": {"created_at": {"name": "created_at", "description": "Timestamp of when the metric was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "metric_id": {"name": "metric_id", "description": "Unique ID of the metric being tracked.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "integration_id": {"name": "integration_id", "description": "Foreign key referencing the INTEGRATION that the metric is being pulled from.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "metric_name": {"name": "metric_name", "description": "Name of the metric (same as `EVENT.type`)", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the metric was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_relation": {"name": "source_relation", "description": "The source where this data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioining together multiple sources, this will be an empty string.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "klaviyo_source://models/stg_klaviyo.yml", "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo__metric.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "stg_klaviyo"}, "created_at": 1665703195.463327, "compiled_sql": "with base as (\n\n select * \n from `dbt-package-testing`.`dbt_test_stg_klaviyo`.`stg_klaviyo__metric_tmp`\n\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_deleted\n \n as \n \n _fivetran_deleted\n \n, \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n created\n \n as \n \n created\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n integration_id\n \n as \n \n integration_id\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n updated\n \n as \n \n updated\n \n\n\n\n \n\n\n, cast('' as \n string\n) as source_relation\n\n\n\n from base\n),\n\nfinal as (\n \n select \n created as created_at,\n id as metric_id,\n integration_id,\n name as metric_name,\n updated as updated_at,\n source_relation\n\n from fields\n\n where not coalesce(_fivetran_deleted, false)\n)\n\nselect * from final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_test_stg_klaviyo`.`stg_klaviyo__metric`"}, "model.klaviyo_source.stg_klaviyo__integration": {"raw_sql": "with base as (\n\n select * \n from {{ ref('stg_klaviyo__integration_tmp') }}\n\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_klaviyo__integration_tmp')),\n staging_columns=get_integration_columns()\n )\n }}\n {{ fivetran_utils.source_relation(\n union_schema_variable='klaviyo_union_schemas', \n union_database_variable='klaviyo_union_databases') \n }}\n from base\n),\n\nfinal as (\n \n select \n category,\n id as integration_id,\n name as integration_name,\n source_relation\n\n from fields\n where not coalesce(_fivetran_deleted, false)\n)\n\nselect * from final", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.klaviyo_source.get_integration_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.source_relation"], "nodes": ["model.klaviyo_source.stg_klaviyo__integration_tmp", "model.klaviyo_source.stg_klaviyo__integration_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_klaviyo", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test_stg_klaviyo", "fqn": ["klaviyo_source", "stg_klaviyo__integration"], "unique_id": "model.klaviyo_source.stg_klaviyo__integration", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "stg_klaviyo__integration.sql", "original_file_path": "models/stg_klaviyo__integration.sql", "name": "stg_klaviyo__integration", "alias": "stg_klaviyo__integration", "checksum": {"name": "sha256", "checksum": "cf1d2569260342f615850f5d782fb0e166d1b70ea3a703fb2248d6f457023cf8"}, "tags": [], "refs": [["stg_klaviyo__integration_tmp"], ["stg_klaviyo__integration_tmp"]], "sources": [], "metrics": [], "description": "Table storing third-party platforms integrated into Klaviyo.", "columns": {"category": {"name": "category", "description": "Use-case category of the integrated platform.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "integration_id": {"name": "integration_id", "description": "Unique ID of the integration.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "integration_name": {"name": "integration_name", "description": "Name of the integrated platform.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_relation": {"name": "source_relation", "description": "The source where this data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioining together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "klaviyo_source://models/stg_klaviyo.yml", "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo__integration.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "stg_klaviyo"}, "created_at": 1665703195.459376, "compiled_sql": "with base as (\n\n select * \n from `dbt-package-testing`.`dbt_test_stg_klaviyo`.`stg_klaviyo__integration_tmp`\n\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_deleted\n \n as \n \n _fivetran_deleted\n \n, \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n category\n \n as \n \n category\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 \n\n\n, cast('' as \n string\n) as source_relation\n\n\n\n from base\n),\n\nfinal as (\n \n select \n category,\n id as integration_id,\n name as integration_name,\n source_relation\n\n from fields\n where not coalesce(_fivetran_deleted, false)\n)\n\nselect * from final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_test_stg_klaviyo`.`stg_klaviyo__integration`"}, "model.klaviyo_source.stg_klaviyo__flow": {"raw_sql": "with base as (\n\n select * \n from {{ ref('stg_klaviyo__flow_tmp') }}\n\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_klaviyo__flow_tmp')),\n staging_columns=get_flow_columns()\n )\n }}\n {{ fivetran_utils.source_relation(\n union_schema_variable='klaviyo_union_schemas', \n union_database_variable='klaviyo_union_databases') \n }}\n from base\n),\n\nfinal as (\n \n select \n created as created_at,\n id as flow_id,\n name as flow_name,\n status,\n {% if target.type == 'snowflake'%}\n \"TRIGGER\" \n {% else %}\n trigger\n {% endif %}\n as flow_trigger,\n updated as updated_at,\n customer_filter as person_filter,\n source_relation\n\n from fields\n where not coalesce(_fivetran_deleted, false)\n)\n\nselect * from final", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.klaviyo_source.get_flow_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.source_relation"], "nodes": ["model.klaviyo_source.stg_klaviyo__flow_tmp", "model.klaviyo_source.stg_klaviyo__flow_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_klaviyo", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test_stg_klaviyo", "fqn": ["klaviyo_source", "stg_klaviyo__flow"], "unique_id": "model.klaviyo_source.stg_klaviyo__flow", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "stg_klaviyo__flow.sql", "original_file_path": "models/stg_klaviyo__flow.sql", "name": "stg_klaviyo__flow", "alias": "stg_klaviyo__flow", "checksum": {"name": "sha256", "checksum": "a74ad01e8fbca823f7ec229f1d0c59171c4a1200e314cb06e0ac75da0bc72792"}, "tags": [], "refs": [["stg_klaviyo__flow_tmp"], ["stg_klaviyo__flow_tmp"]], "sources": [], "metrics": [], "description": "Table of automated, triggered flow sequences in Klaviyo.", "columns": {"created_at": {"name": "created_at", "description": "Timestamp of when the flow was first created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_id": {"name": "flow_id", "description": "Unique ID of the flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_name": {"name": "flow_name", "description": "Name of the flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status": {"name": "status", "description": "Current status of the flow. Either 'manual', 'live', or 'draft'. Read more [here](https://help.klaviyo.com/hc/en-us/articles/115002774932-Getting-Started-with-Flows#the-flow-action-status9).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_trigger": {"name": "flow_trigger", "description": "JSON of metric, segment, list, and/or date-property filters that will trigger this flow. These are applied to the **event level**.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the flow was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "person_filter": {"name": "person_filter", "description": "JSON of flow filters placed on the **person level** that will trigger this flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_relation": {"name": "source_relation", "description": "The source where this data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioining together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "klaviyo_source://models/stg_klaviyo.yml", "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo__flow.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "stg_klaviyo"}, "created_at": 1665703195.4584188, "compiled_sql": "with base as (\n\n select * \n from `dbt-package-testing`.`dbt_test_stg_klaviyo`.`stg_klaviyo__flow_tmp`\n\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_deleted\n \n as \n \n _fivetran_deleted\n \n, \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n created\n \n as \n \n created\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 status\n \n as \n \n status\n \n, \n \n \n \n \n `trigger`\n \n \n \n as \n \n \n \n `trigger`\n \n \n \n, \n \n \n updated\n \n as \n \n updated\n \n, \n \n \n customer_filter\n \n as \n \n customer_filter\n \n\n\n\n \n\n\n, cast('' as \n string\n) as source_relation\n\n\n\n from base\n),\n\nfinal as (\n \n select \n created as created_at,\n id as flow_id,\n name as flow_name,\n status,\n \n trigger\n \n as flow_trigger,\n updated as updated_at,\n customer_filter as person_filter,\n source_relation\n\n from fields\n where not coalesce(_fivetran_deleted, false)\n)\n\nselect * from final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_test_stg_klaviyo`.`stg_klaviyo__flow`"}, "model.klaviyo_source.stg_klaviyo__event": {"raw_sql": "with base as (\n\n select * \n from {{ ref('stg_klaviyo__event_tmp') }}\n\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_klaviyo__event_tmp')),\n staging_columns=get_event_columns()\n )\n }}\n {{ fivetran_utils.source_relation(\n union_schema_variable='klaviyo_union_schemas', \n union_database_variable='klaviyo_union_databases') \n }}\n from base\n),\n\nrename as (\n \n select \n _variation as variation_id,\n campaign_id,\n cast(timestamp as {{ dbt_utils.type_timestamp() }} ) as occurred_at,\n flow_id,\n flow_message_id,\n id as event_id,\n metric_id,\n person_id,\n type,\n uuid,\n property_value as numeric_value,\n _fivetran_synced,\n source_relation\n\n {{ fivetran_utils.fill_pass_through_columns('klaviyo__event_pass_through_columns') }}\n\n from fields\n where not coalesce(_fivetran_deleted, false)\n),\n\nfinal as (\n \n select \n *,\n cast( {{ dbt_utils.date_trunc('day', 'occurred_at') }} as date) as occurred_on,\n {{ dbt_utils.surrogate_key(['event_id', 'source_relation']) }} as unique_event_id\n\n from rename\n\n)\n\nselect * from final", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.klaviyo_source.get_event_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.source_relation", "macro.dbt_utils.type_timestamp", "macro.fivetran_utils.fill_pass_through_columns", "macro.dbt_utils.date_trunc", "macro.dbt_utils.surrogate_key"], "nodes": ["model.klaviyo_source.stg_klaviyo__event_tmp", "model.klaviyo_source.stg_klaviyo__event_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "stg_klaviyo", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test_stg_klaviyo", "fqn": ["klaviyo_source", "stg_klaviyo__event"], "unique_id": "model.klaviyo_source.stg_klaviyo__event", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "stg_klaviyo__event.sql", "original_file_path": "models/stg_klaviyo__event.sql", "name": "stg_klaviyo__event", "alias": "stg_klaviyo__event", "checksum": {"name": "sha256", "checksum": "3f6b83c7355226d28545f2ef688933906d57e1acdd0b840bb6a504cae3b3bba5"}, "tags": [], "refs": [["stg_klaviyo__event_tmp"], ["stg_klaviyo__event_tmp"]], "sources": [], "metrics": [], "description": "Table of events (and metrics) triggered in Klaviyo or via its integrations. Custom columns can be passed through to downstream models via the `klaviyo__event_pass_through_columns` variable (see README for details).\n", "columns": {"variation_id": {"name": "variation_id", "description": "Unique ID of the attributed flow or campaign variation group. This does not map onto another table. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Foreign key referencing the CAMPAIGN that the event is attributed to.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "occurred_at": {"name": "occurred_at", "description": "Timestamp of when the event was triggered.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_id": {"name": "flow_id", "description": "Foreign key referencing the FLOW that the event is attributed to.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_message_id": {"name": "flow_message_id", "description": "Unique ID of the FLOW_MESSAGE that the event is attributed to. This does not map onto another table.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "event_id": {"name": "event_id", "description": "Unique ID of the event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "metric_id": {"name": "metric_id", "description": "Foreign key referencing the metric being captured.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "person_id": {"name": "person_id", "description": "Foreign key referencing the PERSON who triggered the event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "type": {"name": "type", "description": "Type of event that was triggered. This is the same as the METRIC name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "uuid": {"name": "uuid", "description": "Universally Unique Identifier of the event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "numeric_value": {"name": "numeric_value", "description": "Numeric value associated with the event (ie the dollars associated with a purchase).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "occurred_on": {"name": "occurred_on", "description": "Calendar date (UTC) on which the event occurred.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_relation": {"name": "source_relation", "description": "The source where this data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioining together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "unique_event_id": {"name": "unique_event_id", "description": "The unique identifier for the combination of event_id and source_relation columns.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "klaviyo_source://models/stg_klaviyo.yml", "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo__event.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "stg_klaviyo"}, "created_at": 1665703195.456589, "compiled_sql": "with base as (\n\n select * \n from `dbt-package-testing`.`dbt_test_stg_klaviyo`.`stg_klaviyo__event_tmp`\n\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_deleted\n \n as \n \n _fivetran_deleted\n \n, \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n _variation\n \n as \n \n _variation\n \n, \n \n \n campaign_id\n \n as \n \n campaign_id\n \n, \n \n \n datetime\n \n as \n \n datetime\n \n, \n \n \n flow_id\n \n as \n \n flow_id\n \n, \n \n \n flow_message_id\n \n as \n \n flow_message_id\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n metric_id\n \n as \n \n metric_id\n \n, \n \n \n person_id\n \n as \n \n person_id\n \n, \n \n \n timestamp\n \n as \n \n timestamp\n \n, \n \n \n type\n \n as \n \n type\n \n, \n \n \n uuid\n \n as \n \n uuid\n \n, \n \n \n property_value\n \n as \n \n property_value\n \n\n\n\n \n\n\n, cast('' as \n string\n) as source_relation\n\n\n\n from base\n),\n\nrename as (\n \n select \n _variation as variation_id,\n campaign_id,\n cast(timestamp as \n timestamp\n ) as occurred_at,\n flow_id,\n flow_message_id,\n id as event_id,\n metric_id,\n person_id,\n type,\n uuid,\n property_value as numeric_value,\n _fivetran_synced,\n source_relation\n\n \n\n\n\n\n\n from fields\n where not coalesce(_fivetran_deleted, false)\n),\n\nfinal as (\n \n select \n *,\n cast( timestamp_trunc(\n cast(occurred_at as timestamp),\n day\n ) as date) as occurred_on,\n to_hex(md5(cast(coalesce(cast(event_id as \n string\n), '') || '-' || coalesce(cast(source_relation as \n string\n), '') as \n string\n))) as unique_event_id\n\n from rename\n\n)\n\nselect * from final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_test_stg_klaviyo`.`stg_klaviyo__event`"}, "model.klaviyo_source.stg_klaviyo__event_tmp": {"raw_sql": "{{\n fivetran_utils.union_data(\n table_identifier='event', \n database_variable='klaviyo_database', \n schema_variable='klaviyo_schema', \n default_database=target.database,\n default_schema='klaviyo',\n default_variable='event_table',\n union_schema_variable='klaviyo_union_schemas',\n union_database_variable='klaviyo_union_databases'\n )\n}}", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.union_data"], "nodes": ["seed.shopify_holistic_reporting_integration_tests.event"]}, "config": {"enabled": true, "alias": null, "schema": "stg_klaviyo", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test_stg_klaviyo", "fqn": ["klaviyo_source", "tmp", "stg_klaviyo__event_tmp"], "unique_id": "model.klaviyo_source.stg_klaviyo__event_tmp", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "tmp/stg_klaviyo__event_tmp.sql", "original_file_path": "models/tmp/stg_klaviyo__event_tmp.sql", "name": "stg_klaviyo__event_tmp", "alias": "stg_klaviyo__event_tmp", "checksum": {"name": "sha256", "checksum": "0aa5096828da6b1f75fb7a93d5f7621f024adb2ef241014a075abae8511fb337"}, "tags": [], "refs": [["event"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/tmp/stg_klaviyo__event_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "stg_klaviyo"}, "created_at": 1665703195.104689, "compiled_sql": "\n\n\n\n select * \n from `dbt-package-testing`.`dbt_test`.`event`\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_test_stg_klaviyo`.`stg_klaviyo__event_tmp`"}, "model.klaviyo_source.stg_klaviyo__metric_tmp": {"raw_sql": "{{\n fivetran_utils.union_data(\n table_identifier='metric', \n database_variable='klaviyo_database', \n schema_variable='klaviyo_schema', \n default_database=target.database,\n default_schema='klaviyo',\n default_variable='metric',\n union_schema_variable='klaviyo_union_schemas',\n union_database_variable='klaviyo_union_databases'\n )\n}}", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.union_data"], "nodes": ["seed.shopify_holistic_reporting_integration_tests.metric"]}, "config": {"enabled": true, "alias": null, "schema": "stg_klaviyo", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test_stg_klaviyo", "fqn": ["klaviyo_source", "tmp", "stg_klaviyo__metric_tmp"], "unique_id": "model.klaviyo_source.stg_klaviyo__metric_tmp", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "tmp/stg_klaviyo__metric_tmp.sql", "original_file_path": "models/tmp/stg_klaviyo__metric_tmp.sql", "name": "stg_klaviyo__metric_tmp", "alias": "stg_klaviyo__metric_tmp", "checksum": {"name": "sha256", "checksum": "1f887542c817cae88b22c9632e93da3ae5fa6c02dadc22e8901484b55e4c5f2d"}, "tags": [], "refs": [["metric"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/tmp/stg_klaviyo__metric_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "stg_klaviyo"}, "created_at": 1665703195.1079738, "compiled_sql": "\n\n\n\n select * \n from `dbt-package-testing`.`dbt_test`.`metric`\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_test_stg_klaviyo`.`stg_klaviyo__metric_tmp`"}, "model.klaviyo_source.stg_klaviyo__campaign_tmp": {"raw_sql": "{{\n fivetran_utils.union_data(\n table_identifier='campaign', \n database_variable='klaviyo_database', \n schema_variable='klaviyo_schema', \n default_database=target.database,\n default_schema='klaviyo',\n default_variable='campaign',\n union_schema_variable='klaviyo_union_schemas',\n union_database_variable='klaviyo_union_databases'\n )\n}}", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.union_data"], "nodes": ["seed.shopify_holistic_reporting_integration_tests.campaign"]}, "config": {"enabled": true, "alias": null, "schema": "stg_klaviyo", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test_stg_klaviyo", "fqn": ["klaviyo_source", "tmp", "stg_klaviyo__campaign_tmp"], "unique_id": "model.klaviyo_source.stg_klaviyo__campaign_tmp", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "tmp/stg_klaviyo__campaign_tmp.sql", "original_file_path": "models/tmp/stg_klaviyo__campaign_tmp.sql", "name": "stg_klaviyo__campaign_tmp", "alias": "stg_klaviyo__campaign_tmp", "checksum": {"name": "sha256", "checksum": "f494e0b1c1093180196545a7c05c0f8f7f8ed074e63328057021091c1d776530"}, "tags": [], "refs": [["campaign"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/tmp/stg_klaviyo__campaign_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "stg_klaviyo"}, "created_at": 1665703195.111306, "compiled_sql": "\n\n\n\n select * \n from `dbt-package-testing`.`dbt_test`.`campaign`\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_test_stg_klaviyo`.`stg_klaviyo__campaign_tmp`"}, "model.klaviyo_source.stg_klaviyo__integration_tmp": {"raw_sql": "{{\n fivetran_utils.union_data(\n table_identifier='integration', \n database_variable='klaviyo_database', \n schema_variable='klaviyo_schema', \n default_database=target.database,\n default_schema='klaviyo',\n default_variable='integration',\n union_schema_variable='klaviyo_union_schemas',\n union_database_variable='klaviyo_union_databases'\n )\n}}", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.union_data"], "nodes": ["seed.shopify_holistic_reporting_integration_tests.integration"]}, "config": {"enabled": true, "alias": null, "schema": "stg_klaviyo", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test_stg_klaviyo", "fqn": ["klaviyo_source", "tmp", "stg_klaviyo__integration_tmp"], "unique_id": "model.klaviyo_source.stg_klaviyo__integration_tmp", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "tmp/stg_klaviyo__integration_tmp.sql", "original_file_path": "models/tmp/stg_klaviyo__integration_tmp.sql", "name": "stg_klaviyo__integration_tmp", "alias": "stg_klaviyo__integration_tmp", "checksum": {"name": "sha256", "checksum": "174b16d87563e123fb0d813d3749c31fb80fc08df48143729e28f34bce0a2e04"}, "tags": [], "refs": [["integration"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/tmp/stg_klaviyo__integration_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "stg_klaviyo"}, "created_at": 1665703195.1145291, "compiled_sql": "\n\n\n\n select * \n from `dbt-package-testing`.`dbt_test`.`integration`\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_test_stg_klaviyo`.`stg_klaviyo__integration_tmp`"}, "model.klaviyo_source.stg_klaviyo__flow_tmp": {"raw_sql": "{{\n fivetran_utils.union_data(\n table_identifier='flow', \n database_variable='klaviyo_database', \n schema_variable='klaviyo_schema', \n default_database=target.database,\n default_schema='klaviyo',\n default_variable='flow',\n union_schema_variable='klaviyo_union_schemas',\n union_database_variable='klaviyo_union_databases'\n )\n}}", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.union_data"], "nodes": ["seed.shopify_holistic_reporting_integration_tests.flow"]}, "config": {"enabled": true, "alias": null, "schema": "stg_klaviyo", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test_stg_klaviyo", "fqn": ["klaviyo_source", "tmp", "stg_klaviyo__flow_tmp"], "unique_id": "model.klaviyo_source.stg_klaviyo__flow_tmp", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "tmp/stg_klaviyo__flow_tmp.sql", "original_file_path": "models/tmp/stg_klaviyo__flow_tmp.sql", "name": "stg_klaviyo__flow_tmp", "alias": "stg_klaviyo__flow_tmp", "checksum": {"name": "sha256", "checksum": "4437a7971622b8cd114313ee2b1a59b992ba862c49f0086851d5d60082617b0c"}, "tags": [], "refs": [["flow"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/tmp/stg_klaviyo__flow_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "stg_klaviyo"}, "created_at": 1665703195.118465, "compiled_sql": "\n\n\n\n select * \n from `dbt-package-testing`.`dbt_test`.`flow`\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_test_stg_klaviyo`.`stg_klaviyo__flow_tmp`"}, "model.klaviyo_source.stg_klaviyo__person_tmp": {"raw_sql": "{{\n fivetran_utils.union_data(\n table_identifier='person', \n database_variable='klaviyo_database', \n schema_variable='klaviyo_schema', \n default_database=target.database,\n default_schema='klaviyo',\n default_variable='person',\n union_schema_variable='klaviyo_union_schemas',\n union_database_variable='klaviyo_union_databases'\n )\n}}", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.union_data"], "nodes": ["seed.shopify_holistic_reporting_integration_tests.person"]}, "config": {"enabled": true, "alias": null, "schema": "stg_klaviyo", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test_stg_klaviyo", "fqn": ["klaviyo_source", "tmp", "stg_klaviyo__person_tmp"], "unique_id": "model.klaviyo_source.stg_klaviyo__person_tmp", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "tmp/stg_klaviyo__person_tmp.sql", "original_file_path": "models/tmp/stg_klaviyo__person_tmp.sql", "name": "stg_klaviyo__person_tmp", "alias": "stg_klaviyo__person_tmp", "checksum": {"name": "sha256", "checksum": "ec768db1c8d1d5eb47e967bf23bb95726133d2a298373f757930302de96e2910"}, "tags": [], "refs": [["person"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/tmp/stg_klaviyo__person_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "stg_klaviyo"}, "created_at": 1665703195.123636, "compiled_sql": "\n\n\n\n select * \n from `dbt-package-testing`.`dbt_test`.`person`\n\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_test_stg_klaviyo`.`stg_klaviyo__person_tmp`"}, "model.klaviyo.klaviyo__person_campaign_flow": {"raw_sql": "with events as (\n select *\n from {{ ref('klaviyo__events') }}\n),\n\npivot_out_events as (\n \n select \n person_id,\n last_touch_campaign_id,\n last_touch_flow_id,\n campaign_name,\n flow_name,\n variation_id,\n source_relation,\n min(occurred_at) as first_event_at,\n max(occurred_at) as last_event_at\n\n -- sum up the numeric value associated with events (most likely will mean revenue)\n {% for rm in var('klaviyo__sum_revenue_metrics') %}\n , sum(case when lower(type) = '{{ rm | lower }}' then \n coalesce({{ fivetran_utils.try_cast(\"numeric_value\", \"numeric\") }}, 0)\n else 0 end) \n as {{ 'sum_revenue_' ~ rm | replace(' ', '_') | replace('(', '') | replace(')', '') | lower }} -- removing special characters that I have seen in different integration events\n {% endfor %}\n\n -- count up the number of instances of each metric\n {% for cm in var('klaviyo__count_metrics') %}\n , sum(case when lower(type) = '{{ cm | lower }}' then 1 else 0 end) \n as {{ 'count_' ~ cm | replace(' ', '_') | replace('(', '') | replace(')', '') | lower }} -- removing special characters that I have seen in different integration events\n {% endfor %}\n\n from events\n {{ dbt_utils.group_by(n=7) }}\n)\n\nselect *\nfrom pivot_out_events", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.try_cast", "macro.dbt_utils.group_by"], "nodes": ["model.klaviyo.klaviyo__events"]}, "config": {"enabled": true, "alias": null, "schema": "klaviyo", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test_klaviyo", "fqn": ["klaviyo", "klaviyo__person_campaign_flow"], "unique_id": "model.klaviyo.klaviyo__person_campaign_flow", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "klaviyo__person_campaign_flow.sql", "original_file_path": "models/klaviyo__person_campaign_flow.sql", "name": "klaviyo__person_campaign_flow", "alias": "klaviyo__person_campaign_flow", "checksum": {"name": "sha256", "checksum": "89abb4c1b2f90ada510aba4f45cb935f457c0e0a776a6f761826e5b270bc7817"}, "tags": [], "refs": [["klaviyo__events"]], "sources": [], "metrics": [], "description": "Table that aggregates event metrics to the person-campaign or -flow grain (but note that if a user interacts with 2 different variations of a flow/campaign somehow, they will have 2 records). Also note that organic interactions (someone with null campaign_id/flow_id) are included in this table. \n**Counts** of the instances of the events, as well as **sums** of the numeric value associated with events (i.e. revenue) will be pivoted out into columns, as configured by the `klaviyo__count_metrics` and `klaviyo__sum_revenue_metrics` variables, respectively. See the dbt_project.yml file for the default metrics used. These columns will be prefixed with `count_` and `sum_revenue_`.\n", "columns": {"person_id": {"name": "person_id", "description": "Foreign key referencing the PERSON who interacted with the flow/message.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_campaign_id": {"name": "last_touch_campaign_id", "description": "Foreign key referencing the CAMPAIGN attributed with these metrics (by the package's attribution model).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_flow_id": {"name": "last_touch_flow_id", "description": "Foreign key referencing the FLOW attributed with these metrics (by the package's attribution model).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_name": {"name": "campaign_name", "description": "A name for this campaign. If not specified, this will default to the subject of the campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_name": {"name": "flow_name", "description": "Name of the flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variation_id": {"name": "variation_id", "description": "Unique ID of the attributed flow or campaign variation group. This does not map onto another table. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_event_at": {"name": "first_event_at", "description": "Timestamp of the first ever interaction between this campaign/flow and a person. In other words, the first event trigger attributed to the campaign/flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_event_at": {"name": "last_event_at", "description": "Timestamp of the most recent interaction between this campaign/flow and a person. In other words, the last event trigger attributed to the campaign/flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_relation": {"name": "source_relation", "description": "The source where this data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioining together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "klaviyo://models/klaviyo.yml", "compiled_path": "target/compiled/klaviyo/models/klaviyo__person_campaign_flow.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "klaviyo"}, "created_at": 1665703195.515933, "compiled_sql": "with events as (\n select *\n from `dbt-package-testing`.`dbt_test_klaviyo`.`klaviyo__events`\n),\n\npivot_out_events as (\n \n select \n person_id,\n last_touch_campaign_id,\n last_touch_flow_id,\n campaign_name,\n flow_name,\n variation_id,\n source_relation,\n min(occurred_at) as first_event_at,\n max(occurred_at) as last_event_at\n\n -- sum up the numeric value associated with events (most likely will mean revenue)\n \n , sum(case when lower(type) = 'refunded order' then \n coalesce(\n \n safe_cast(numeric_value as numeric)\n\n, 0)\n else 0 end) \n as sum_revenue_refunded_order -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'placed order' then \n coalesce(\n \n safe_cast(numeric_value as numeric)\n\n, 0)\n else 0 end) \n as sum_revenue_placed_order -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'ordered product' then \n coalesce(\n \n safe_cast(numeric_value as numeric)\n\n, 0)\n else 0 end) \n as sum_revenue_ordered_product -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'checkout started' then \n coalesce(\n \n safe_cast(numeric_value as numeric)\n\n, 0)\n else 0 end) \n as sum_revenue_checkout_started -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'cancelled order' then \n coalesce(\n \n safe_cast(numeric_value as numeric)\n\n, 0)\n else 0 end) \n as sum_revenue_cancelled_order -- removing special characters that I have seen in different integration events\n \n\n -- count up the number of instances of each metric\n \n , sum(case when lower(type) = 'active on site' then 1 else 0 end) \n as count_active_on_site -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'viewed product' then 1 else 0 end) \n as count_viewed_product -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'ordered product' then 1 else 0 end) \n as count_ordered_product -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'placed order' then 1 else 0 end) \n as count_placed_order -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'refunded order' then 1 else 0 end) \n as count_refunded_order -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'cancelled order' then 1 else 0 end) \n as count_cancelled_order -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'fulfilled order' then 1 else 0 end) \n as count_fulfilled_order -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'received email' then 1 else 0 end) \n as count_received_email -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'clicked email' then 1 else 0 end) \n as count_clicked_email -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'opened email' then 1 else 0 end) \n as count_opened_email -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'bounced email' then 1 else 0 end) \n as count_bounced_email -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'marked email as spam' then 1 else 0 end) \n as count_marked_email_as_spam -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'dropped email' then 1 else 0 end) \n as count_dropped_email -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'subscribed to list' then 1 else 0 end) \n as count_subscribed_to_list -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'unsubscribed to list' then 1 else 0 end) \n as count_unsubscribed_to_list -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'unsubscribed' then 1 else 0 end) \n as count_unsubscribed -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'updated email preferences' then 1 else 0 end) \n as count_updated_email_preferences -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'subscribed to back in stock' then 1 else 0 end) \n as count_subscribed_to_back_in_stock -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'merged profile' then 1 else 0 end) \n as count_merged_profile -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'received sms' then 1 else 0 end) \n as count_received_sms -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'clicked sms' then 1 else 0 end) \n as count_clicked_sms -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'consented to receive sms' then 1 else 0 end) \n as count_consented_to_receive_sms -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'sent sms' then 1 else 0 end) \n as count_sent_sms -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'unsubscribed from sms' then 1 else 0 end) \n as count_unsubscribed_from_sms -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'failed to deliver sms' then 1 else 0 end) \n as count_failed_to_deliver_sms -- removing special characters that I have seen in different integration events\n \n\n from events\n group by 1,2,3,4,5,6,7\n)\n\nselect *\nfrom pivot_out_events", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_test_klaviyo`.`klaviyo__person_campaign_flow`"}, "model.klaviyo.klaviyo__persons": {"raw_sql": "with person as (\n\n select *\n from {{ var('person') }}\n),\n\nperson_metrics as (\n\n select *\n from {{ ref('int_klaviyo__person_metrics') }}\n),\n\nperson_join as (\n\n select\n person.*,\n {{ dbt_utils.star(from=ref('int_klaviyo__person_metrics'), except=[\"person_id\", \"source_relation\"]) }}\n\n from person\n left join person_metrics on (\n person.person_id = person_metrics.person_id\n and person.source_relation = person_metrics.source_relation\n )\n\n)\n\nselect *\nfrom person_join", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": ["model.klaviyo_source.stg_klaviyo__person", "model.klaviyo.int_klaviyo__person_metrics", "model.klaviyo.int_klaviyo__person_metrics"]}, "config": {"enabled": true, "alias": null, "schema": "klaviyo", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test_klaviyo", "fqn": ["klaviyo", "klaviyo__persons"], "unique_id": "model.klaviyo.klaviyo__persons", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "klaviyo__persons.sql", "original_file_path": "models/klaviyo__persons.sql", "name": "klaviyo__persons", "alias": "klaviyo__persons", "checksum": {"name": "sha256", "checksum": "4228e8c8280040f57997ecd7d0cd1c726cee6789721533903c2f75ad6cefc473"}, "tags": [], "refs": [["stg_klaviyo__person"], ["int_klaviyo__person_metrics"], ["int_klaviyo__person_metrics"]], "sources": [], "metrics": [], "description": "Table of unique person profiles, enhanced with event, campaign, flow, and revenue metrics. \n**Counts** of instances of triggered events and **sums** of the numeric value (i.e. revenue) associated with events (total vs organic/not attributed to flows or campaigns) will be pivoted out into columns, as configured by the `klaviyo__count_metrics` and `klaviyo__sum_revenue_metrics`variables, respectively. See the dbt_project.yml file for the default metrics used. These columns will be prefixed with `total_count_`, `total_sum_revenue_` (organic + attributed), and `organic_sum_revenue_` (not attributed to a campaign or flow). \n", "columns": {"person_id": {"name": "person_id", "description": "Unique ID of the user if you use your own unique identifier. Otherwise, Klaviyo recommends using the email as the primary key. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "address_1": {"name": "address_1", "description": "First line of the person's address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "address_2": {"name": "address_2", "description": "Second line of the person's address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "city": {"name": "city", "description": "City they live in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "country": {"name": "country", "description": "Country they live in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "zip": {"name": "zip", "description": "Postal code where they live.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "Timestamp of when the person's profile was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email": {"name": "email", "description": "The email address and the unique identifier for a profile.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "full_name": {"name": "full_name", "description": "Person's full name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "latitude": {"name": "latitude", "description": "Latitude of the person's location.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "longitude": {"name": "longitude", "description": "Longitude of the person's location.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization": {"name": "organization", "description": "Business organization they belong to.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "phone_number": {"name": "phone_number", "description": "Associated phone number.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "region": {"name": "region", "description": "Region or state they live in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "timezone": {"name": "timezone", "description": "Timezone they are situated in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "title": {"name": "title", "description": "Title at their business or organization.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the person profile was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "count_total_campaigns": {"name": "count_total_campaigns", "description": "Count of the number of campaigns this person has interacted with.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "count_total_flows": {"name": "count_total_flows", "description": "Count of the number of flows this person has interacted with.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_event_at": {"name": "first_event_at", "description": "Timestamp of when the user first triggered an event (not limited to campaign and flow interactions).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_event_at": {"name": "last_event_at", "description": "Timestamp of when the user last triggered an event (not limited to campaign and flow interactions).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_campaign_touch_at": {"name": "first_campaign_touch_at", "description": "Timestamp of when the user first interacted with a campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_campaign_touch_at": {"name": "last_campaign_touch_at", "description": "Timestamp of when the user last interacted with a campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_flow_touch_at": {"name": "first_flow_touch_at", "description": "Timestamp of when the user first interacted with a flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_flow_touch_at": {"name": "last_flow_touch_at", "description": "Timestamp of when the user last interacted with a flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_relation": {"name": "source_relation", "description": "The source where this data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioining together multiple sources, this will be an empty string.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "klaviyo://models/klaviyo.yml", "compiled_path": "target/compiled/klaviyo/models/klaviyo__persons.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "klaviyo"}, "created_at": 1665703195.5247061, "compiled_sql": "with person as (\n\n select *\n from `dbt-package-testing`.`dbt_test_stg_klaviyo`.`stg_klaviyo__person`\n),\n\nperson_metrics as (\n\n select *\n from `dbt-package-testing`.`dbt_test_int_klaviyo`.`int_klaviyo__person_metrics`\n),\n\nperson_join as (\n\n select\n person.*,\n \n\n `count_total_campaigns`,\n `count_total_flows`,\n `first_event_at`,\n `last_event_at`,\n `first_campaign_touch_at`,\n `last_campaign_touch_at`,\n `first_flow_touch_at`,\n `last_flow_touch_at`,\n `total_sum_revenue_refunded_order`,\n `organic_sum_revenue_refunded_order`,\n `total_sum_revenue_placed_order`,\n `organic_sum_revenue_placed_order`,\n `total_sum_revenue_ordered_product`,\n `organic_sum_revenue_ordered_product`,\n `total_sum_revenue_checkout_started`,\n `organic_sum_revenue_checkout_started`,\n `total_sum_revenue_cancelled_order`,\n `organic_sum_revenue_cancelled_order`,\n `total_count_active_on_site`,\n `total_count_viewed_product`,\n `total_count_ordered_product`,\n `total_count_placed_order`,\n `total_count_refunded_order`,\n `total_count_cancelled_order`,\n `total_count_fulfilled_order`,\n `total_count_received_email`,\n `total_count_clicked_email`,\n `total_count_opened_email`,\n `total_count_bounced_email`,\n `total_count_marked_email_as_spam`,\n `total_count_dropped_email`,\n `total_count_subscribed_to_list`,\n `total_count_unsubscribed_to_list`,\n `total_count_unsubscribed`,\n `total_count_updated_email_preferences`,\n `total_count_subscribed_to_back_in_stock`,\n `total_count_merged_profile`,\n `total_count_received_sms`,\n `total_count_clicked_sms`,\n `total_count_consented_to_receive_sms`,\n `total_count_sent_sms`,\n `total_count_unsubscribed_from_sms`,\n `total_count_failed_to_deliver_sms`\n\n from person\n left join person_metrics on (\n person.person_id = person_metrics.person_id\n and person.source_relation = person_metrics.source_relation\n )\n\n)\n\nselect *\nfrom person_join", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_test_klaviyo`.`klaviyo__persons`"}, "model.klaviyo.klaviyo__flows": {"raw_sql": "with flow as (\n\n select *\n from {{ var('flow') }}\n),\n\nflow_metrics as (\n\n select *\n from {{ ref('int_klaviyo__campaign_flow_metrics') }}\n),\n\nflow_join as (\n \n {% set exclude_fields = ['last_touch_campaign_id', 'last_touch_flow_id', 'source_relation'] %}\n\n select\n flow.*, -- has flow_id and source_relation\n {{ dbt_utils.star(from=ref('int_klaviyo__campaign_flow_metrics'), except=exclude_fields) }}\n\n from flow\n left join flow_metrics on (\n flow.flow_id = flow_metrics.last_touch_flow_id\n and\n flow.source_relation = flow_metrics.source_relation\n )\n),\n\nfinal as (\n\n select \n *,\n {{ dbt_utils.surrogate_key(['flow_id','variation_id']) }} as flow_variation_key\n\n from flow_join\n)\n\nselect *\nfrom final", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt_utils.star", "macro.dbt_utils.surrogate_key"], "nodes": ["model.klaviyo_source.stg_klaviyo__flow", "model.klaviyo.int_klaviyo__campaign_flow_metrics", "model.klaviyo.int_klaviyo__campaign_flow_metrics"]}, "config": {"enabled": true, "alias": null, "schema": "klaviyo", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test_klaviyo", "fqn": ["klaviyo", "klaviyo__flows"], "unique_id": "model.klaviyo.klaviyo__flows", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "klaviyo__flows.sql", "original_file_path": "models/klaviyo__flows.sql", "name": "klaviyo__flows", "alias": "klaviyo__flows", "checksum": {"name": "sha256", "checksum": "e51636d4194dd04fc1bd023c6aa0a982fa517a29f6734d611756bda94c123e0e"}, "tags": [], "refs": [["stg_klaviyo__flow"], ["int_klaviyo__campaign_flow_metrics"], ["int_klaviyo__campaign_flow_metrics"]], "sources": [], "metrics": [], "description": "Table of unique flow versions. A flow with 2 variations will have 2 distinct rows. **Counts** of the unique users and instances of the events, as well as **sums** of the numeric value associated with events (i.e. revenue) will be pivoted out into columns, as configured by the `klaviyo__count_metrics` and `klaviyo__sum_revenue_metrics` variables, respectively. See the dbt_project.yml file for the default metrics used. These columns will be prefixed with `count_`, `unique_count_`, and `sum_revenue_`.\n", "columns": {"flow_variation_key": {"name": "flow_variation_key", "description": "Unique key hashed on the flow and variation IDs.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "Timestamp of when the flow was first created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_id": {"name": "flow_id", "description": "Unique ID of the flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_name": {"name": "flow_name", "description": "Name of the flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status": {"name": "status", "description": "Current status of the flow. Either 'manual', 'live', or 'draft'. Read more [here](https://help.klaviyo.com/hc/en-us/articles/115002774932-Getting-Started-with-Flows#the-flow-action-status9).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_trigger": {"name": "flow_trigger", "description": "JSON of metric, segment, list, and/or date-property filters that will trigger this flow. These are applied to the **event level**.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the flow was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "person_filter": {"name": "person_filter", "description": "JSON of flow filters placed on the **person level** that will trigger this flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variation_id": {"name": "variation_id", "description": "Unique ID of the attributed flow variation group. This does not map onto another table. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_count_unique_people": {"name": "total_count_unique_people", "description": "The count of the distinct people that have interacted with this flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_event_at": {"name": "first_event_at", "description": "Timestamp of the first ever interaction between this flow and a person.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_event_at": {"name": "last_event_at", "description": "Timestamp of the most recent interaction between this flow and a person.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_relation": {"name": "source_relation", "description": "The source where this data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioining together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "klaviyo://models/klaviyo.yml", "compiled_path": "target/compiled/klaviyo/models/klaviyo__flows.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "klaviyo"}, "created_at": 1665703195.5208042, "compiled_sql": "with flow as (\n\n select *\n from `dbt-package-testing`.`dbt_test_stg_klaviyo`.`stg_klaviyo__flow`\n),\n\nflow_metrics as (\n\n select *\n from `dbt-package-testing`.`dbt_test_int_klaviyo`.`int_klaviyo__campaign_flow_metrics`\n),\n\nflow_join as (\n \n \n\n select\n flow.*, -- has flow_id and source_relation\n \n\n `variation_id`,\n `total_count_unique_people`,\n `first_event_at`,\n `last_event_at`,\n `sum_revenue_refunded_order`,\n `sum_revenue_placed_order`,\n `sum_revenue_ordered_product`,\n `sum_revenue_checkout_started`,\n `sum_revenue_cancelled_order`,\n `count_active_on_site`,\n `unique_count_active_on_site`,\n `count_viewed_product`,\n `unique_count_viewed_product`,\n `count_ordered_product`,\n `unique_count_ordered_product`,\n `count_placed_order`,\n `unique_count_placed_order`,\n `count_refunded_order`,\n `unique_count_refunded_order`,\n `count_cancelled_order`,\n `unique_count_cancelled_order`,\n `count_fulfilled_order`,\n `unique_count_fulfilled_order`,\n `count_received_email`,\n `unique_count_received_email`,\n `count_clicked_email`,\n `unique_count_clicked_email`,\n `count_opened_email`,\n `unique_count_opened_email`,\n `count_bounced_email`,\n `unique_count_bounced_email`,\n `count_marked_email_as_spam`,\n `unique_count_marked_email_as_spam`,\n `count_dropped_email`,\n `unique_count_dropped_email`,\n `count_subscribed_to_list`,\n `unique_count_subscribed_to_list`,\n `count_unsubscribed_to_list`,\n `unique_count_unsubscribed_to_list`,\n `count_unsubscribed`,\n `unique_count_unsubscribed`,\n `count_updated_email_preferences`,\n `unique_count_updated_email_preferences`,\n `count_subscribed_to_back_in_stock`,\n `unique_count_subscribed_to_back_in_stock`,\n `count_merged_profile`,\n `unique_count_merged_profile`,\n `count_received_sms`,\n `unique_count_received_sms`,\n `count_clicked_sms`,\n `unique_count_clicked_sms`,\n `count_consented_to_receive_sms`,\n `unique_count_consented_to_receive_sms`,\n `count_sent_sms`,\n `unique_count_sent_sms`,\n `count_unsubscribed_from_sms`,\n `unique_count_unsubscribed_from_sms`,\n `count_failed_to_deliver_sms`,\n `unique_count_failed_to_deliver_sms`\n\n from flow\n left join flow_metrics on (\n flow.flow_id = flow_metrics.last_touch_flow_id\n and\n flow.source_relation = flow_metrics.source_relation\n )\n),\n\nfinal as (\n\n select \n *,\n to_hex(md5(cast(coalesce(cast(flow_id as \n string\n), '') || '-' || coalesce(cast(variation_id as \n string\n), '') as \n string\n))) as flow_variation_key\n\n from flow_join\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_test_klaviyo`.`klaviyo__flows`"}, "model.klaviyo.klaviyo__campaigns": {"raw_sql": "with campaign as (\n\n select *\n from {{ var('campaign') }}\n),\n\ncampaign_metrics as (\n\n select *\n from {{ ref('int_klaviyo__campaign_flow_metrics') }}\n),\n\ncampaign_join as (\n \n {% set exclude_fields = [ 'last_touch_campaign_id', 'last_touch_flow_id', 'source_relation'] %}\n\n select\n campaign.*, -- has campaign_id and source_relation\n {{ dbt_utils.star(from=ref('int_klaviyo__campaign_flow_metrics'), except=exclude_fields) }}\n\n from campaign\n left join campaign_metrics on (\n campaign.campaign_id = campaign_metrics.last_touch_campaign_id\n and\n campaign.source_relation = campaign_metrics.source_relation\n )\n),\n\nfinal as (\n\n select \n *,\n {{ dbt_utils.surrogate_key(['campaign_id','variation_id']) }} as campaign_variation_key\n\n from campaign_join\n)\n\nselect *\nfrom final", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt_utils.star", "macro.dbt_utils.surrogate_key"], "nodes": ["model.klaviyo_source.stg_klaviyo__campaign", "model.klaviyo.int_klaviyo__campaign_flow_metrics", "model.klaviyo.int_klaviyo__campaign_flow_metrics"]}, "config": {"enabled": true, "alias": null, "schema": "klaviyo", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test_klaviyo", "fqn": ["klaviyo", "klaviyo__campaigns"], "unique_id": "model.klaviyo.klaviyo__campaigns", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "klaviyo__campaigns.sql", "original_file_path": "models/klaviyo__campaigns.sql", "name": "klaviyo__campaigns", "alias": "klaviyo__campaigns", "checksum": {"name": "sha256", "checksum": "3f86c2f589802530165ac6e6244681db0f42091784c29a6ae17b752f5ed4cd6f"}, "tags": [], "refs": [["stg_klaviyo__campaign"], ["int_klaviyo__campaign_flow_metrics"], ["int_klaviyo__campaign_flow_metrics"]], "sources": [], "metrics": [], "description": "Table of unique campaign versions. A campaign with 2 variations will have 2 distinct rows. **Counts** of the unique users and instances of the events, as well as **sums** of the numeric value associated with events (i.e. revenue) will be pivoted out into columns, as configured by the `klaviyo__count_metrics` and `klaviyo__sum_revenue_metrics` variables, respectively. See the dbt_project.yml file for the default metrics used. These columns will be prefixed with `count_`, `unique_count_`, and `sum_revenue_`.\n", "columns": {"campaign_variation_key": {"name": "campaign_variation_key", "description": "Unique key hashed on the campaign and variation IDs.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_type": {"name": "campaign_type", "description": "Type of campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "Timestamp of when the campaign was created, in UTC.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email_template_id": {"name": "email_template_id", "description": "Foreign key referencing the ID of the `email_template` object that will be the content of this campaign. Note the Email Template is copied when creating this campaign, so future changes to that Email Template will not alter the content of this campaign.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "from_email": {"name": "from_email", "description": "The email address your email will be sent from and will be used in the reply-to header.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "from_name": {"name": "from_name", "description": "The name or label associated with the email address you're sending from.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Unique ID of the campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_segmented": {"name": "is_segmented", "description": "Boolean that is true if the campaign is directed at a Klaviyo segment (not a list).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_name": {"name": "campaign_name", "description": "A name for this campaign. If not specified, this will default to the subject of the campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "scheduled_to_send_at": {"name": "scheduled_to_send_at", "description": "Timestamp of when the campaign is scheduled to be sent in the future, if [\"smart send time\"](https://help.klaviyo.com/hc/en-us/articles/360029794371-Smart-Send-Time-in-Klaviyo#how-to-utilize-smart-send-time3) is used. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "sent_at": {"name": "sent_at", "description": "Timestamp of when the campaign was first sent out to users.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status": {"name": "status", "description": "Current status of the campaign. Either \"draft\", \"scheduled\", \"sent\", or \"cancelled\".", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status_id": {"name": "status_id", "description": "Corresponding ID to the current status.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "subject": {"name": "subject", "description": "The subject line of the campaign's email.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the campaign was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variation_id": {"name": "variation_id", "description": "Unique ID of the attributed campaign variation group. This does not map onto another table. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_count_unique_people": {"name": "total_count_unique_people", "description": "The count of the distinct people that have interacted with this campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_event_at": {"name": "first_event_at", "description": "Timestamp of the first ever interaction between this campaign and a person.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_event_at": {"name": "last_event_at", "description": "Timestamp of the most recent interaction between this campaign and a person.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_relation": {"name": "source_relation", "description": "The source where this data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioining together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "klaviyo://models/klaviyo.yml", "compiled_path": "target/compiled/klaviyo/models/klaviyo__campaigns.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "klaviyo"}, "created_at": 1665703195.518867, "compiled_sql": "with campaign as (\n\n select *\n from `dbt-package-testing`.`dbt_test_stg_klaviyo`.`stg_klaviyo__campaign`\n),\n\ncampaign_metrics as (\n\n select *\n from `dbt-package-testing`.`dbt_test_int_klaviyo`.`int_klaviyo__campaign_flow_metrics`\n),\n\ncampaign_join as (\n \n \n\n select\n campaign.*, -- has campaign_id and source_relation\n \n\n `variation_id`,\n `total_count_unique_people`,\n `first_event_at`,\n `last_event_at`,\n `sum_revenue_refunded_order`,\n `sum_revenue_placed_order`,\n `sum_revenue_ordered_product`,\n `sum_revenue_checkout_started`,\n `sum_revenue_cancelled_order`,\n `count_active_on_site`,\n `unique_count_active_on_site`,\n `count_viewed_product`,\n `unique_count_viewed_product`,\n `count_ordered_product`,\n `unique_count_ordered_product`,\n `count_placed_order`,\n `unique_count_placed_order`,\n `count_refunded_order`,\n `unique_count_refunded_order`,\n `count_cancelled_order`,\n `unique_count_cancelled_order`,\n `count_fulfilled_order`,\n `unique_count_fulfilled_order`,\n `count_received_email`,\n `unique_count_received_email`,\n `count_clicked_email`,\n `unique_count_clicked_email`,\n `count_opened_email`,\n `unique_count_opened_email`,\n `count_bounced_email`,\n `unique_count_bounced_email`,\n `count_marked_email_as_spam`,\n `unique_count_marked_email_as_spam`,\n `count_dropped_email`,\n `unique_count_dropped_email`,\n `count_subscribed_to_list`,\n `unique_count_subscribed_to_list`,\n `count_unsubscribed_to_list`,\n `unique_count_unsubscribed_to_list`,\n `count_unsubscribed`,\n `unique_count_unsubscribed`,\n `count_updated_email_preferences`,\n `unique_count_updated_email_preferences`,\n `count_subscribed_to_back_in_stock`,\n `unique_count_subscribed_to_back_in_stock`,\n `count_merged_profile`,\n `unique_count_merged_profile`,\n `count_received_sms`,\n `unique_count_received_sms`,\n `count_clicked_sms`,\n `unique_count_clicked_sms`,\n `count_consented_to_receive_sms`,\n `unique_count_consented_to_receive_sms`,\n `count_sent_sms`,\n `unique_count_sent_sms`,\n `count_unsubscribed_from_sms`,\n `unique_count_unsubscribed_from_sms`,\n `count_failed_to_deliver_sms`,\n `unique_count_failed_to_deliver_sms`\n\n from campaign\n left join campaign_metrics on (\n campaign.campaign_id = campaign_metrics.last_touch_campaign_id\n and\n campaign.source_relation = campaign_metrics.source_relation\n )\n),\n\nfinal as (\n\n select \n *,\n to_hex(md5(cast(coalesce(cast(campaign_id as \n string\n), '') || '-' || coalesce(cast(variation_id as \n string\n), '') as \n string\n))) as campaign_variation_key\n\n from campaign_join\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_test_klaviyo`.`klaviyo__campaigns`"}, "model.klaviyo.klaviyo__events": {"raw_sql": "{{\n config(\n materialized='incremental',\n unique_key='unique_event_id',\n partition_by={\n \"field\": \"occurred_on\",\n \"data_type\": \"date\"\n } if target.type == 'bigquery' else none,\n incremental_strategy = 'merge' if target.type not in ('snowflake', 'postgres', 'redshift') else 'delete+insert',\n file_format = 'delta'\n )\n}}\n-- ^ the incremental strategy is split into delete+insert for snowflake since there is a bit of\n-- overlap in transformed data blocks for incremental runs (we look back an extra hour, see lines 23 - 30)\n-- this configuration solution was taken from https://docs.getdbt.com/reference/resource-configs/snowflake-configs#merge-behavior-incremental-models\n\nwith events as (\n\n select *\n from {{ ref('int_klaviyo__event_attribution') }}\n\n {% if is_incremental() %}\n\n -- most events (from all kinds of integrations) at least once every hour\n where _fivetran_synced >= cast(coalesce( \n (\n select {{ dbt_utils.dateadd(datepart = 'hour', \n interval = -1,\n from_date_or_timestamp = 'max(_fivetran_synced)' ) }} \n from {{ this }}\n ), '2012-01-01') as {{ dbt_utils.type_timestamp() }} ) -- klaviyo was founded in 2012, so let's default the min date to then\n {% endif %}\n),\n\nevent_fields as (\n\n -- excluding some fields to rename them and/or make them null if needed\n {% set exclude_fields = ['touch_session', 'last_touch_id', 'session_start_at', 'session_event_type', 'type', 'session_touch_type'] %}\n -- as of the patch release of dbt-utils v0.7.3, the snowflake uppercasing is not needed anymore so we have deleted the snowflake conditional in the exclusion\n\n select \n {{ dbt_utils.star(from=ref('int_klaviyo__event_attribution'), except=exclude_fields) }},\n\n type, -- need to pull this out because it gets removed by dbt_utils.star, due to being a substring of 'session_event_type' and 'session_touch_type'\n\n -- split out campaign and flow IDs\n case \n when session_touch_type = 'campaign' then last_touch_id \n else null end as last_touch_campaign_id,\n case \n when session_touch_type = 'flow' then last_touch_id \n else null end as last_touch_flow_id,\n\n -- only make these non-null if the event indeed qualified for attribution\n case \n when last_touch_id is not null then session_start_at \n else null end as last_touch_at,\n case \n when last_touch_id is not null then session_event_type \n else null end as last_touch_event_type,\n case \n when last_touch_id is not null then session_touch_type \n else null end as last_touch_type -- flow vs campaign\n\n \n from events\n),\n\ncampaign as (\n\n select *\n from {{ var('campaign') }}\n),\n\nflow as (\n\n select *\n from {{ var('flow') }}\n),\n\nperson as (\n\n select *\n from {{ var('person') }}\n),\n\n-- just pulling this to join with INTEGRATION\nmetric as (\n\n select *\n from {{ var('metric') }}\n),\n\nintegration as (\n\n select *\n from {{ var('integration') }}\n),\n\njoin_fields as (\n\n select\n event_fields.*,\n campaign.campaign_name,\n campaign.campaign_type,\n campaign.subject as campaign_subject_line,\n flow.flow_name, \n person.city as person_city,\n person.country as person_country,\n person.region as person_region,\n person.email as person_email,\n person.timezone as person_timezone,\n integration.integration_name,\n integration.category as integration_category\n\n from event_fields\n left join campaign on (\n event_fields.last_touch_campaign_id = campaign.campaign_id\n and\n event_fields.source_relation = campaign.source_relation\n )\n left join flow on (\n event_fields.last_touch_flow_id = flow.flow_id\n and\n event_fields.source_relation = flow.source_relation \n )\n left join person on (\n event_fields.person_id = person.person_id\n and\n event_fields.source_relation = person.source_relation\n )\n left join metric on (\n event_fields.metric_id = metric.metric_id\n and\n event_fields.source_relation = metric.source_relation\n )\n left join integration on (\n metric.integration_id = integration.integration_id\n and\n metric.source_relation = integration.source_relation\n )\n)\n\nselect * from join_fields", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt.is_incremental", "macro.dbt_utils.star", "macro.dbt_utils.dateadd", "macro.dbt_utils.type_timestamp"], "nodes": ["model.klaviyo.int_klaviyo__event_attribution", "model.klaviyo.int_klaviyo__event_attribution", "model.klaviyo_source.stg_klaviyo__campaign", "model.klaviyo_source.stg_klaviyo__flow", "model.klaviyo_source.stg_klaviyo__person", "model.klaviyo_source.stg_klaviyo__metric", "model.klaviyo_source.stg_klaviyo__integration"]}, "config": {"enabled": true, "alias": null, "schema": "klaviyo", "database": null, "tags": [], "meta": {}, "materialized": "incremental", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": "unique_event_id", "on_schema_change": "ignore", "grants": {}, "partition_by": {"field": "occurred_on", "data_type": "date"}, "incremental_strategy": "merge", "file_format": "delta", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test_klaviyo", "fqn": ["klaviyo", "klaviyo__events"], "unique_id": "model.klaviyo.klaviyo__events", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "klaviyo__events.sql", "original_file_path": "models/klaviyo__events.sql", "name": "klaviyo__events", "alias": "klaviyo__events", "checksum": {"name": "sha256", "checksum": "57d9d0880b095c3d94680250844b52ad63a63755b2b25870f6ba491933308951"}, "tags": [], "refs": [["int_klaviyo__event_attribution"], ["int_klaviyo__event_attribution"], ["stg_klaviyo__campaign"], ["stg_klaviyo__flow"], ["stg_klaviyo__person"], ["stg_klaviyo__metric"], ["stg_klaviyo__integration"]], "sources": [], "metrics": [], "description": "Table of Klaviyo events, enriched with attribution data (see `int_klaviyo__event_attribution` for details), and information regarding the event's associated user, flow, campaign, and platform/integration. \nNote: this model has an incremental materialization. Custom event-columns specified by the `klaviyo__event_pass_through_columns` variable will appear here as well.\n", "columns": {"variation_id": {"name": "variation_id", "description": "Unique ID of the attributed flow or campaign variation group. This does not map onto another table. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Foreign key referencing the CAMPAIGN that the event is attributed to.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "occurred_at": {"name": "occurred_at", "description": "Timestamp of when the event was triggered.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_id": {"name": "flow_id", "description": "Foreign key referencing the FLOW that the event is attributed to.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_message_id": {"name": "flow_message_id", "description": "Unique ID of the FLOW_MESSAGE that the event is attributed to. This does not map onto another table.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "event_id": {"name": "event_id", "description": "Unique ID of the event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "metric_id": {"name": "metric_id", "description": "Foreign key referencing the metric being captured.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "person_id": {"name": "person_id", "description": "Foreign key referencing the PERSON who triggered the event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "type": {"name": "type", "description": "Type of event that was triggered. This is the same as the METRIC name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "uuid": {"name": "uuid", "description": "Universally Unique Identifier of the event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "numeric_value": {"name": "numeric_value", "description": "Numeric value associated with the event (ie the dollars associated with a purchase).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "touch_type": {"name": "touch_type", "description": "Type of touch/message that the event itself is already attributed to in Klaviyo. Either 'flow', 'campaign', or null. Note that the package will refer to campaign and flow interactions as \"touches\".\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "occurred_on": {"name": "occurred_on", "description": "Calendar date (UTC) on which the event occurred.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "touch_id": {"name": "touch_id", "description": "Coalescing of the Klaviyo-attributed campaign_id and flow_id.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_at": {"name": "last_touch_at", "description": "Timestamp of when, relative to the current event, this person last interacted with a campaign or flow according to Klaviyo. This will be null if the event is not attributed to any flow or campaign. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_event_type": {"name": "last_touch_event_type", "description": "The type of event through which, relative to the current event, the person last interacted with a campaign or flow. This information is used to determine which lookback window to use (email vs sms). This will be null if the event is not attributed to any flow or campaign.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_type": {"name": "last_touch_type", "description": "What kind of touch the event was attributed to by the package -- 'campaign', 'flow', or null.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_campaign_id": {"name": "last_touch_campaign_id", "description": "Foreign key referencing the CAMPAIGN that the event is attributed to by the package.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_flow_id": {"name": "last_touch_flow_id", "description": "Foreign key referencing the FLOW that the event is attributed to by the package.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_name": {"name": "campaign_name", "description": "A name for this campaign. If not specified, this will default to the subject of the campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_type": {"name": "campaign_type", "description": "Type of campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_subject_line": {"name": "campaign_subject_line", "description": "Type of campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_name": {"name": "flow_name", "description": "Name of the flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "person_city": {"name": "person_city", "description": "City that the person who triggered this event lives in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "person_country": {"name": "person_country", "description": "Country that the person who triggered this event lives in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "person_region": {"name": "person_region", "description": "Region or state that the person who triggered this event lives in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "person_email": {"name": "person_email", "description": "The email address and the unique identifier for the person who triggered the event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "person_timezone": {"name": "person_timezone", "description": "Timezone that the person who triggered this event is situated in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "integration_name": {"name": "integration_name", "description": "Name of the platform that triggered the event (either Klaviyo, the API, or another integration).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "integration_category": {"name": "integration_category", "description": "Use-case category of the platform that sent the event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "UTC Timestamp that indicates the start time of the Fivetran job that synced this event row.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "unique_event_id": {"name": "unique_event_id", "description": "The unique identifier for the combination of event_id and source_relation columns.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_relation": {"name": "source_relation", "description": "The source where this data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioining together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "klaviyo://models/klaviyo.yml", "compiled_path": "target/compiled/klaviyo/models/klaviyo__events.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "incremental", "schema": "klaviyo", "unique_key": "unique_event_id", "partition_by": {"field": "occurred_on", "data_type": "date"}, "incremental_strategy": "merge", "file_format": "delta"}, "created_at": 1665703195.5140622, "compiled_sql": "\n-- ^ the incremental strategy is split into delete+insert for snowflake since there is a bit of\n-- overlap in transformed data blocks for incremental runs (we look back an extra hour, see lines 23 - 30)\n-- this configuration solution was taken from https://docs.getdbt.com/reference/resource-configs/snowflake-configs#merge-behavior-incremental-models\n\nwith events as (\n\n select *\n from `dbt-package-testing`.`dbt_test_int_klaviyo`.`int_klaviyo__event_attribution`\n\n \n\n -- most events (from all kinds of integrations) at least once every hour\n where _fivetran_synced >= cast(coalesce( \n (\n select \n\n datetime_add(\n cast( max(_fivetran_synced) as datetime),\n interval -1 hour\n )\n\n \n from `dbt-package-testing`.`dbt_test_klaviyo`.`klaviyo__events`\n ), '2012-01-01') as \n timestamp\n ) -- klaviyo was founded in 2012, so let's default the min date to then\n \n),\n\nevent_fields as (\n\n -- excluding some fields to rename them and/or make them null if needed\n \n -- as of the patch release of dbt-utils v0.7.3, the snowflake uppercasing is not needed anymore so we have deleted the snowflake conditional in the exclusion\n\n select \n \n\n `variation_id`,\n `campaign_id`,\n `occurred_at`,\n `flow_id`,\n `flow_message_id`,\n `event_id`,\n `metric_id`,\n `person_id`,\n `uuid`,\n `numeric_value`,\n `_fivetran_synced`,\n `source_relation`,\n `occurred_on`,\n `unique_event_id`,\n `touch_id`,\n `touch_type`,\n\n type, -- need to pull this out because it gets removed by dbt_utils.star, due to being a substring of 'session_event_type' and 'session_touch_type'\n\n -- split out campaign and flow IDs\n case \n when session_touch_type = 'campaign' then last_touch_id \n else null end as last_touch_campaign_id,\n case \n when session_touch_type = 'flow' then last_touch_id \n else null end as last_touch_flow_id,\n\n -- only make these non-null if the event indeed qualified for attribution\n case \n when last_touch_id is not null then session_start_at \n else null end as last_touch_at,\n case \n when last_touch_id is not null then session_event_type \n else null end as last_touch_event_type,\n case \n when last_touch_id is not null then session_touch_type \n else null end as last_touch_type -- flow vs campaign\n\n \n from events\n),\n\ncampaign as (\n\n select *\n from `dbt-package-testing`.`dbt_test_stg_klaviyo`.`stg_klaviyo__campaign`\n),\n\nflow as (\n\n select *\n from `dbt-package-testing`.`dbt_test_stg_klaviyo`.`stg_klaviyo__flow`\n),\n\nperson as (\n\n select *\n from `dbt-package-testing`.`dbt_test_stg_klaviyo`.`stg_klaviyo__person`\n),\n\n-- just pulling this to join with INTEGRATION\nmetric as (\n\n select *\n from `dbt-package-testing`.`dbt_test_stg_klaviyo`.`stg_klaviyo__metric`\n),\n\nintegration as (\n\n select *\n from `dbt-package-testing`.`dbt_test_stg_klaviyo`.`stg_klaviyo__integration`\n),\n\njoin_fields as (\n\n select\n event_fields.*,\n campaign.campaign_name,\n campaign.campaign_type,\n campaign.subject as campaign_subject_line,\n flow.flow_name, \n person.city as person_city,\n person.country as person_country,\n person.region as person_region,\n person.email as person_email,\n person.timezone as person_timezone,\n integration.integration_name,\n integration.category as integration_category\n\n from event_fields\n left join campaign on (\n event_fields.last_touch_campaign_id = campaign.campaign_id\n and\n event_fields.source_relation = campaign.source_relation\n )\n left join flow on (\n event_fields.last_touch_flow_id = flow.flow_id\n and\n event_fields.source_relation = flow.source_relation \n )\n left join person on (\n event_fields.person_id = person.person_id\n and\n event_fields.source_relation = person.source_relation\n )\n left join metric on (\n event_fields.metric_id = metric.metric_id\n and\n event_fields.source_relation = metric.source_relation\n )\n left join integration on (\n metric.integration_id = integration.integration_id\n and\n metric.source_relation = integration.source_relation\n )\n)\n\nselect * from join_fields", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_test_klaviyo`.`klaviyo__events`"}, "model.klaviyo.int_klaviyo__campaign_flow_metrics": {"raw_sql": "with person_campaign_flow as (\n\n select *\n from {{ ref('klaviyo__person_campaign_flow') }}\n),\n\n{%- set pcf_columns = adapter.get_columns_in_relation(ref('klaviyo__person_campaign_flow')) %}\n\n-- aggregating to the campaign/flow - variation level. so a flow with A/B versions will have 2 rows\nagg_metrics as (\n\n select\n last_touch_campaign_id,\n last_touch_flow_id,\n variation_id,\n source_relation,\n count(distinct person_id) as total_count_unique_people,\n min(first_event_at) as first_event_at,\n max(last_event_at) as last_event_at\n \n {% for col in pcf_columns if col.name|lower not in ['last_touch_campaign_id', 'person_id', 'last_touch_flow_id', 'source_relation',\n 'campaign_name', 'flow_name','variation_id', 'first_event_at', 'last_event_at'] %}\n -- sum up any person-level metrics to the flow/campaign level\n , sum( {{ col.name }} ) as {{ col.name }}\n\n {% if 'sum_revenue' not in col.name|lower %} -- only look at 'count' metrics for unique people counts\n -- get unique number of people who did each kind of event\n -- each record in person_campaign_flow is at the person-campaign/flow-variation level, \n -- so we can just sum up 0s and 1s to get totals at the campaign/flow-variation grain.\n , sum(case when {{ col.name }} > 0 then 1 else 0 end) as {{ 'unique_' ~ col.name }}\n\n {% endif %}\n {% endfor -%}\n\n from person_campaign_flow\n group by 1,2,3,4\n)\n\nselect * from agg_metrics", "compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["model.klaviyo.klaviyo__person_campaign_flow", "model.klaviyo.klaviyo__person_campaign_flow"]}, "config": {"enabled": true, "alias": null, "schema": "int_klaviyo", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test_int_klaviyo", "fqn": ["klaviyo", "intermediate", "int_klaviyo__campaign_flow_metrics"], "unique_id": "model.klaviyo.int_klaviyo__campaign_flow_metrics", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "intermediate/int_klaviyo__campaign_flow_metrics.sql", "original_file_path": "models/intermediate/int_klaviyo__campaign_flow_metrics.sql", "name": "int_klaviyo__campaign_flow_metrics", "alias": "int_klaviyo__campaign_flow_metrics", "checksum": {"name": "sha256", "checksum": "05f2223e2d8ab2cbcb57045b3008aee2e9c74f1803cb5e3b658b8b92b7b22e9d"}, "tags": [], "refs": [["klaviyo__person_campaign_flow"], ["klaviyo__person_campaign_flow"]], "sources": [], "metrics": [], "description": "Table that draws from the `klaviyo__person_campaign_flow` model to aggregate event metrics to the campaign or flow AND variation grain. A campaign with A/B versions will have 2 records. **Counts** of the unique users and instances of the events, as well as **sums** of the numeric value associated with events (i.e. revenue) will be pivoted out into columns, as configured by the `klaviyo__count_metrics` and `klaviyo__sum_revenue_metrics` variables, respectively. See the dbt_project.yml file for the default metrics used. These columns will be prefixed with `count_`, `unique_count_`, and `sum_revenue_`.\n", "columns": {"last_touch_campaign_id": {"name": "last_touch_campaign_id", "description": "Foreign key referencing the CAMPAIGN attributed with these metrics (by the package's attribution model).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_flow_id": {"name": "last_touch_flow_id", "description": "Foreign key referencing the FLOW attributed with these metrics (by the package's attribution model).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variation_id": {"name": "variation_id", "description": "Unique ID of the attributed flow or campaign variation group. This does not map onto another table. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_count_unique_people": {"name": "total_count_unique_people", "description": "The count of the distinct people that have interacted with this campaign or flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_event_at": {"name": "first_event_at", "description": "Timestamp of the first ever interaction between this campaign/flow and a person.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_event_at": {"name": "last_event_at", "description": "Timestamp of the most recent interaction between this campaign/flow and a person.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_relation": {"name": "source_relation", "description": "The source where this data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioining together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "klaviyo://models/intermediate/int_klaviyo.yml", "compiled_path": "target/compiled/klaviyo/models/intermediate/int_klaviyo__campaign_flow_metrics.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "int_klaviyo"}, "created_at": 1665703195.5553238, "compiled_sql": "with person_campaign_flow as (\n\n select *\n from `dbt-package-testing`.`dbt_test_klaviyo`.`klaviyo__person_campaign_flow`\n),\n\n-- aggregating to the campaign/flow - variation level. so a flow with A/B versions will have 2 rows\nagg_metrics as (\n\n select\n last_touch_campaign_id,\n last_touch_flow_id,\n variation_id,\n source_relation,\n count(distinct person_id) as total_count_unique_people,\n min(first_event_at) as first_event_at,\n max(last_event_at) as last_event_at\n \n \n -- sum up any person-level metrics to the flow/campaign level\n , sum( sum_revenue_refunded_order ) as sum_revenue_refunded_order\n\n \n \n -- sum up any person-level metrics to the flow/campaign level\n , sum( sum_revenue_placed_order ) as sum_revenue_placed_order\n\n \n \n -- sum up any person-level metrics to the flow/campaign level\n , sum( sum_revenue_ordered_product ) as sum_revenue_ordered_product\n\n \n \n -- sum up any person-level metrics to the flow/campaign level\n , sum( sum_revenue_checkout_started ) as sum_revenue_checkout_started\n\n \n \n -- sum up any person-level metrics to the flow/campaign level\n , sum( sum_revenue_cancelled_order ) as sum_revenue_cancelled_order\n\n \n \n -- sum up any person-level metrics to the flow/campaign level\n , sum( count_active_on_site ) as count_active_on_site\n\n -- only look at 'count' metrics for unique people counts\n -- get unique number of people who did each kind of event\n -- each record in person_campaign_flow is at the person-campaign/flow-variation level, \n -- so we can just sum up 0s and 1s to get totals at the campaign/flow-variation grain.\n , sum(case when count_active_on_site > 0 then 1 else 0 end) as unique_count_active_on_site\n\n \n \n -- sum up any person-level metrics to the flow/campaign level\n , sum( count_viewed_product ) as count_viewed_product\n\n -- only look at 'count' metrics for unique people counts\n -- get unique number of people who did each kind of event\n -- each record in person_campaign_flow is at the person-campaign/flow-variation level, \n -- so we can just sum up 0s and 1s to get totals at the campaign/flow-variation grain.\n , sum(case when count_viewed_product > 0 then 1 else 0 end) as unique_count_viewed_product\n\n \n \n -- sum up any person-level metrics to the flow/campaign level\n , sum( count_ordered_product ) as count_ordered_product\n\n -- only look at 'count' metrics for unique people counts\n -- get unique number of people who did each kind of event\n -- each record in person_campaign_flow is at the person-campaign/flow-variation level, \n -- so we can just sum up 0s and 1s to get totals at the campaign/flow-variation grain.\n , sum(case when count_ordered_product > 0 then 1 else 0 end) as unique_count_ordered_product\n\n \n \n -- sum up any person-level metrics to the flow/campaign level\n , sum( count_placed_order ) as count_placed_order\n\n -- only look at 'count' metrics for unique people counts\n -- get unique number of people who did each kind of event\n -- each record in person_campaign_flow is at the person-campaign/flow-variation level, \n -- so we can just sum up 0s and 1s to get totals at the campaign/flow-variation grain.\n , sum(case when count_placed_order > 0 then 1 else 0 end) as unique_count_placed_order\n\n \n \n -- sum up any person-level metrics to the flow/campaign level\n , sum( count_refunded_order ) as count_refunded_order\n\n -- only look at 'count' metrics for unique people counts\n -- get unique number of people who did each kind of event\n -- each record in person_campaign_flow is at the person-campaign/flow-variation level, \n -- so we can just sum up 0s and 1s to get totals at the campaign/flow-variation grain.\n , sum(case when count_refunded_order > 0 then 1 else 0 end) as unique_count_refunded_order\n\n \n \n -- sum up any person-level metrics to the flow/campaign level\n , sum( count_cancelled_order ) as count_cancelled_order\n\n -- only look at 'count' metrics for unique people counts\n -- get unique number of people who did each kind of event\n -- each record in person_campaign_flow is at the person-campaign/flow-variation level, \n -- so we can just sum up 0s and 1s to get totals at the campaign/flow-variation grain.\n , sum(case when count_cancelled_order > 0 then 1 else 0 end) as unique_count_cancelled_order\n\n \n \n -- sum up any person-level metrics to the flow/campaign level\n , sum( count_fulfilled_order ) as count_fulfilled_order\n\n -- only look at 'count' metrics for unique people counts\n -- get unique number of people who did each kind of event\n -- each record in person_campaign_flow is at the person-campaign/flow-variation level, \n -- so we can just sum up 0s and 1s to get totals at the campaign/flow-variation grain.\n , sum(case when count_fulfilled_order > 0 then 1 else 0 end) as unique_count_fulfilled_order\n\n \n \n -- sum up any person-level metrics to the flow/campaign level\n , sum( count_received_email ) as count_received_email\n\n -- only look at 'count' metrics for unique people counts\n -- get unique number of people who did each kind of event\n -- each record in person_campaign_flow is at the person-campaign/flow-variation level, \n -- so we can just sum up 0s and 1s to get totals at the campaign/flow-variation grain.\n , sum(case when count_received_email > 0 then 1 else 0 end) as unique_count_received_email\n\n \n \n -- sum up any person-level metrics to the flow/campaign level\n , sum( count_clicked_email ) as count_clicked_email\n\n -- only look at 'count' metrics for unique people counts\n -- get unique number of people who did each kind of event\n -- each record in person_campaign_flow is at the person-campaign/flow-variation level, \n -- so we can just sum up 0s and 1s to get totals at the campaign/flow-variation grain.\n , sum(case when count_clicked_email > 0 then 1 else 0 end) as unique_count_clicked_email\n\n \n \n -- sum up any person-level metrics to the flow/campaign level\n , sum( count_opened_email ) as count_opened_email\n\n -- only look at 'count' metrics for unique people counts\n -- get unique number of people who did each kind of event\n -- each record in person_campaign_flow is at the person-campaign/flow-variation level, \n -- so we can just sum up 0s and 1s to get totals at the campaign/flow-variation grain.\n , sum(case when count_opened_email > 0 then 1 else 0 end) as unique_count_opened_email\n\n \n \n -- sum up any person-level metrics to the flow/campaign level\n , sum( count_bounced_email ) as count_bounced_email\n\n -- only look at 'count' metrics for unique people counts\n -- get unique number of people who did each kind of event\n -- each record in person_campaign_flow is at the person-campaign/flow-variation level, \n -- so we can just sum up 0s and 1s to get totals at the campaign/flow-variation grain.\n , sum(case when count_bounced_email > 0 then 1 else 0 end) as unique_count_bounced_email\n\n \n \n -- sum up any person-level metrics to the flow/campaign level\n , sum( count_marked_email_as_spam ) as count_marked_email_as_spam\n\n -- only look at 'count' metrics for unique people counts\n -- get unique number of people who did each kind of event\n -- each record in person_campaign_flow is at the person-campaign/flow-variation level, \n -- so we can just sum up 0s and 1s to get totals at the campaign/flow-variation grain.\n , sum(case when count_marked_email_as_spam > 0 then 1 else 0 end) as unique_count_marked_email_as_spam\n\n \n \n -- sum up any person-level metrics to the flow/campaign level\n , sum( count_dropped_email ) as count_dropped_email\n\n -- only look at 'count' metrics for unique people counts\n -- get unique number of people who did each kind of event\n -- each record in person_campaign_flow is at the person-campaign/flow-variation level, \n -- so we can just sum up 0s and 1s to get totals at the campaign/flow-variation grain.\n , sum(case when count_dropped_email > 0 then 1 else 0 end) as unique_count_dropped_email\n\n \n \n -- sum up any person-level metrics to the flow/campaign level\n , sum( count_subscribed_to_list ) as count_subscribed_to_list\n\n -- only look at 'count' metrics for unique people counts\n -- get unique number of people who did each kind of event\n -- each record in person_campaign_flow is at the person-campaign/flow-variation level, \n -- so we can just sum up 0s and 1s to get totals at the campaign/flow-variation grain.\n , sum(case when count_subscribed_to_list > 0 then 1 else 0 end) as unique_count_subscribed_to_list\n\n \n \n -- sum up any person-level metrics to the flow/campaign level\n , sum( count_unsubscribed_to_list ) as count_unsubscribed_to_list\n\n -- only look at 'count' metrics for unique people counts\n -- get unique number of people who did each kind of event\n -- each record in person_campaign_flow is at the person-campaign/flow-variation level, \n -- so we can just sum up 0s and 1s to get totals at the campaign/flow-variation grain.\n , sum(case when count_unsubscribed_to_list > 0 then 1 else 0 end) as unique_count_unsubscribed_to_list\n\n \n \n -- sum up any person-level metrics to the flow/campaign level\n , sum( count_unsubscribed ) as count_unsubscribed\n\n -- only look at 'count' metrics for unique people counts\n -- get unique number of people who did each kind of event\n -- each record in person_campaign_flow is at the person-campaign/flow-variation level, \n -- so we can just sum up 0s and 1s to get totals at the campaign/flow-variation grain.\n , sum(case when count_unsubscribed > 0 then 1 else 0 end) as unique_count_unsubscribed\n\n \n \n -- sum up any person-level metrics to the flow/campaign level\n , sum( count_updated_email_preferences ) as count_updated_email_preferences\n\n -- only look at 'count' metrics for unique people counts\n -- get unique number of people who did each kind of event\n -- each record in person_campaign_flow is at the person-campaign/flow-variation level, \n -- so we can just sum up 0s and 1s to get totals at the campaign/flow-variation grain.\n , sum(case when count_updated_email_preferences > 0 then 1 else 0 end) as unique_count_updated_email_preferences\n\n \n \n -- sum up any person-level metrics to the flow/campaign level\n , sum( count_subscribed_to_back_in_stock ) as count_subscribed_to_back_in_stock\n\n -- only look at 'count' metrics for unique people counts\n -- get unique number of people who did each kind of event\n -- each record in person_campaign_flow is at the person-campaign/flow-variation level, \n -- so we can just sum up 0s and 1s to get totals at the campaign/flow-variation grain.\n , sum(case when count_subscribed_to_back_in_stock > 0 then 1 else 0 end) as unique_count_subscribed_to_back_in_stock\n\n \n \n -- sum up any person-level metrics to the flow/campaign level\n , sum( count_merged_profile ) as count_merged_profile\n\n -- only look at 'count' metrics for unique people counts\n -- get unique number of people who did each kind of event\n -- each record in person_campaign_flow is at the person-campaign/flow-variation level, \n -- so we can just sum up 0s and 1s to get totals at the campaign/flow-variation grain.\n , sum(case when count_merged_profile > 0 then 1 else 0 end) as unique_count_merged_profile\n\n \n \n -- sum up any person-level metrics to the flow/campaign level\n , sum( count_received_sms ) as count_received_sms\n\n -- only look at 'count' metrics for unique people counts\n -- get unique number of people who did each kind of event\n -- each record in person_campaign_flow is at the person-campaign/flow-variation level, \n -- so we can just sum up 0s and 1s to get totals at the campaign/flow-variation grain.\n , sum(case when count_received_sms > 0 then 1 else 0 end) as unique_count_received_sms\n\n \n \n -- sum up any person-level metrics to the flow/campaign level\n , sum( count_clicked_sms ) as count_clicked_sms\n\n -- only look at 'count' metrics for unique people counts\n -- get unique number of people who did each kind of event\n -- each record in person_campaign_flow is at the person-campaign/flow-variation level, \n -- so we can just sum up 0s and 1s to get totals at the campaign/flow-variation grain.\n , sum(case when count_clicked_sms > 0 then 1 else 0 end) as unique_count_clicked_sms\n\n \n \n -- sum up any person-level metrics to the flow/campaign level\n , sum( count_consented_to_receive_sms ) as count_consented_to_receive_sms\n\n -- only look at 'count' metrics for unique people counts\n -- get unique number of people who did each kind of event\n -- each record in person_campaign_flow is at the person-campaign/flow-variation level, \n -- so we can just sum up 0s and 1s to get totals at the campaign/flow-variation grain.\n , sum(case when count_consented_to_receive_sms > 0 then 1 else 0 end) as unique_count_consented_to_receive_sms\n\n \n \n -- sum up any person-level metrics to the flow/campaign level\n , sum( count_sent_sms ) as count_sent_sms\n\n -- only look at 'count' metrics for unique people counts\n -- get unique number of people who did each kind of event\n -- each record in person_campaign_flow is at the person-campaign/flow-variation level, \n -- so we can just sum up 0s and 1s to get totals at the campaign/flow-variation grain.\n , sum(case when count_sent_sms > 0 then 1 else 0 end) as unique_count_sent_sms\n\n \n \n -- sum up any person-level metrics to the flow/campaign level\n , sum( count_unsubscribed_from_sms ) as count_unsubscribed_from_sms\n\n -- only look at 'count' metrics for unique people counts\n -- get unique number of people who did each kind of event\n -- each record in person_campaign_flow is at the person-campaign/flow-variation level, \n -- so we can just sum up 0s and 1s to get totals at the campaign/flow-variation grain.\n , sum(case when count_unsubscribed_from_sms > 0 then 1 else 0 end) as unique_count_unsubscribed_from_sms\n\n \n \n -- sum up any person-level metrics to the flow/campaign level\n , sum( count_failed_to_deliver_sms ) as count_failed_to_deliver_sms\n\n -- only look at 'count' metrics for unique people counts\n -- get unique number of people who did each kind of event\n -- each record in person_campaign_flow is at the person-campaign/flow-variation level, \n -- so we can just sum up 0s and 1s to get totals at the campaign/flow-variation grain.\n , sum(case when count_failed_to_deliver_sms > 0 then 1 else 0 end) as unique_count_failed_to_deliver_sms\n\n \n from person_campaign_flow\n group by 1,2,3,4\n)\n\nselect * from agg_metrics", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_test_int_klaviyo`.`int_klaviyo__campaign_flow_metrics`"}, "model.klaviyo.int_klaviyo__person_metrics": {"raw_sql": "with person_campaign_flow as (\n\n select *\n from {{ ref('klaviyo__person_campaign_flow') }}\n),\n\n{%- set pcf_columns = adapter.get_columns_in_relation(ref('klaviyo__person_campaign_flow')) %}\n\nagg_metrics as (\n\n select\n person_id,\n source_relation,\n count(distinct last_touch_campaign_id) as count_total_campaigns,\n count(distinct last_touch_flow_id) as count_total_flows,\n min(first_event_at) as first_event_at, -- first ever event occurred at\n max(last_event_at) as last_event_at, -- last ever event occurred at\n min(distinct case when last_touch_campaign_id is not null then first_event_at end) as first_campaign_touch_at,\n max(distinct case when last_touch_campaign_id is not null then last_event_at end) as last_campaign_touch_at,\n min(distinct case when last_touch_flow_id is not null then first_event_at end) as first_flow_touch_at,\n max(distinct case when last_touch_flow_id is not null then last_event_at end) as last_flow_touch_at\n\n {% for col in pcf_columns if col.name|lower not in ['last_touch_campaign_id', 'person_id', 'last_touch_flow_id', 'source_relation',\n 'campaign_name', 'flow_name','variation_id', 'first_event_at', 'last_event_at'] %}\n -- sum up any count/sum_revenue metrics -> prefix with `total` since we're pulling out organic sums as well\n , sum( {{ col.name }} ) as {{ 'total_' ~ col.name }}\n\n -- let's pull out the organic (not attributed to a flow or campaign) revenue sums\n {% if 'sum_revenue' in col.name|lower %}\n , sum( case when coalesce(last_touch_campaign_id, last_touch_flow_id) is null then {{ col.name }} else 0 end ) as {{ 'organic_' ~ col.name }}\n {% endif %}\n\n {% endfor -%}\n\n from person_campaign_flow\n group by 1,2\n\n)\n\nselect * from agg_metrics", "compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["model.klaviyo.klaviyo__person_campaign_flow", "model.klaviyo.klaviyo__person_campaign_flow"]}, "config": {"enabled": true, "alias": null, "schema": "int_klaviyo", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test_int_klaviyo", "fqn": ["klaviyo", "intermediate", "int_klaviyo__person_metrics"], "unique_id": "model.klaviyo.int_klaviyo__person_metrics", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "intermediate/int_klaviyo__person_metrics.sql", "original_file_path": "models/intermediate/int_klaviyo__person_metrics.sql", "name": "int_klaviyo__person_metrics", "alias": "int_klaviyo__person_metrics", "checksum": {"name": "sha256", "checksum": "a17b4d3bfd7f6a19bc40dc8199f22c30594994645f31cc2bd72280e8ac429259"}, "tags": [], "refs": [["klaviyo__person_campaign_flow"], ["klaviyo__person_campaign_flow"]], "sources": [], "metrics": [], "description": "Table that draws from the `klaviyo__person_campaign_flow` model to aggregate event metrics to the person grain. \n**Counts** of instances of the events and **sums** of the numeric value (i.e. revenue) associated with events (total vs organic/not attributed to flows or campaigns) will be pivoted out into columns, as configured by the `klaviyo__count_metrics` and `klaviyo__sum_revenue_metrics`variables, respectively. See the dbt_project.yml file for the default metrics used. \nThese columns will be prefixed with `total_count_`, `total_sum_revenue_` (organic + attributed), and `organic_sum_revenue_` (not attributed to a campaign or flow). \n", "columns": {"person_id": {"name": "person_id", "description": "Unique ID of the person.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "count_total_campaigns": {"name": "count_total_campaigns", "description": "Count of the number of campaigns this person has interacted with.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "count_total_flows": {"name": "count_total_flows", "description": "Count of the number of flows this person has interacted with.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_event_at": {"name": "first_event_at", "description": "Timestamp of when the user first triggered an event (not limited to campaign and flow interactions).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_event_at": {"name": "last_event_at", "description": "Timestamp of when the user last triggered an event (not limited to campaign and flow interactions).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_campaign_touch_at": {"name": "first_campaign_touch_at", "description": "Timestamp of when the user first interacted with a campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_campaign_touch_at": {"name": "last_campaign_touch_at", "description": "Timestamp of when the user last interacted with a campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_flow_touch_at": {"name": "first_flow_touch_at", "description": "Timestamp of when the user first interacted with a flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_flow_touch_at": {"name": "last_flow_touch_at", "description": "Timestamp of when the user last interacted with a flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_relation": {"name": "source_relation", "description": "The source where this data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioining together multiple sources, this will be an empty string.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "klaviyo://models/intermediate/int_klaviyo.yml", "compiled_path": "target/compiled/klaviyo/models/intermediate/int_klaviyo__person_metrics.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "int_klaviyo"}, "created_at": 1665703195.5571148, "compiled_sql": "with person_campaign_flow as (\n\n select *\n from `dbt-package-testing`.`dbt_test_klaviyo`.`klaviyo__person_campaign_flow`\n),\n\nagg_metrics as (\n\n select\n person_id,\n source_relation,\n count(distinct last_touch_campaign_id) as count_total_campaigns,\n count(distinct last_touch_flow_id) as count_total_flows,\n min(first_event_at) as first_event_at, -- first ever event occurred at\n max(last_event_at) as last_event_at, -- last ever event occurred at\n min(distinct case when last_touch_campaign_id is not null then first_event_at end) as first_campaign_touch_at,\n max(distinct case when last_touch_campaign_id is not null then last_event_at end) as last_campaign_touch_at,\n min(distinct case when last_touch_flow_id is not null then first_event_at end) as first_flow_touch_at,\n max(distinct case when last_touch_flow_id is not null then last_event_at end) as last_flow_touch_at\n\n \n -- sum up any count/sum_revenue metrics -> prefix with `total` since we're pulling out organic sums as well\n , sum( sum_revenue_refunded_order ) as total_sum_revenue_refunded_order\n\n -- let's pull out the organic (not attributed to a flow or campaign) revenue sums\n \n , sum( case when coalesce(last_touch_campaign_id, last_touch_flow_id) is null then sum_revenue_refunded_order else 0 end ) as organic_sum_revenue_refunded_order\n \n\n \n -- sum up any count/sum_revenue metrics -> prefix with `total` since we're pulling out organic sums as well\n , sum( sum_revenue_placed_order ) as total_sum_revenue_placed_order\n\n -- let's pull out the organic (not attributed to a flow or campaign) revenue sums\n \n , sum( case when coalesce(last_touch_campaign_id, last_touch_flow_id) is null then sum_revenue_placed_order else 0 end ) as organic_sum_revenue_placed_order\n \n\n \n -- sum up any count/sum_revenue metrics -> prefix with `total` since we're pulling out organic sums as well\n , sum( sum_revenue_ordered_product ) as total_sum_revenue_ordered_product\n\n -- let's pull out the organic (not attributed to a flow or campaign) revenue sums\n \n , sum( case when coalesce(last_touch_campaign_id, last_touch_flow_id) is null then sum_revenue_ordered_product else 0 end ) as organic_sum_revenue_ordered_product\n \n\n \n -- sum up any count/sum_revenue metrics -> prefix with `total` since we're pulling out organic sums as well\n , sum( sum_revenue_checkout_started ) as total_sum_revenue_checkout_started\n\n -- let's pull out the organic (not attributed to a flow or campaign) revenue sums\n \n , sum( case when coalesce(last_touch_campaign_id, last_touch_flow_id) is null then sum_revenue_checkout_started else 0 end ) as organic_sum_revenue_checkout_started\n \n\n \n -- sum up any count/sum_revenue metrics -> prefix with `total` since we're pulling out organic sums as well\n , sum( sum_revenue_cancelled_order ) as total_sum_revenue_cancelled_order\n\n -- let's pull out the organic (not attributed to a flow or campaign) revenue sums\n \n , sum( case when coalesce(last_touch_campaign_id, last_touch_flow_id) is null then sum_revenue_cancelled_order else 0 end ) as organic_sum_revenue_cancelled_order\n \n\n \n -- sum up any count/sum_revenue metrics -> prefix with `total` since we're pulling out organic sums as well\n , sum( count_active_on_site ) as total_count_active_on_site\n\n -- let's pull out the organic (not attributed to a flow or campaign) revenue sums\n \n\n \n -- sum up any count/sum_revenue metrics -> prefix with `total` since we're pulling out organic sums as well\n , sum( count_viewed_product ) as total_count_viewed_product\n\n -- let's pull out the organic (not attributed to a flow or campaign) revenue sums\n \n\n \n -- sum up any count/sum_revenue metrics -> prefix with `total` since we're pulling out organic sums as well\n , sum( count_ordered_product ) as total_count_ordered_product\n\n -- let's pull out the organic (not attributed to a flow or campaign) revenue sums\n \n\n \n -- sum up any count/sum_revenue metrics -> prefix with `total` since we're pulling out organic sums as well\n , sum( count_placed_order ) as total_count_placed_order\n\n -- let's pull out the organic (not attributed to a flow or campaign) revenue sums\n \n\n \n -- sum up any count/sum_revenue metrics -> prefix with `total` since we're pulling out organic sums as well\n , sum( count_refunded_order ) as total_count_refunded_order\n\n -- let's pull out the organic (not attributed to a flow or campaign) revenue sums\n \n\n \n -- sum up any count/sum_revenue metrics -> prefix with `total` since we're pulling out organic sums as well\n , sum( count_cancelled_order ) as total_count_cancelled_order\n\n -- let's pull out the organic (not attributed to a flow or campaign) revenue sums\n \n\n \n -- sum up any count/sum_revenue metrics -> prefix with `total` since we're pulling out organic sums as well\n , sum( count_fulfilled_order ) as total_count_fulfilled_order\n\n -- let's pull out the organic (not attributed to a flow or campaign) revenue sums\n \n\n \n -- sum up any count/sum_revenue metrics -> prefix with `total` since we're pulling out organic sums as well\n , sum( count_received_email ) as total_count_received_email\n\n -- let's pull out the organic (not attributed to a flow or campaign) revenue sums\n \n\n \n -- sum up any count/sum_revenue metrics -> prefix with `total` since we're pulling out organic sums as well\n , sum( count_clicked_email ) as total_count_clicked_email\n\n -- let's pull out the organic (not attributed to a flow or campaign) revenue sums\n \n\n \n -- sum up any count/sum_revenue metrics -> prefix with `total` since we're pulling out organic sums as well\n , sum( count_opened_email ) as total_count_opened_email\n\n -- let's pull out the organic (not attributed to a flow or campaign) revenue sums\n \n\n \n -- sum up any count/sum_revenue metrics -> prefix with `total` since we're pulling out organic sums as well\n , sum( count_bounced_email ) as total_count_bounced_email\n\n -- let's pull out the organic (not attributed to a flow or campaign) revenue sums\n \n\n \n -- sum up any count/sum_revenue metrics -> prefix with `total` since we're pulling out organic sums as well\n , sum( count_marked_email_as_spam ) as total_count_marked_email_as_spam\n\n -- let's pull out the organic (not attributed to a flow or campaign) revenue sums\n \n\n \n -- sum up any count/sum_revenue metrics -> prefix with `total` since we're pulling out organic sums as well\n , sum( count_dropped_email ) as total_count_dropped_email\n\n -- let's pull out the organic (not attributed to a flow or campaign) revenue sums\n \n\n \n -- sum up any count/sum_revenue metrics -> prefix with `total` since we're pulling out organic sums as well\n , sum( count_subscribed_to_list ) as total_count_subscribed_to_list\n\n -- let's pull out the organic (not attributed to a flow or campaign) revenue sums\n \n\n \n -- sum up any count/sum_revenue metrics -> prefix with `total` since we're pulling out organic sums as well\n , sum( count_unsubscribed_to_list ) as total_count_unsubscribed_to_list\n\n -- let's pull out the organic (not attributed to a flow or campaign) revenue sums\n \n\n \n -- sum up any count/sum_revenue metrics -> prefix with `total` since we're pulling out organic sums as well\n , sum( count_unsubscribed ) as total_count_unsubscribed\n\n -- let's pull out the organic (not attributed to a flow or campaign) revenue sums\n \n\n \n -- sum up any count/sum_revenue metrics -> prefix with `total` since we're pulling out organic sums as well\n , sum( count_updated_email_preferences ) as total_count_updated_email_preferences\n\n -- let's pull out the organic (not attributed to a flow or campaign) revenue sums\n \n\n \n -- sum up any count/sum_revenue metrics -> prefix with `total` since we're pulling out organic sums as well\n , sum( count_subscribed_to_back_in_stock ) as total_count_subscribed_to_back_in_stock\n\n -- let's pull out the organic (not attributed to a flow or campaign) revenue sums\n \n\n \n -- sum up any count/sum_revenue metrics -> prefix with `total` since we're pulling out organic sums as well\n , sum( count_merged_profile ) as total_count_merged_profile\n\n -- let's pull out the organic (not attributed to a flow or campaign) revenue sums\n \n\n \n -- sum up any count/sum_revenue metrics -> prefix with `total` since we're pulling out organic sums as well\n , sum( count_received_sms ) as total_count_received_sms\n\n -- let's pull out the organic (not attributed to a flow or campaign) revenue sums\n \n\n \n -- sum up any count/sum_revenue metrics -> prefix with `total` since we're pulling out organic sums as well\n , sum( count_clicked_sms ) as total_count_clicked_sms\n\n -- let's pull out the organic (not attributed to a flow or campaign) revenue sums\n \n\n \n -- sum up any count/sum_revenue metrics -> prefix with `total` since we're pulling out organic sums as well\n , sum( count_consented_to_receive_sms ) as total_count_consented_to_receive_sms\n\n -- let's pull out the organic (not attributed to a flow or campaign) revenue sums\n \n\n \n -- sum up any count/sum_revenue metrics -> prefix with `total` since we're pulling out organic sums as well\n , sum( count_sent_sms ) as total_count_sent_sms\n\n -- let's pull out the organic (not attributed to a flow or campaign) revenue sums\n \n\n \n -- sum up any count/sum_revenue metrics -> prefix with `total` since we're pulling out organic sums as well\n , sum( count_unsubscribed_from_sms ) as total_count_unsubscribed_from_sms\n\n -- let's pull out the organic (not attributed to a flow or campaign) revenue sums\n \n\n \n -- sum up any count/sum_revenue metrics -> prefix with `total` since we're pulling out organic sums as well\n , sum( count_failed_to_deliver_sms ) as total_count_failed_to_deliver_sms\n\n -- let's pull out the organic (not attributed to a flow or campaign) revenue sums\n \n\n from person_campaign_flow\n group by 1,2\n\n)\n\nselect * from agg_metrics", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_test_int_klaviyo`.`int_klaviyo__person_metrics`"}, "model.klaviyo.int_klaviyo__event_attribution": {"raw_sql": "{{\n config(\n materialized='incremental',\n unique_key='unique_event_id',\n partition_by={\n \"field\": \"occurred_on\",\n \"data_type\": \"date\"\n } if target.type == 'bigquery' else none,\n incremental_strategy = 'merge' if target.type not in ('postgres', 'redshift') else 'delete+insert',\n file_format = 'delta'\n )\n}}\n\nwith events as (\n\n select \n *,\n -- no event will be attributed to both a campaign and flow\n coalesce(campaign_id, flow_id) as touch_id,\n case \n when campaign_id is not null then 'campaign' \n when flow_id is not null then 'flow' \n else null end as touch_type -- defintion: touch = interaction with campaign/flow\n\n from {{ var('event_table') }}\n\n {% if is_incremental() %}\n -- grab **ALL** events for users who have any events in this new increment\n where person_id in (\n\n select distinct person_id\n from {{ var('event_table') }}\n\n -- most events (from all kinds of integrations) at least once every hour\n -- https://help.klaviyo.com/hc/en-us/articles/115005253208\n where _fivetran_synced >= cast(coalesce( \n (\n select {{ dbt_utils.dateadd(datepart = 'hour', \n interval = -1,\n from_date_or_timestamp = 'max(_fivetran_synced)' ) }} \n from {{ this }}\n ), '2012-01-01') as {{ dbt_utils.type_timestamp() }} ) -- klaviyo was founded in 2012, so let's default the min date to then\n )\n {% endif %}\n),\n\n-- sessionize events based on attribution eligibility -- is it the right kind of event, and does it have a campaign or flow?\ncreate_sessions as (\n select\n *,\n -- default klaviyo__event_attribution_filter limits attribution-eligible events to to email opens, email clicks, and sms opens\n -- https://help.klaviyo.com/hc/en-us/articles/115005248128\n\n -- events that come with flow/campaign attributions (and are eligible event types) will create new sessions.\n -- non-attributed events that come in afterward will be batched into the same attribution-session\n sum(case when touch_id is not null\n {% if var('klaviyo__eligible_attribution_events') != [] %}\n and lower(type) in {{ \"('\" ~ (var('klaviyo__eligible_attribution_events') | join(\"', '\")) ~ \"')\" }}\n {% endif %}\n then 1 else 0 end) over (\n partition by person_id, source_relation order by occurred_at asc rows between unbounded preceding and current row) as touch_session \n\n from events\n\n),\n\n-- \"session start\" refers to the event in a \"touch session\" that is already attributed with a campaign or flow by Klaviyo\n-- a new event that is attributed with a campaign/flow will trigger a new session, so there will only be one already-attributed event per each session \n-- events that are missing attributions will borrow data from the event that triggered the session, if they are in the lookback window (see `attribute` CTE)\nlast_touches as (\n\n select \n *,\n -- when did the touch session begin?\n min(occurred_at) over(partition by person_id, source_relation, touch_session) as session_start_at,\n\n -- get the kind of metric/event that triggered the attribution session, in order to decide \n -- to use the sms or email lookback value. \n first_value(type) over(\n partition by person_id, source_relation, touch_session order by occurred_at asc rows between unbounded preceding and current row) as session_event_type\n\n from create_sessions\n),\n\nattribute as (\n\n select \n *,\n -- klaviyo uses different lookback windows for email and sms events\n -- default email lookback = 5 days (120 hours) -> https://help.klaviyo.com/hc/en-us/articles/115005248128#conversion-tracking1\n -- default sms lookback: 1 day (24 hours -> https://help.klaviyo.com/hc/en-us/articles/115005248128#sms-conversion-tracking7\n\n coalesce(touch_id, -- use pre-attributed flow/campaign if provided\n case \n when {{ dbt_utils.datediff('session_start_at', 'occurred_at', 'hour') }} <= (\n case \n when lower(session_event_type) like '%sms%' then {{ var('klaviyo__sms_attribution_lookback') }}\n else {{ var('klaviyo__email_attribution_lookback') }} end\n ) -- if the events fall within the lookback window, attribute\n then first_value(touch_id) over (\n partition by person_id, source_relation, touch_session order by occurred_at asc rows between unbounded preceding and current row)\n else null end) as last_touch_id -- session qualified for attribution -> we will call this \"last touch\"\n\n from last_touches \n),\n\nfinal as (\n\n select\n *,\n\n -- get whether the event is attributed to a flow or campaign\n coalesce(touch_type, first_value(touch_type) over(\n partition by person_id, source_relation, touch_session order by occurred_at asc rows between unbounded preceding and current row)) \n\n as session_touch_type -- if the session events qualified for attribution, extract the type of touch they are attributed to\n\n from attribute \n)\n\nselect * from final", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt.is_incremental", "macro.dbt_utils.datediff", "macro.dbt_utils.dateadd", "macro.dbt_utils.type_timestamp"], "nodes": ["model.klaviyo_source.stg_klaviyo__event"]}, "config": {"enabled": true, "alias": null, "schema": "int_klaviyo", "database": null, "tags": [], "meta": {}, "materialized": "incremental", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": "unique_event_id", "on_schema_change": "ignore", "grants": {}, "partition_by": {"field": "occurred_on", "data_type": "date"}, "incremental_strategy": "merge", "file_format": "delta", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test_int_klaviyo", "fqn": ["klaviyo", "intermediate", "int_klaviyo__event_attribution"], "unique_id": "model.klaviyo.int_klaviyo__event_attribution", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "intermediate/int_klaviyo__event_attribution.sql", "original_file_path": "models/intermediate/int_klaviyo__event_attribution.sql", "name": "int_klaviyo__event_attribution", "alias": "int_klaviyo__event_attribution", "checksum": {"name": "sha256", "checksum": "0f50b3c667fde764eb0671135da6a44202089275d90ab399b5583c33bc71613e"}, "tags": [], "refs": [["stg_klaviyo__event"]], "sources": [], "metrics": [], "description": "Table enriching events with an additional layer of last-touch attribution. Though Klaviyo already performs attribution on events each day, this extra step is necessary, as certain kinds of events/metrics never get attributed to flows or campaigns via Klaviyo's internal model. \nBy default, the package performs attribution [in line with Klaviyo](https://help.klaviyo.com/hc/en-us/articles/115005248128). It considers email opens and clicks, and SMS opens as the events eligible to be credited with conversions. This attribution-eligibility can be configured by the `klaviyo__eligible_attribution_events` variable. Note that this refers to the events eligible to credit campaigns and flows with conversions, _not_ the events eligible to receive attribution (all kinds of events are privy to this).\nSimilar to Klaviyo, the package by default considers the conversion period/lookback window for email events to be 120 hours (5 days) and 24 hours for SMS events. These can be configured through the `klaviyo__email_attribution_lookback` and `klaviyo__sms_attribution_lookback` variables, respectively (in integer-hours).\nNote: this model has an incremental materialization. Custom event-columns specified by the `klaviyo__event_pass_through_columns` variable will appear here as well.\n", "columns": {"variation_id": {"name": "variation_id", "description": "Unique ID of the attributed flow or campaign variation group. This does not map onto another table. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Foreign key referencing the CAMPAIGN that the event is attributed to.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "occurred_at": {"name": "occurred_at", "description": "Timestamp of when the event was triggered.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_id": {"name": "flow_id", "description": "Foreign key referencing the FLOW that the event is attributed to.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_message_id": {"name": "flow_message_id", "description": "Unique ID of the FLOW_MESSAGE that the event is attributed to. This does not map onto another table.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "event_id": {"name": "event_id", "description": "Unique ID of the event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "metric_id": {"name": "metric_id", "description": "Foreign key referencing the metric being captured.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "person_id": {"name": "person_id", "description": "Foreign key referencing the PERSON who triggered the event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "type": {"name": "type", "description": "Type of event that was triggered. This is the same as the METRIC name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "uuid": {"name": "uuid", "description": "Universally Unique Identifier of the event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "numeric_value": {"name": "numeric_value", "description": "Numeric value associated with the event (ie the dollars associated with a purchase).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "touch_type": {"name": "touch_type", "description": "Type of touch/message that the event itself is already attributed to in Klaviyo. Either 'flow', 'campaign', or null. Note that the package will refer to campaign and flow interactions as \"touches\".\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "occurred_on": {"name": "occurred_on", "description": "Calendar date (UTC) on which the event occurred.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "touch_id": {"name": "touch_id", "description": "Coalescing of the Klaviyo-attributed campaign_id and flow_id.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "touch_session": {"name": "touch_session", "description": "ID used to batch an individual person's events into attribution-groups. Each event that comes attributed to a campaign or flow begins a new session/batch, in which the following events without a flow/campaign_id have the same `touch_session` (and may be attributed to the same flow/campaign).\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "session_start_at": {"name": "session_start_at", "description": "Timestamp of when, relative to the current event, this person last interacted with a campaign or flow according to Klaviyo. This is the beginning of the event's touch-session.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "session_event_type": {"name": "session_event_type", "description": "The type of event through which, relative to the current event, the person last interacted with a campaign or flow. This information is used to determine which lookback window to use (email vs sms).\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_id": {"name": "last_touch_id", "description": "The campaign or flow that the package attributed the event to.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_type": {"name": "last_touch_type", "description": "What kind of touch the event was attributed to by the package -- 'campaign', 'flow', or null.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "UTC Timestamp that indicates the start time of the Fivetran job that synced this event row.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "unique_event_id": {"name": "unique_event_id", "description": "The unique identifier for the combination of event_id and source_relation columns.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_relation": {"name": "source_relation", "description": "The source where this data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioining together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "klaviyo://models/intermediate/int_klaviyo.yml", "compiled_path": "target/compiled/klaviyo/models/intermediate/int_klaviyo__event_attribution.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "incremental", "schema": "int_klaviyo", "unique_key": "unique_event_id", "partition_by": {"field": "occurred_on", "data_type": "date"}, "incremental_strategy": "merge", "file_format": "delta"}, "created_at": 1665703195.5539782, "compiled_sql": "\n\nwith events as (\n\n select \n *,\n -- no event will be attributed to both a campaign and flow\n coalesce(campaign_id, flow_id) as touch_id,\n case \n when campaign_id is not null then 'campaign' \n when flow_id is not null then 'flow' \n else null end as touch_type -- defintion: touch = interaction with campaign/flow\n\n from `dbt-package-testing`.`dbt_test_stg_klaviyo`.`stg_klaviyo__event`\n\n \n -- grab **ALL** events for users who have any events in this new increment\n where person_id in (\n\n select distinct person_id\n from `dbt-package-testing`.`dbt_test_stg_klaviyo`.`stg_klaviyo__event`\n\n -- most events (from all kinds of integrations) at least once every hour\n -- https://help.klaviyo.com/hc/en-us/articles/115005253208\n where _fivetran_synced >= cast(coalesce( \n (\n select \n\n datetime_add(\n cast( max(_fivetran_synced) as datetime),\n interval -1 hour\n )\n\n \n from `dbt-package-testing`.`dbt_test_int_klaviyo`.`int_klaviyo__event_attribution`\n ), '2012-01-01') as \n timestamp\n ) -- klaviyo was founded in 2012, so let's default the min date to then\n )\n \n),\n\n-- sessionize events based on attribution eligibility -- is it the right kind of event, and does it have a campaign or flow?\ncreate_sessions as (\n select\n *,\n -- default klaviyo__event_attribution_filter limits attribution-eligible events to to email opens, email clicks, and sms opens\n -- https://help.klaviyo.com/hc/en-us/articles/115005248128\n\n -- events that come with flow/campaign attributions (and are eligible event types) will create new sessions.\n -- non-attributed events that come in afterward will be batched into the same attribution-session\n sum(case when touch_id is not null\n \n and lower(type) in ('opened email', 'clicked email', 'clicked sms')\n \n then 1 else 0 end) over (\n partition by person_id, source_relation order by occurred_at asc rows between unbounded preceding and current row) as touch_session \n\n from events\n\n),\n\n-- \"session start\" refers to the event in a \"touch session\" that is already attributed with a campaign or flow by Klaviyo\n-- a new event that is attributed with a campaign/flow will trigger a new session, so there will only be one already-attributed event per each session \n-- events that are missing attributions will borrow data from the event that triggered the session, if they are in the lookback window (see `attribute` CTE)\nlast_touches as (\n\n select \n *,\n -- when did the touch session begin?\n min(occurred_at) over(partition by person_id, source_relation, touch_session) as session_start_at,\n\n -- get the kind of metric/event that triggered the attribution session, in order to decide \n -- to use the sms or email lookback value. \n first_value(type) over(\n partition by person_id, source_relation, touch_session order by occurred_at asc rows between unbounded preceding and current row) as session_event_type\n\n from create_sessions\n),\n\nattribute as (\n\n select \n *,\n -- klaviyo uses different lookback windows for email and sms events\n -- default email lookback = 5 days (120 hours) -> https://help.klaviyo.com/hc/en-us/articles/115005248128#conversion-tracking1\n -- default sms lookback: 1 day (24 hours -> https://help.klaviyo.com/hc/en-us/articles/115005248128#sms-conversion-tracking7\n\n coalesce(touch_id, -- use pre-attributed flow/campaign if provided\n case \n when datetime_diff(\n cast(occurred_at as datetime),\n cast(session_start_at as datetime),\n hour\n ) <= (\n case \n when lower(session_event_type) like '%sms%' then 24\n else 120 end\n ) -- if the events fall within the lookback window, attribute\n then first_value(touch_id) over (\n partition by person_id, source_relation, touch_session order by occurred_at asc rows between unbounded preceding and current row)\n else null end) as last_touch_id -- session qualified for attribution -> we will call this \"last touch\"\n\n from last_touches \n),\n\nfinal as (\n\n select\n *,\n\n -- get whether the event is attributed to a flow or campaign\n coalesce(touch_type, first_value(touch_type) over(\n partition by person_id, source_relation, touch_session order by occurred_at asc rows between unbounded preceding and current row)) \n\n as session_touch_type -- if the session events qualified for attribution, extract the type of touch they are attributed to\n\n from attribute \n)\n\nselect * from final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_test_int_klaviyo`.`int_klaviyo__event_attribution`"}, "model.shopify.shopify__customer_cohorts": {"raw_sql": "with calendar as (\n\n select *\n from {{ ref('shopify__calendar') }}\n where cast({{ dbt_utils.date_trunc('month','date_day') }} as date) = date_day\n\n), customers as (\n\n select *\n from {{ ref('shopify__customers') }}\n\n), orders as (\n\n select *\n from {{ ref('shopify__orders') }}\n\n), customer_calendar as (\n\n select\n calendar.date_day as date_month,\n customers.customer_id,\n customers.first_order_timestamp,\n customers.source_relation,\n {{ dbt_utils.date_trunc('month', 'first_order_timestamp') }} as cohort_month\n from calendar\n inner join customers\n on cast({{ dbt_utils.date_trunc('month', 'first_order_timestamp') }} as date) <= calendar.date_day\n\n), orders_joined as (\n\n select \n customer_calendar.date_month, \n customer_calendar.customer_id, \n customer_calendar.first_order_timestamp,\n customer_calendar.cohort_month,\n customer_calendar.source_relation,\n coalesce(count(distinct orders.order_id), 0) as order_count_in_month,\n coalesce(sum(orders.order_adjusted_total), 0) as total_price_in_month,\n coalesce(sum(orders.line_item_count), 0) as line_item_count_in_month\n from customer_calendar\n left join orders\n on customer_calendar.customer_id = orders.customer_id\n and customer_calendar.source_relation = orders.source_relation\n and customer_calendar.date_month = cast({{ dbt_utils.date_trunc('month', 'created_timestamp') }} as date)\n group by 1,2,3,4,5\n\n), windows as (\n\n {% set partition_string = 'partition by customer_id, source_relation order by date_month rows between unbounded preceding and current row' %}\n\n select\n *,\n sum(total_price_in_month) over ({{ partition_string }}) as total_price_lifetime,\n sum(order_count_in_month) over ({{ partition_string }}) as order_count_lifetime,\n sum(line_item_count_in_month) over ({{ partition_string }}) as line_item_count_lifetime,\n row_number() over (partition by customer_id, source_relation order by date_month asc) as cohort_month_number\n from orders_joined\n \n), surrogate_key as (\n\n select \n *, \n {{ dbt_utils.surrogate_key(['date_month','customer_id','source_relation']) }} as customer_cohort_id\n from windows\n\n)\n\nselect *\nfrom surrogate_key", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt_utils.date_trunc", "macro.dbt_utils.surrogate_key"], "nodes": ["model.shopify.shopify__calendar", "model.shopify.shopify__customers", "model.shopify.shopify__orders"]}, "config": {"enabled": true, "alias": null, "schema": "shopify", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test_shopify", "fqn": ["shopify", "shopify__customer_cohorts"], "unique_id": "model.shopify.shopify__customer_cohorts", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify", "path": "shopify__customer_cohorts.sql", "original_file_path": "models/shopify__customer_cohorts.sql", "name": "shopify__customer_cohorts", "alias": "shopify__customer_cohorts", "checksum": {"name": "sha256", "checksum": "4179fd82cc1aafd2c0e61ad2e4d8d0a2d4a6daf2afbb91a70bc77cc7311cf1aa"}, "tags": [], "refs": [["shopify__calendar"], ["shopify__customers"], ["shopify__orders"]], "sources": [], "metrics": [], "description": "Each record represents a customer's performance in a calendar month.", "columns": {"cohort_month": {"name": "cohort_month", "description": "The month the cohort belongs to, i.e the first month the customer had an order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "cohort_month_number": {"name": "cohort_month_number", "description": "The 'number' of the `date_month` of the record, i.e. how many months from their start month this cohort occurred", "meta": {}, "data_type": null, "quote": null, "tags": []}, "customer_cohort_id": {"name": "customer_cohort_id", "description": "Unique key representing a customer in a given month.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "customer_id": {"name": "customer_id", "description": "The ID of the related customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "date_month": {"name": "date_month", "description": "The calendar month the customer stats relate to.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_order_timestamp": {"name": "first_order_timestamp", "description": "The timestamp of the customer's first order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "line_item_count_in_month": {"name": "line_item_count_in_month", "description": "Number of line items purchased in the `date_month`", "meta": {}, "data_type": null, "quote": null, "tags": []}, "line_item_count_lifetime": {"name": "line_item_count_lifetime", "description": "Number of line items purchased up until and including this `date_month`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_count_in_month": {"name": "order_count_in_month", "description": "Number of orders purchased in the `date_month`", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_count_lifetime": {"name": "order_count_lifetime", "description": "Number of orders purchased up until and including this `date_month`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_price_in_month": {"name": "total_price_in_month", "description": "Total amount (in currency) purchased in the `date_month`", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_price_lifetime": {"name": "total_price_lifetime", "description": "Total amount (in currency) up until and including this `date_month`.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify://models/shopify.yml", "compiled_path": "target/compiled/shopify/models/shopify__customer_cohorts.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "shopify", "materialized": "table"}, "created_at": 1665703195.575144, "compiled_sql": "with calendar as (\n\n select *\n from `dbt-package-testing`.`dbt_test_shopify`.`shopify__calendar`\n where cast(timestamp_trunc(\n cast(date_day as timestamp),\n month\n ) as date) = date_day\n\n), customers as (\n\n select *\n from `dbt-package-testing`.`dbt_test_shopify`.`shopify__customers`\n\n), orders as (\n\n select *\n from `dbt-package-testing`.`dbt_test_shopify`.`shopify__orders`\n\n), customer_calendar as (\n\n select\n calendar.date_day as date_month,\n customers.customer_id,\n customers.first_order_timestamp,\n customers.source_relation,\n timestamp_trunc(\n cast(first_order_timestamp as timestamp),\n month\n ) as cohort_month\n from calendar\n inner join customers\n on cast(timestamp_trunc(\n cast(first_order_timestamp as timestamp),\n month\n ) as date) <= calendar.date_day\n\n), orders_joined as (\n\n select \n customer_calendar.date_month, \n customer_calendar.customer_id, \n customer_calendar.first_order_timestamp,\n customer_calendar.cohort_month,\n customer_calendar.source_relation,\n coalesce(count(distinct orders.order_id), 0) as order_count_in_month,\n coalesce(sum(orders.order_adjusted_total), 0) as total_price_in_month,\n coalesce(sum(orders.line_item_count), 0) as line_item_count_in_month\n from customer_calendar\n left join orders\n on customer_calendar.customer_id = orders.customer_id\n and customer_calendar.source_relation = orders.source_relation\n and customer_calendar.date_month = cast(timestamp_trunc(\n cast(created_timestamp as timestamp),\n month\n ) as date)\n group by 1,2,3,4,5\n\n), windows as (\n\n \n\n select\n *,\n sum(total_price_in_month) over (partition by customer_id, source_relation order by date_month rows between unbounded preceding and current row) as total_price_lifetime,\n sum(order_count_in_month) over (partition by customer_id, source_relation order by date_month rows between unbounded preceding and current row) as order_count_lifetime,\n sum(line_item_count_in_month) over (partition by customer_id, source_relation order by date_month rows between unbounded preceding and current row) as line_item_count_lifetime,\n row_number() over (partition by customer_id, source_relation order by date_month asc) as cohort_month_number\n from orders_joined\n \n), surrogate_key as (\n\n select \n *, \n to_hex(md5(cast(coalesce(cast(date_month as \n string\n), '') || '-' || coalesce(cast(customer_id as \n string\n), '') || '-' || coalesce(cast(source_relation as \n string\n), '') as \n string\n))) as customer_cohort_id\n from windows\n\n)\n\nselect *\nfrom surrogate_key", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_test_shopify`.`shopify__customer_cohorts`"}, "model.shopify.shopify__orders": {"raw_sql": "with orders as (\n\n select *\n from {{ var('shopify_order') }}\n\n), order_lines as (\n\n select *\n from {{ ref('shopify__orders__order_line_aggregates') }}\n\n{% if var('shopify__using_order_adjustment', true) %}\n), order_adjustments as (\n\n select *\n from {{ var('shopify_order_adjustment') }}\n\n), order_adjustments_aggregates as (\n select\n order_id,\n source_relation,\n sum(amount) as order_adjustment_amount,\n sum(tax_amount) as order_adjustment_tax_amount\n from order_adjustments\n group by 1,2\n{% endif %}\n\n{% if fivetran_utils.enabled_vars(vars=[\"shopify__using_order_line_refund\", \"shopify__using_refund\"]) %}\n), refunds as (\n\n select *\n from {{ ref('shopify__orders__order_refunds') }}\n\n), refund_aggregates as (\n select\n order_id,\n source_relation,\n sum(subtotal) as refund_subtotal,\n sum(total_tax) as refund_total_tax\n from refunds\n group by 1,2\n{% endif %}\n\n), joined as (\n\n select\n orders.*,\n coalesce(cast({{ fivetran_utils.json_parse(\"total_shipping_price_set\",[\"shop_money\",\"amount\"]) }} as {{ dbt_utils.type_float() }}) ,0) as shipping_cost,\n \n {% if var('shopify__using_order_adjustment', true) %}\n order_adjustments_aggregates.order_adjustment_amount,\n order_adjustments_aggregates.order_adjustment_tax_amount,\n {% endif %}\n\n {% if fivetran_utils.enabled_vars(vars=[\"shopify__using_order_line_refund\", \"shopify__using_refund\"]) %}\n refund_aggregates.refund_subtotal,\n refund_aggregates.refund_total_tax,\n {% endif %}\n (orders.total_price\n {% if var('shopify__using_order_adjustment', true) %}\n + coalesce(order_adjustments_aggregates.order_adjustment_amount,0) + coalesce(order_adjustments_aggregates.order_adjustment_tax_amount,0) \n {% endif %}\n {% if fivetran_utils.enabled_vars(vars=[\"shopify__using_order_line_refund\", \"shopify__using_refund\"]) %}\n - coalesce(refund_aggregates.refund_subtotal,0) - coalesce(refund_aggregates.refund_total_tax,0)\n {% endif %} ) as order_adjusted_total,\n order_lines.line_item_count\n from orders\n left join order_lines\n on orders.order_id = order_lines.order_id\n and orders.source_relation = order_lines.source_relation\n\n {% if fivetran_utils.enabled_vars(vars=[\"shopify__using_order_line_refund\", \"shopify__using_refund\"]) %}\n left join refund_aggregates\n on orders.order_id = refund_aggregates.order_id\n and orders.source_relation = refund_aggregates.source_relation\n {% endif %}\n {% if var('shopify__using_order_adjustment', true) %}\n left join order_adjustments_aggregates\n on orders.order_id = order_adjustments_aggregates.order_id\n and orders.source_relation = order_adjustments_aggregates.source_relation\n {% endif %}\n\n), windows as (\n\n select \n *,\n row_number() over (partition by customer_id, source_relation order by created_timestamp) as customer_order_seq_number\n from joined\n\n), new_vs_repeat as (\n\n select \n *,\n case \n when customer_order_seq_number = 1 then 'new'\n else 'repeat'\n end as new_vs_repeat\n from windows\n\n)\n\nselect *\nfrom new_vs_repeat", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.json_parse", "macro.dbt_utils.type_float"], "nodes": ["model.shopify_source.stg_shopify__order", "model.shopify.shopify__orders__order_line_aggregates", "model.shopify_source.stg_shopify__order_adjustment", "model.shopify.shopify__orders__order_refunds"]}, "config": {"enabled": true, "alias": null, "schema": "shopify", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test_shopify", "fqn": ["shopify", "shopify__orders"], "unique_id": "model.shopify.shopify__orders", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify", "path": "shopify__orders.sql", "original_file_path": "models/shopify__orders.sql", "name": "shopify__orders", "alias": "shopify__orders", "checksum": {"name": "sha256", "checksum": "314b165b27050181ab0f5a6e4bcd722c3f6918af348f575dd942f4c6aee4eb0c"}, "tags": [], "refs": [["stg_shopify__order"], ["shopify__orders__order_line_aggregates"], ["stg_shopify__order_adjustment"], ["shopify__orders__order_refunds"]], "sources": [], "metrics": [], "description": "Each record represents an order in Shopify.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "app_id": {"name": "app_id", "description": "The ID of the app that created the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_address_1": {"name": "billing_address_address_1", "description": "The street address of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_address_2": {"name": "billing_address_address_2", "description": "An optional additional field for the street address of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_city": {"name": "billing_address_city", "description": "The city, town, or village of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_company": {"name": "billing_address_company", "description": "The company of the person associated with the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_country": {"name": "billing_address_country", "description": "The name of the country of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_country_code": {"name": "billing_address_country_code", "description": "The two-letter code (ISO 3166-1 format) for the country of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_first_name": {"name": "billing_address_first_name", "description": "The first name of the person associated with the payment method.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_last_name": {"name": "billing_address_last_name", "description": "The last name of the person associated with the payment method.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_latitude": {"name": "billing_address_latitude", "description": "The latitude of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_longitude": {"name": "billing_address_longitude", "description": "The longitude of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_name": {"name": "billing_address_name", "description": "The full name of the person associated with the payment method.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_phone": {"name": "billing_address_phone", "description": "The phone number at the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_province": {"name": "billing_address_province", "description": "The name of the region (province, state, prefecture, \u2026) of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_province_code": {"name": "billing_address_province_code", "description": "The two-letter abbreviation of the region of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_zip": {"name": "billing_address_zip", "description": "The postal code (zip, postcode, Eircode, \u2026) of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "browser_ip": {"name": "browser_ip", "description": "The IP address of the browser used by the customer when they placed the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "has_buyer_accepted_marketing": {"name": "has_buyer_accepted_marketing", "description": "Whether the customer consented to receive email updates from the shop.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "cancel_reason": {"name": "cancel_reason", "description": "The reason why the order was canceled.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "cancelled_timestamp": {"name": "cancelled_timestamp", "description": "The date and time when the order was canceled.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "cart_token": {"name": "cart_token", "description": "The ID of the cart that's associated with the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "closed_timestamp": {"name": "closed_timestamp", "description": "The date and time when the order was closed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_timestamp": {"name": "created_timestamp", "description": "The autogenerated date and time when the order was created in Shopify.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "The three-letter code for the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "customer_id": {"name": "customer_id", "description": "The ID of the order's customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email": {"name": "email", "description": "The customer's email address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "financial_status": {"name": "financial_status", "description": "The status of payments associated with the order. Can only be set when the order is created", "meta": {}, "data_type": null, "quote": null, "tags": []}, "fulfillment_status": {"name": "fulfillment_status", "description": "The order's status in terms of fulfilled line items.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_id": {"name": "order_id", "description": "The ID of the order, used for API purposes. This is different from the order_number property, which is the ID used by the shop owner and customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "landing_site_base_url": {"name": "landing_site_base_url", "description": "The URL for the page where the buyer landed when they entered the shop.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "location_id": {"name": "location_id", "description": "The ID of the physical location where the order was processed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "name": {"name": "name", "description": "The order name, generated by combining the order_number property with the order prefix and suffix that are set in the merchant's general settings.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "note": {"name": "note", "description": "An optional note that a shop owner can attach to the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "number": {"name": "number", "description": "The order's position in the shop's count of orders. Numbers are sequential and start at 1.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_number": {"name": "order_number", "description": "The order 's position in the shop's count of orders starting at 1001. Order numbers are sequential and start at 1001.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "processed_timestamp": {"name": "processed_timestamp", "description": "The date and time when an order was processed. This value is the date that appears on your orders and that's used in the analytic reports.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "processing_method": {"name": "processing_method", "description": "How the payment was processed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "referring_site": {"name": "referring_site", "description": "The website where the customer clicked a link to the shop.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_address_1": {"name": "shipping_address_address_1", "description": "The street address of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_address_2": {"name": "shipping_address_address_2", "description": "An optional additional field for the street address of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_city": {"name": "shipping_address_city", "description": "The city, town, or village of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_company": {"name": "shipping_address_company", "description": "The company of the person associated with the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_country": {"name": "shipping_address_country", "description": "The name of the country of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_country_code": {"name": "shipping_address_country_code", "description": "The two-letter code (ISO 3166-1 format) for the country of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_first_name": {"name": "shipping_address_first_name", "description": "The first name of the person associated with the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_last_name": {"name": "shipping_address_last_name", "description": "The last name of the person associated with the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_latitude": {"name": "shipping_address_latitude", "description": "The latitude of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_longitude": {"name": "shipping_address_longitude", "description": "The longitude of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_name": {"name": "shipping_address_name", "description": "The full name of the person associated with the payment method.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_phone": {"name": "shipping_address_phone", "description": "The phone number at the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_province": {"name": "shipping_address_province", "description": "The name of the region (province, state, prefecture, \u2026) of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_province_code": {"name": "shipping_address_province_code", "description": "The two-letter abbreviation of the region of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_zip": {"name": "shipping_address_zip", "description": "The postal code (zip, postcode, Eircode, \u2026) of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_name": {"name": "source_name", "description": "Where the order originated. Can be set only during order creation, and is not writeable afterwards.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "subtotal_price": {"name": "subtotal_price", "description": "The price of the order in the shop currency after discounts but before shipping, taxes, and tips.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "has_taxes_included": {"name": "has_taxes_included", "description": "Whether taxes are included in the order subtotal.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_test_order": {"name": "is_test_order", "description": "Whether this is a test order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "token": {"name": "token", "description": "A unique token for the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_discounts": {"name": "total_discounts", "description": "The total discounts applied to the price of the order in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_line_items_price": {"name": "total_line_items_price", "description": "The sum of all line item prices in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_price": {"name": "total_price", "description": "The sum of all line item prices, discounts, shipping, taxes, and tips in the shop currency. Must be positive.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_tax": {"name": "total_tax", "description": "The sum of all the taxes applied to the order in th shop currency. Must be positive).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_weight": {"name": "total_weight", "description": "The sum of all line item weights in grams.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_timestamp": {"name": "updated_timestamp", "description": "The date and time (ISO 8601 format) when the order was last modified.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "user_id": {"name": "user_id", "description": "The ID of the user logged into Shopify POS who processed the order, if applicable.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "line_item_count": {"name": "line_item_count", "description": "Number of line items included in the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "customer_order_seq_number": {"name": "customer_order_seq_number", "description": "The sequential number of the order as it relates to the customer", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_vs_repeat": {"name": "new_vs_repeat", "description": "Whether the order was a new or repeat order for the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_cost": {"name": "shipping_cost", "description": "The shipping cost of the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_adjustment_amount": {"name": "order_adjustment_amount", "description": "Total adjustment amount applied to the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_adjustment_tax_amount": {"name": "order_adjustment_tax_amount", "description": "Total tax applied to the adjustment on the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refund_subtotal": {"name": "refund_subtotal", "description": "Total refund amount applied to the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refund_total_tax": {"name": "refund_total_tax", "description": "Total tax applied to the refund on the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_adjusted_total": {"name": "order_adjusted_total", "description": "Order total adjusted for refunds and other adjustments. The calculation used for this field is as follows: total price listed on the original order (including shipping costs and discounts) + adjustments + adjustments tax - total refunds - refunds tax The order_adjusted_total will equate to the total sales - refunds listed within the transactions table for the order (after currency exchange).\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "index": {"name": "index", "description": "Field representing the index of the order line in relation to the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "pre_tax_price": {"name": "pre_tax_price", "description": "The pre tax price of the order line.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "checkout_token": {"name": "checkout_token", "description": "The checkout token applied to the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_shipping_price_set": {"name": "total_shipping_price_set", "description": "The total shipping price set to the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify://models/shopify.yml", "compiled_path": "target/compiled/shopify/models/shopify__orders.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "shopify", "materialized": "table"}, "created_at": 1665703195.5872, "compiled_sql": "with __dbt__cte__shopify__orders__order_line_aggregates as (\nwith order_line as (\n\n select *\n from `dbt-package-testing`.`dbt_test_stg_shopify`.`stg_shopify__order_line`\n\n), aggregated as (\n\n select \n order_id,\n source_relation,\n count(*) as line_item_count\n from order_line\n group by 1,2\n\n)\n\nselect *\nfrom aggregated\n), __dbt__cte__shopify__orders__order_refunds as (\n\n\nwith refunds as (\n\n select *\n from `dbt-package-testing`.`dbt_test_stg_shopify`.`stg_shopify__refund`\n\n), order_line_refunds as (\n\n select *\n from `dbt-package-testing`.`dbt_test_stg_shopify`.`stg_shopify__order_line_refund`\n \n), refund_join as (\n\n select \n refunds.refund_id,\n refunds.created_at,\n refunds.order_id,\n refunds.user_id,\n refunds.source_relation,\n order_line_refunds.order_line_refund_id,\n order_line_refunds.order_line_id,\n order_line_refunds.restock_type,\n order_line_refunds.quantity,\n order_line_refunds.subtotal,\n order_line_refunds.total_tax\n from refunds\n left join order_line_refunds\n on refunds.refund_id = order_line_refunds.refund_id\n and refunds.source_relation = order_line_refunds.source_relation\n\n)\n\nselect *\nfrom refund_join\n),orders as (\n\n select *\n from `dbt-package-testing`.`dbt_test_stg_shopify`.`stg_shopify__order`\n\n), order_lines as (\n\n select *\n from __dbt__cte__shopify__orders__order_line_aggregates\n\n\n), order_adjustments as (\n\n select *\n from `dbt-package-testing`.`dbt_test_stg_shopify`.`stg_shopify__order_adjustment`\n\n), order_adjustments_aggregates as (\n select\n order_id,\n source_relation,\n sum(amount) as order_adjustment_amount,\n sum(tax_amount) as order_adjustment_tax_amount\n from order_adjustments\n group by 1,2\n\n\n\n), refunds as (\n\n select *\n from __dbt__cte__shopify__orders__order_refunds\n\n), refund_aggregates as (\n select\n order_id,\n source_relation,\n sum(subtotal) as refund_subtotal,\n sum(total_tax) as refund_total_tax\n from refunds\n group by 1,2\n\n\n), joined as (\n\n select\n orders.*,\n coalesce(cast(\n\n \n json_extract_scalar(total_shipping_price_set, '$.shop_money.amount')\n\n as \n float64\n) ,0) as shipping_cost,\n \n \n order_adjustments_aggregates.order_adjustment_amount,\n order_adjustments_aggregates.order_adjustment_tax_amount,\n \n\n \n refund_aggregates.refund_subtotal,\n refund_aggregates.refund_total_tax,\n \n (orders.total_price\n \n + coalesce(order_adjustments_aggregates.order_adjustment_amount,0) + coalesce(order_adjustments_aggregates.order_adjustment_tax_amount,0) \n \n \n - coalesce(refund_aggregates.refund_subtotal,0) - coalesce(refund_aggregates.refund_total_tax,0)\n ) as order_adjusted_total,\n order_lines.line_item_count\n from orders\n left join order_lines\n on orders.order_id = order_lines.order_id\n and orders.source_relation = order_lines.source_relation\n\n \n left join refund_aggregates\n on orders.order_id = refund_aggregates.order_id\n and orders.source_relation = refund_aggregates.source_relation\n \n \n left join order_adjustments_aggregates\n on orders.order_id = order_adjustments_aggregates.order_id\n and orders.source_relation = order_adjustments_aggregates.source_relation\n \n\n), windows as (\n\n select \n *,\n row_number() over (partition by customer_id, source_relation order by created_timestamp) as customer_order_seq_number\n from joined\n\n), new_vs_repeat as (\n\n select \n *,\n case \n when customer_order_seq_number = 1 then 'new'\n else 'repeat'\n end as new_vs_repeat\n from windows\n\n)\n\nselect *\nfrom new_vs_repeat", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.shopify.shopify__orders__order_line_aggregates", "sql": " __dbt__cte__shopify__orders__order_line_aggregates as (\nwith order_line as (\n\n select *\n from `dbt-package-testing`.`dbt_test_stg_shopify`.`stg_shopify__order_line`\n\n), aggregated as (\n\n select \n order_id,\n source_relation,\n count(*) as line_item_count\n from order_line\n group by 1,2\n\n)\n\nselect *\nfrom aggregated\n)"}, {"id": "model.shopify.shopify__orders__order_refunds", "sql": " __dbt__cte__shopify__orders__order_refunds as (\n\n\nwith refunds as (\n\n select *\n from `dbt-package-testing`.`dbt_test_stg_shopify`.`stg_shopify__refund`\n\n), order_line_refunds as (\n\n select *\n from `dbt-package-testing`.`dbt_test_stg_shopify`.`stg_shopify__order_line_refund`\n \n), refund_join as (\n\n select \n refunds.refund_id,\n refunds.created_at,\n refunds.order_id,\n refunds.user_id,\n refunds.source_relation,\n order_line_refunds.order_line_refund_id,\n order_line_refunds.order_line_id,\n order_line_refunds.restock_type,\n order_line_refunds.quantity,\n order_line_refunds.subtotal,\n order_line_refunds.total_tax\n from refunds\n left join order_line_refunds\n on refunds.refund_id = order_line_refunds.refund_id\n and refunds.source_relation = order_line_refunds.source_relation\n\n)\n\nselect *\nfrom refund_join\n)"}], "relation_name": "`dbt-package-testing`.`dbt_test_shopify`.`shopify__orders`"}, "model.shopify.shopify__products": {"raw_sql": "with products as (\n\n select *\n from {{ var('shopify_product') }}\n\n), order_lines as (\n\n select *\n from {{ ref('shopify__order_lines') }}\n\n), orders as (\n\n select *\n from {{ ref('shopify__orders')}}\n\n), order_lines_aggregated as (\n\n select \n order_lines.product_id, \n order_lines.source_relation,\n sum(order_lines.quantity) as quantity_sold,\n sum(order_lines.pre_tax_price) as subtotal_sold,\n\n {% if fivetran_utils.enabled_vars(vars=[\"shopify__using_order_line_refund\", \"shopify__using_refund\"]) %}\n sum(order_lines.quantity_net_refunds) as quantity_sold_net_refunds,\n sum(order_lines.subtotal_net_refunds) as subtotal_sold_net_refunds,\n {% endif %}\n\n min(orders.created_timestamp) as first_order_timestamp,\n max(orders.created_timestamp) as most_recent_order_timestamp\n from order_lines\n left join orders\n using (order_id, source_relation)\n group by 1,2\n\n), joined as (\n\n select\n products.*,\n coalesce(order_lines_aggregated.quantity_sold,0) as quantity_sold,\n coalesce(order_lines_aggregated.subtotal_sold,0) as subtotal_sold,\n\n {% if fivetran_utils.enabled_vars(vars=[\"shopify__using_order_line_refund\", \"shopify__using_refund\"]) %}\n coalesce(order_lines_aggregated.quantity_sold_net_refunds,0) as quantity_sold_net_refunds,\n coalesce(order_lines_aggregated.subtotal_sold_net_refunds,0) as subtotal_sold_net_refunds,\n {% endif %}\n \n order_lines_aggregated.first_order_timestamp,\n order_lines_aggregated.most_recent_order_timestamp\n from products\n left join order_lines_aggregated\n using (product_id, source_relation)\n\n)\n\nselect *\nfrom joined", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars"], "nodes": ["model.shopify_source.stg_shopify__product", "model.shopify.shopify__order_lines", "model.shopify.shopify__orders"]}, "config": {"enabled": true, "alias": null, "schema": "shopify", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test_shopify", "fqn": ["shopify", "shopify__products"], "unique_id": "model.shopify.shopify__products", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify", "path": "shopify__products.sql", "original_file_path": "models/shopify__products.sql", "name": "shopify__products", "alias": "shopify__products", "checksum": {"name": "sha256", "checksum": "e699f3d418cc215e557b5a7ad0705f82470c62c8b54b3fbb29a2896c507ba033"}, "tags": [], "refs": [["stg_shopify__product"], ["shopify__order_lines"], ["shopify__orders"]], "sources": [], "metrics": [], "description": "Each record represents a product in Shopify.", "columns": {"_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Whether the record has been deleted in the source system.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_timestamp": {"name": "created_timestamp", "description": "The date and time when the product was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "handle": {"name": "handle", "description": "A unique human-friendly string for the product. Automatically generated from the product's title.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "product_id": {"name": "product_id", "description": "An unsigned 64-bit integer that's used as a unique identifier for the product. Each id is unique across the Shopify system. No two products will have the same id, even if they're from different shops.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "product_type": {"name": "product_type", "description": "A categorization for the product used for filtering and searching products.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "published_timestamp": {"name": "published_timestamp", "description": "The date and time (ISO 8601 format) when the product was published. Can be set to null to unpublish the product from the Online Store channel.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "published_scope": {"name": "published_scope", "description": "Whether the product is published to the Point of Sale channel.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "title": {"name": "title", "description": "The name of the product.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_timestamp": {"name": "updated_timestamp", "description": "The date and time when the product was last modified.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "vendor": {"name": "vendor", "description": "The name of the product's vendor.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "quantity_sold": {"name": "quantity_sold", "description": "Quantity of the product sold.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "subtotal_sold": {"name": "subtotal_sold", "description": "Total amount of the product sold.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "quantity_sold_net_refunds": {"name": "quantity_sold_net_refunds", "description": "Quantity of the product sold, excluding refunds.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "subtotal_sold_net_refunds": {"name": "subtotal_sold_net_refunds", "description": "Total amount of the product sold, excluding refunds.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_order_timestamp": {"name": "first_order_timestamp", "description": "The timestamp the product was first ordered.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "most_recent_order_timestamp": {"name": "most_recent_order_timestamp", "description": "The timestamp the product was most recently ordered.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify://models/shopify.yml", "compiled_path": "target/compiled/shopify/models/shopify__products.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "shopify", "materialized": "table"}, "created_at": 1665703195.5931342, "compiled_sql": "with products as (\n\n select *\n from `dbt-package-testing`.`dbt_test_stg_shopify`.`stg_shopify__product`\n\n), order_lines as (\n\n select *\n from `dbt-package-testing`.`dbt_test_shopify`.`shopify__order_lines`\n\n), orders as (\n\n select *\n from `dbt-package-testing`.`dbt_test_shopify`.`shopify__orders`\n\n), order_lines_aggregated as (\n\n select \n order_lines.product_id, \n order_lines.source_relation,\n sum(order_lines.quantity) as quantity_sold,\n sum(order_lines.pre_tax_price) as subtotal_sold,\n\n \n sum(order_lines.quantity_net_refunds) as quantity_sold_net_refunds,\n sum(order_lines.subtotal_net_refunds) as subtotal_sold_net_refunds,\n \n\n min(orders.created_timestamp) as first_order_timestamp,\n max(orders.created_timestamp) as most_recent_order_timestamp\n from order_lines\n left join orders\n using (order_id, source_relation)\n group by 1,2\n\n), joined as (\n\n select\n products.*,\n coalesce(order_lines_aggregated.quantity_sold,0) as quantity_sold,\n coalesce(order_lines_aggregated.subtotal_sold,0) as subtotal_sold,\n\n \n coalesce(order_lines_aggregated.quantity_sold_net_refunds,0) as quantity_sold_net_refunds,\n coalesce(order_lines_aggregated.subtotal_sold_net_refunds,0) as subtotal_sold_net_refunds,\n \n \n order_lines_aggregated.first_order_timestamp,\n order_lines_aggregated.most_recent_order_timestamp\n from products\n left join order_lines_aggregated\n using (product_id, source_relation)\n\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_test_shopify`.`shopify__products`"}, "model.shopify.shopify__transactions": {"raw_sql": "with transactions as (\n select *\n from {{ var('shopify_transaction') }}\n\n), exchange_rate as (\n\n select\n *,\n coalesce(cast(nullif({{ fivetran_utils.json_parse(\"receipt\",[\"charges\",\"data\",0,\"balance_transaction\",\"exchange_rate\"]) }}, '') as {{ dbt_utils.type_numeric() }} ),1) as exchange_rate,\n coalesce(cast(nullif({{ fivetran_utils.json_parse(\"receipt\",[\"charges\",\"data\",0,\"balance_transaction\",\"exchange_rate\"]) }}, '') as {{ dbt_utils.type_numeric() }} ),1) * amount as currency_exchange_calculated_amount\n from transactions\n\n)\n\nselect *\nfrom exchange_rate", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.json_parse", "macro.dbt_utils.type_numeric"], "nodes": ["model.shopify_source.stg_shopify__transaction"]}, "config": {"enabled": true, "alias": null, "schema": "shopify", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test_shopify", "fqn": ["shopify", "shopify__transactions"], "unique_id": "model.shopify.shopify__transactions", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify", "path": "shopify__transactions.sql", "original_file_path": "models/shopify__transactions.sql", "name": "shopify__transactions", "alias": "shopify__transactions", "checksum": {"name": "sha256", "checksum": "88e4a9aa6d2acc8dbe0e1d3f280087b5adb6a730391785680d0bf112b0923906"}, "tags": [], "refs": [["stg_shopify__transaction"]], "sources": [], "metrics": [], "description": "Each record represents a transaction in Shopify.", "columns": {"transaction_id": {"name": "transaction_id", "description": "The ID for the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_id": {"name": "order_id", "description": "The ID for the order that the transaction is associated with.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refund_id": {"name": "refund_id", "description": "The ID associated with a refund in the refund table.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "amount": {"name": "amount", "description": "The amount of money included in the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "authorization": {"name": "authorization", "description": "The authorization code associated with the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_timestamp": {"name": "created_timestamp", "description": "The date and time when the transaction was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "processed_timestamp": {"name": "processed_timestamp", "description": "The date and time when a transaction was processed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "device_id": {"name": "device_id", "description": "The ID for the device.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "gateway": {"name": "gateway", "description": "The name of the gateway the transaction was issued through.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_name": {"name": "source_name", "description": "The origin of the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "message": {"name": "message", "description": "A string generated by the payment provider with additional information about why the transaction succeeded or failed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "The three-letter code (ISO 4217 format) for the currency used for the payment.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "location_id": {"name": "location_id", "description": "The ID of the physical location where the transaction was processed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "parent_id": {"name": "parent_id", "description": "The ID of an associated transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payment_avs_result_code": {"name": "payment_avs_result_code", "description": "The response code from the address verification system.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payment_credit_card_bin": {"name": "payment_credit_card_bin", "description": "The issuer identification number (IIN), formerly known as bank identification number (BIN) of the customer's credit card.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payment_cvv_result_code": {"name": "payment_cvv_result_code", "description": "The response code from the credit card company indicating whether the customer entered the card security code, or card verification value, correctly.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payment_credit_card_number": {"name": "payment_credit_card_number", "description": "The customer's credit card number, with most of the leading digits redacted.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payment_credit_card_company": {"name": "payment_credit_card_company", "description": "The name of the company that issued the customer's credit card.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "kind": {"name": "kind", "description": "The transaction's type.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "receipt": {"name": "receipt", "description": "A transaction receipt attached to the transaction by the gateway.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency_exchange_id": {"name": "currency_exchange_id", "description": "The ID of the adjustment.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency_exchange_adjustment": {"name": "currency_exchange_adjustment", "description": "The difference between the amounts on the associated transaction and the parent transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency_exchange_original_amount": {"name": "currency_exchange_original_amount", "description": "The amount of the parent transaction in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency_exchange_final_amount": {"name": "currency_exchange_final_amount", "description": "The amount of the associated transaction in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency_exchange_currency": {"name": "currency_exchange_currency", "description": "The shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "error_code": {"name": "error_code", "description": "A standardized error code, independent of the payment provider.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status": {"name": "status", "description": "The status of the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "test": {"name": "test", "description": "Whether the transaction is a test transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "user_id": {"name": "user_id", "description": "The ID for the user who was logged into the Shopify POS device when the order was processed, if applicable.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of the date the record was synced by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "exchange_rate": {"name": "exchange_rate", "description": "The exchange rate between the home currency and the currency of sale at the time of the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency_exchange_calculated_amount": {"name": "currency_exchange_calculated_amount", "description": "The total amount of the transaction with the currency exchange rate applied.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify://models/shopify.yml", "compiled_path": "target/compiled/shopify/models/shopify__transactions.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "shopify", "materialized": "table"}, "created_at": 1665703195.605672, "compiled_sql": "with transactions as (\n select *\n from `dbt-package-testing`.`dbt_test_stg_shopify`.`stg_shopify__transaction`\n\n), exchange_rate as (\n\n select\n *,\n coalesce(cast(nullif(\n\n \n json_extract_scalar(receipt, '$.charges.data.0.balance_transaction.exchange_rate')\n\n, '') as \n numeric\n ),1) as exchange_rate,\n coalesce(cast(nullif(\n\n \n json_extract_scalar(receipt, '$.charges.data.0.balance_transaction.exchange_rate')\n\n, '') as \n numeric\n ),1) * amount as currency_exchange_calculated_amount\n from transactions\n\n)\n\nselect *\nfrom exchange_rate", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_test_shopify`.`shopify__transactions`"}, "model.shopify.shopify__customers": {"raw_sql": "with customers as (\n\n select \n {{ dbt_utils.star(from=ref('stg_shopify__customer'), except=[\"orders_count\", \"total_spent\"]) }}\n from {{ var('shopify_customer') }}\n\n), orders as (\n\n select *\n from {{ ref('shopify__customers__order_aggregates' )}}\n\n), joined as (\n\n select \n customers.*,\n orders.first_order_timestamp,\n orders.most_recent_order_timestamp,\n coalesce(orders.average_order_value, 0) as average_order_value,\n coalesce(orders.lifetime_total_spent, 0) as lifetime_total_spent,\n coalesce(orders.lifetime_total_refunded, 0) as lifetime_total_refunded,\n (coalesce(orders.lifetime_total_spent, 0) - coalesce(orders.lifetime_total_refunded, 0)) as lifetime_total_amount,\n coalesce(orders.lifetime_count_orders, 0) as lifetime_count_orders\n from customers\n left join orders\n using (customer_id, source_relation)\n\n)\n\nselect *\nfrom joined", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": ["model.shopify_source.stg_shopify__customer", "model.shopify_source.stg_shopify__customer", "model.shopify.shopify__customers__order_aggregates"]}, "config": {"enabled": true, "alias": null, "schema": "shopify", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test_shopify", "fqn": ["shopify", "shopify__customers"], "unique_id": "model.shopify.shopify__customers", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify", "path": "shopify__customers.sql", "original_file_path": "models/shopify__customers.sql", "name": "shopify__customers", "alias": "shopify__customers", "checksum": {"name": "sha256", "checksum": "70e28dce05bc26f7fc7678928e4bf4ab455d399c6f314f54d3c4671be96d3b7e"}, "tags": [], "refs": [["stg_shopify__customer"], ["stg_shopify__customer"], ["shopify__customers__order_aggregates"]], "sources": [], "metrics": [], "description": "Each record represents a customer in Shopify.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "has_accepted_marketing": {"name": "has_accepted_marketing", "description": "Whether the customer has consented to receive marketing material via email.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_timestamp": {"name": "created_timestamp", "description": "The date and time when the customer was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "default_address_id": {"name": "default_address_id", "description": "The default address for the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email": {"name": "email", "description": "The unique email address of the customer. Attempting to assign the same email address to multiple customers returns an error.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_name": {"name": "first_name", "description": "The customer's first name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "customer_id": {"name": "customer_id", "description": "A unique identifier for the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_name": {"name": "last_name", "description": "The customer's last name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "lifetime_count_orders": {"name": "lifetime_count_orders", "description": "The number of orders associated with this customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "phone": {"name": "phone", "description": "The unique phone number (E.164 format) for this customer. Attempting to assign the same phone number to multiple customers returns an error.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "account_state": {"name": "account_state", "description": "The state of the customer's account with a shop.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_tax_exempt": {"name": "is_tax_exempt", "description": "Whether the customer is exempt from paying taxes on their order. If true, then taxes won't be applied to an order at checkout. If false, then taxes will be applied at checkout.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_timestamp": {"name": "updated_timestamp", "description": "The date and time when the customer information was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_verified_email": {"name": "is_verified_email", "description": "Whether the customer has verified their email address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_order_timestamp": {"name": "first_order_timestamp", "description": "The timestamp the customer completed their first order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "most_recent_order_timestamp": {"name": "most_recent_order_timestamp", "description": "The timestamp the customer completed their most recent order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "average_order_value": {"name": "average_order_value", "description": "The average order value for the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "lifetime_total_spent": {"name": "lifetime_total_spent", "description": "The total amount of money that the customer has spent on orders across their order history.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "lifetime_total_refunded": {"name": "lifetime_total_refunded", "description": "The total amount of money that the customer has been refunded on orders across their order history.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "lifetime_total_amount": {"name": "lifetime_total_amount", "description": "The total amount of money (minus refunds) that the customer has spent across their order history.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify://models/shopify.yml", "compiled_path": "target/compiled/shopify/models/shopify__customers.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "shopify", "materialized": "table"}, "created_at": 1665703195.590558, "compiled_sql": "with __dbt__cte__shopify__customers__order_aggregates as (\nwith orders as (\n\n select *\n from `dbt-package-testing`.`dbt_test_stg_shopify`.`stg_shopify__order`\n\n), transactions as (\n\n select *\n from `dbt-package-testing`.`dbt_test_shopify`.`shopify__transactions`\n where lower(status) = 'success'\n\n), aggregated as (\n\n select\n orders.customer_id,\n orders.source_relation,\n min(orders.created_timestamp) as first_order_timestamp,\n max(orders.created_timestamp) as most_recent_order_timestamp,\n avg(case when lower(transactions.kind) in ('sale','capture') then transactions.currency_exchange_calculated_amount end) as average_order_value,\n sum(case when lower(transactions.kind) in ('sale','capture') then transactions.currency_exchange_calculated_amount end) as lifetime_total_spent,\n sum(case when lower(transactions.kind) in ('refund') then transactions.currency_exchange_calculated_amount end) as lifetime_total_refunded,\n count(distinct orders.order_id) as lifetime_count_orders\n from orders\n left join transactions\n using (order_id, source_relation)\n where customer_id is not null\n group by 1,2\n\n)\n\nselect *\nfrom aggregated\n),customers as (\n\n select \n \n\n `_fivetran_synced`,\n `has_accepted_marketing`,\n `created_timestamp`,\n `default_address_id`,\n `email`,\n `first_name`,\n `customer_id`,\n `last_name`,\n `phone`,\n `account_state`,\n `is_tax_exempt`,\n `updated_timestamp`,\n `is_verified_email`,\n `source_relation`\n from `dbt-package-testing`.`dbt_test_stg_shopify`.`stg_shopify__customer`\n\n), orders as (\n\n select *\n from __dbt__cte__shopify__customers__order_aggregates\n\n), joined as (\n\n select \n customers.*,\n orders.first_order_timestamp,\n orders.most_recent_order_timestamp,\n coalesce(orders.average_order_value, 0) as average_order_value,\n coalesce(orders.lifetime_total_spent, 0) as lifetime_total_spent,\n coalesce(orders.lifetime_total_refunded, 0) as lifetime_total_refunded,\n (coalesce(orders.lifetime_total_spent, 0) - coalesce(orders.lifetime_total_refunded, 0)) as lifetime_total_amount,\n coalesce(orders.lifetime_count_orders, 0) as lifetime_count_orders\n from customers\n left join orders\n using (customer_id, source_relation)\n\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.shopify.shopify__customers__order_aggregates", "sql": " __dbt__cte__shopify__customers__order_aggregates as (\nwith orders as (\n\n select *\n from `dbt-package-testing`.`dbt_test_stg_shopify`.`stg_shopify__order`\n\n), transactions as (\n\n select *\n from `dbt-package-testing`.`dbt_test_shopify`.`shopify__transactions`\n where lower(status) = 'success'\n\n), aggregated as (\n\n select\n orders.customer_id,\n orders.source_relation,\n min(orders.created_timestamp) as first_order_timestamp,\n max(orders.created_timestamp) as most_recent_order_timestamp,\n avg(case when lower(transactions.kind) in ('sale','capture') then transactions.currency_exchange_calculated_amount end) as average_order_value,\n sum(case when lower(transactions.kind) in ('sale','capture') then transactions.currency_exchange_calculated_amount end) as lifetime_total_spent,\n sum(case when lower(transactions.kind) in ('refund') then transactions.currency_exchange_calculated_amount end) as lifetime_total_refunded,\n count(distinct orders.order_id) as lifetime_count_orders\n from orders\n left join transactions\n using (order_id, source_relation)\n where customer_id is not null\n group by 1,2\n\n)\n\nselect *\nfrom aggregated\n)"}], "relation_name": "`dbt-package-testing`.`dbt_test_shopify`.`shopify__customers`"}, "model.shopify.shopify__order_lines": {"raw_sql": "with order_lines as (\n\n select *\n from {{ var('shopify_order_line') }}\n\n), product_variants as (\n\n select *\n from {{ var('shopify_product_variant') }}\n\n{% if fivetran_utils.enabled_vars(vars=[\"shopify__using_order_line_refund\", \"shopify__using_refund\"]) %}\n), refunds as (\n\n select *\n from {{ ref('shopify__orders__order_refunds') }}\n\n), refunds_aggregated as (\n \n select\n order_line_id,\n source_relation,\n sum(quantity) as quantity,\n sum(coalesce(subtotal, 0)) as subtotal\n from refunds\n group by 1,2\n{% endif %}\n\n), joined as (\n\n select\n order_lines.*,\n\n {% if fivetran_utils.enabled_vars(vars=[\"shopify__using_order_line_refund\", \"shopify__using_refund\"]) %}\n coalesce(refunds_aggregated.quantity,0) as refunded_quantity,\n coalesce(refunds_aggregated.subtotal,0) as refunded_subtotal,\n order_lines.quantity - coalesce(refunds_aggregated.quantity,0) as quantity_net_refunds,\n order_lines.pre_tax_price - coalesce(refunds_aggregated.subtotal,0) as subtotal_net_refunds,\n {% endif %}\n \n product_variants.created_timestamp as variant_created_at,\n product_variants.updated_timestamp as variant_updated_at,\n product_variants.inventory_item_id,\n product_variants.image_id,\n product_variants.title as variant_title,\n product_variants.price as variant_price,\n product_variants.sku as variant_sku,\n product_variants.position as variant_position,\n product_variants.inventory_policy as variant_inventory_policy,\n product_variants.compare_at_price as variant_compare_at_price,\n product_variants.fulfillment_service as variant_fulfillment_service,\n product_variants.inventory_management as variant_inventory_management,\n product_variants.is_taxable as variant_is_taxable,\n product_variants.barcode as variant_barcode,\n product_variants.grams as variant_grams,\n product_variants.inventory_quantity as variant_inventory_quantity,\n product_variants.weight as variant_weight,\n product_variants.weight_unit as variant_weight_unit,\n product_variants.option_1 as variant_option_1,\n product_variants.option_2 as variant_option_2,\n product_variants.option_3 as variant_option_3,\n product_variants.tax_code as variant_tax_code,\n product_variants.is_requiring_shipping as variant_is_requiring_shipping\n from order_lines\n {% if fivetran_utils.enabled_vars(vars=[\"shopify__using_order_line_refund\", \"shopify__using_refund\"]) %}\n left join refunds_aggregated\n on refunds_aggregated.order_line_id = order_lines.order_line_id\n and refunds_aggregated.source_relation = order_lines.source_relation\n {% endif %}\n left join product_variants\n on product_variants.variant_id = order_lines.variant_id\n and product_variants.source_relation = order_lines.source_relation\n\n)\n\nselect *\nfrom joined", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars"], "nodes": ["model.shopify_source.stg_shopify__order_line", "model.shopify_source.stg_shopify__product_variant", "model.shopify.shopify__orders__order_refunds"]}, "config": {"enabled": true, "alias": null, "schema": "shopify", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test_shopify", "fqn": ["shopify", "shopify__order_lines"], "unique_id": "model.shopify.shopify__order_lines", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify", "path": "shopify__order_lines.sql", "original_file_path": "models/shopify__order_lines.sql", "name": "shopify__order_lines", "alias": "shopify__order_lines", "checksum": {"name": "sha256", "checksum": "c9fa8308e1257375b69ec4b40135a4d1ad64fab1d9e0c14b7a353132438df5d8"}, "tags": [], "refs": [["stg_shopify__order_line"], ["stg_shopify__product_variant"], ["shopify__orders__order_refunds"]], "sources": [], "metrics": [], "description": "Each record represents a line item of an order in Shopify.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "fulfillable_quantity": {"name": "fulfillable_quantity", "description": "The amount available to fulfill, calculated as follows: quantity - max(refunded_quantity, fulfilled_quantity) - pending_fulfilled_quantity - open_fulfilled_quantity", "meta": {}, "data_type": null, "quote": null, "tags": []}, "fulfillment_service": {"name": "fulfillment_service", "description": "The service provider that's fulfilling the item.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "fulfillment_status": {"name": "fulfillment_status", "description": "How far along an order is in terms line items fulfilled.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_gift_card": {"name": "is_gift_card", "description": "Whether the item is a gift card. If true, then the item is not taxed or considered for shipping charges.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "grams": {"name": "grams", "description": "The weight of the item in grams.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_line_id": {"name": "order_line_id", "description": "The ID of the line item.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "name": {"name": "name", "description": "The name of the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_id": {"name": "order_id", "description": "The ID of the related order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "price": {"name": "price", "description": "The price of the item before discounts have been applied in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "product_id": {"name": "product_id", "description": "The ID of the product that the line item belongs to. Can be null if the original product associated with the order is deleted at a later date.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "quantity": {"name": "quantity", "description": "The number of items that were purchased.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_requiring_shipping": {"name": "is_requiring_shipping", "description": "Whether the item requires shipping.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "sku": {"name": "sku", "description": "The item's SKU (stock keeping unit).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_taxable": {"name": "is_taxable", "description": "Whether the item was taxable.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "title": {"name": "title", "description": "The title of the product.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_discount": {"name": "total_discount", "description": "The total amount of the discount allocated to the line item in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_id": {"name": "variant_id", "description": "The ID of the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "vendor": {"name": "vendor", "description": "The name of the item's supplier.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refunded_quantity": {"name": "refunded_quantity", "description": "Quantity of the item that has been refunded.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "quantity_net_refunds": {"name": "quantity_net_refunds", "description": "Quantity ordered, excluding refunds.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_barcode": {"name": "variant_barcode", "description": "The barcode, UPC, or ISBN number for the product.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_compare_at_price": {"name": "variant_compare_at_price", "description": "The original price of the item before an adjustment or a sale.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_created_at": {"name": "variant_created_at", "description": "The date and time (ISO 8601 format) when the product variant was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_fulfillment_service": {"name": "variant_fulfillment_service", "description": "The fulfillment service associated with the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_grams": {"name": "variant_grams", "description": "The weight of the product variant in grams.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_image_id": {"name": "variant_image_id", "description": "The unique numeric identifier for a product's image. The image must be associated to the same product as the variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "inventory_item_id": {"name": "inventory_item_id", "description": "The unique identifier for the inventory item, which is used in the Inventory API to query for inventory information.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_inventory_management": {"name": "variant_inventory_management", "description": "The fulfillment service that tracks the number of items in stock for the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_inventory_policy": {"name": "variant_inventory_policy", "description": "Whether customers are allowed to place an order for the product variant when it's out of stock.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_inventory_quantity": {"name": "variant_inventory_quantity", "description": "An aggregate of inventory across all locations. To adjust inventory at a specific location, use the InventoryLevel resource.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_option_1": {"name": "variant_option_1", "description": "The custom properties that a shop owner uses to define product variants. You can define three options for a product variant: option1, option2, option3.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_option_2": {"name": "variant_option_2", "description": "The custom properties that a shop owner uses to define product variants. You can define three options for a product variant: option1, option2, option3.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_option_3": {"name": "variant_option_3", "description": "The custom properties that a shop owner uses to define product variants. You can define three options for a product variant: option1, option2, option3.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_position": {"name": "variant_position", "description": "The order of the product variant in the list of product variants. The first position in the list is 1. The position of variants is indicated by the order in which they are listed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_price": {"name": "variant_price", "description": "The price of the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_is_requiring_shipping": {"name": "variant_is_requiring_shipping", "description": "This property is deprecated. Use the `requires_shipping` property on the InventoryItem resource instead.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_sku": {"name": "variant_sku", "description": "A unique identifier for the product variant in the shop. Required in order to connect to a FulfillmentService.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_is_taxable": {"name": "variant_is_taxable", "description": "Whether a tax is charged when the product variant is sold.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_title": {"name": "variant_title", "description": "The title of the product variant. The title field is a concatenation of the option1, option2, and option3 fields. You can only update title indirectly using the option fields.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_updated_at": {"name": "variant_updated_at", "description": "The date and time when the product variant was last modified. Gets returned in ISO 8601 format.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_weight": {"name": "variant_weight", "description": "The weight of the product variant in the unit system specified with weight_unit.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_weight_unit": {"name": "variant_weight_unit", "description": "The unit of measurement that applies to the product variant's weight. If you don't specify a value for weight_unit, then the shop's default unit of measurement is applied. Valid values: g, kg, oz, and lb.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refunded_subtotal": {"name": "refunded_subtotal", "description": "Subtotal amount of the refund applied to the order line.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "subtotal_net_refunds": {"name": "subtotal_net_refunds", "description": "Subtotal of the order line with refunds subtracted.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "image_id": {"name": "image_id", "description": "Image id of the product variant associated with the order line.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify://models/shopify.yml", "compiled_path": "target/compiled/shopify/models/shopify__order_lines.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "shopify", "materialized": "table"}, "created_at": 1665703195.6001742, "compiled_sql": "with __dbt__cte__shopify__orders__order_refunds as (\n\n\nwith refunds as (\n\n select *\n from `dbt-package-testing`.`dbt_test_stg_shopify`.`stg_shopify__refund`\n\n), order_line_refunds as (\n\n select *\n from `dbt-package-testing`.`dbt_test_stg_shopify`.`stg_shopify__order_line_refund`\n \n), refund_join as (\n\n select \n refunds.refund_id,\n refunds.created_at,\n refunds.order_id,\n refunds.user_id,\n refunds.source_relation,\n order_line_refunds.order_line_refund_id,\n order_line_refunds.order_line_id,\n order_line_refunds.restock_type,\n order_line_refunds.quantity,\n order_line_refunds.subtotal,\n order_line_refunds.total_tax\n from refunds\n left join order_line_refunds\n on refunds.refund_id = order_line_refunds.refund_id\n and refunds.source_relation = order_line_refunds.source_relation\n\n)\n\nselect *\nfrom refund_join\n),order_lines as (\n\n select *\n from `dbt-package-testing`.`dbt_test_stg_shopify`.`stg_shopify__order_line`\n\n), product_variants as (\n\n select *\n from `dbt-package-testing`.`dbt_test_stg_shopify`.`stg_shopify__product_variant`\n\n\n), refunds as (\n\n select *\n from __dbt__cte__shopify__orders__order_refunds\n\n), refunds_aggregated as (\n \n select\n order_line_id,\n source_relation,\n sum(quantity) as quantity,\n sum(coalesce(subtotal, 0)) as subtotal\n from refunds\n group by 1,2\n\n\n), joined as (\n\n select\n order_lines.*,\n\n \n coalesce(refunds_aggregated.quantity,0) as refunded_quantity,\n coalesce(refunds_aggregated.subtotal,0) as refunded_subtotal,\n order_lines.quantity - coalesce(refunds_aggregated.quantity,0) as quantity_net_refunds,\n order_lines.pre_tax_price - coalesce(refunds_aggregated.subtotal,0) as subtotal_net_refunds,\n \n \n product_variants.created_timestamp as variant_created_at,\n product_variants.updated_timestamp as variant_updated_at,\n product_variants.inventory_item_id,\n product_variants.image_id,\n product_variants.title as variant_title,\n product_variants.price as variant_price,\n product_variants.sku as variant_sku,\n product_variants.position as variant_position,\n product_variants.inventory_policy as variant_inventory_policy,\n product_variants.compare_at_price as variant_compare_at_price,\n product_variants.fulfillment_service as variant_fulfillment_service,\n product_variants.inventory_management as variant_inventory_management,\n product_variants.is_taxable as variant_is_taxable,\n product_variants.barcode as variant_barcode,\n product_variants.grams as variant_grams,\n product_variants.inventory_quantity as variant_inventory_quantity,\n product_variants.weight as variant_weight,\n product_variants.weight_unit as variant_weight_unit,\n product_variants.option_1 as variant_option_1,\n product_variants.option_2 as variant_option_2,\n product_variants.option_3 as variant_option_3,\n product_variants.tax_code as variant_tax_code,\n product_variants.is_requiring_shipping as variant_is_requiring_shipping\n from order_lines\n \n left join refunds_aggregated\n on refunds_aggregated.order_line_id = order_lines.order_line_id\n and refunds_aggregated.source_relation = order_lines.source_relation\n \n left join product_variants\n on product_variants.variant_id = order_lines.variant_id\n and product_variants.source_relation = order_lines.source_relation\n\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.shopify.shopify__orders__order_refunds", "sql": " __dbt__cte__shopify__orders__order_refunds as (\n\n\nwith refunds as (\n\n select *\n from `dbt-package-testing`.`dbt_test_stg_shopify`.`stg_shopify__refund`\n\n), order_line_refunds as (\n\n select *\n from `dbt-package-testing`.`dbt_test_stg_shopify`.`stg_shopify__order_line_refund`\n \n), refund_join as (\n\n select \n refunds.refund_id,\n refunds.created_at,\n refunds.order_id,\n refunds.user_id,\n refunds.source_relation,\n order_line_refunds.order_line_refund_id,\n order_line_refunds.order_line_id,\n order_line_refunds.restock_type,\n order_line_refunds.quantity,\n order_line_refunds.subtotal,\n order_line_refunds.total_tax\n from refunds\n left join order_line_refunds\n on refunds.refund_id = order_line_refunds.refund_id\n and refunds.source_relation = order_line_refunds.source_relation\n\n)\n\nselect *\nfrom refund_join\n)"}], "relation_name": "`dbt-package-testing`.`dbt_test_shopify`.`shopify__order_lines`"}, "model.shopify.shopify__calendar": {"raw_sql": "{{ dbt_utils.date_spine(\n datepart=\"day\",\n start_date=\"cast('2019-01-01' as date)\",\n end_date=\"current_date\"\n )\n}}", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt_utils.date_spine"], "nodes": []}, "config": {"enabled": true, "alias": null, "schema": "shopify", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test_shopify", "fqn": ["shopify", "utils", "shopify__calendar"], "unique_id": "model.shopify.shopify__calendar", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify", "path": "utils/shopify__calendar.sql", "original_file_path": "models/utils/shopify__calendar.sql", "name": "shopify__calendar", "alias": "shopify__calendar", "checksum": {"name": "sha256", "checksum": "330711091f6b47526ac5e8bc39960b2d171633362c0e10b666931be500abeddd"}, "tags": [], "refs": [], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify/models/utils/shopify__calendar.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "shopify", "materialized": "table"}, "created_at": 1665703195.226971, "compiled_sql": "\n\n\n\n\n\nwith rawdata as (\n\n \n\n \n\n with p as (\n select 0 as generated_number union all select 1\n ), unioned as (\n\n select\n\n \n p0.generated_number * power(2, 0)\n + \n \n p1.generated_number * power(2, 1)\n + \n \n p2.generated_number * power(2, 2)\n + \n \n p3.generated_number * power(2, 3)\n + \n \n p4.generated_number * power(2, 4)\n + \n \n p5.generated_number * power(2, 5)\n + \n \n p6.generated_number * power(2, 6)\n + \n \n p7.generated_number * power(2, 7)\n + \n \n p8.generated_number * power(2, 8)\n + \n \n p9.generated_number * power(2, 9)\n + \n \n p10.generated_number * power(2, 10)\n \n \n + 1\n as generated_number\n\n from\n\n \n p as p0\n cross join \n \n p as p1\n cross join \n \n p as p2\n cross join \n \n p as p3\n cross join \n \n p as p4\n cross join \n \n p as p5\n cross join \n \n p as p6\n cross join \n \n p as p7\n cross join \n \n p as p8\n cross join \n \n p as p9\n cross join \n \n p as p10\n \n \n\n )\n\n select *\n from unioned\n where generated_number <= 1381\n order by generated_number\n\n\n\n),\n\nall_periods as (\n\n select (\n \n\n datetime_add(\n cast( cast('2019-01-01' as date) as datetime),\n interval row_number() over (order by 1) - 1 day\n )\n\n\n ) as date_day\n from rawdata\n\n),\n\nfiltered as (\n\n select *\n from all_periods\n where date_day <= current_date\n\n)\n\nselect * from filtered\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_test_shopify`.`shopify__calendar`"}, "model.shopify.shopify__orders__order_line_aggregates": {"raw_sql": "with order_line as (\n\n select *\n from {{ var('shopify_order_line') }}\n\n), aggregated as (\n\n select \n order_id,\n source_relation,\n count(*) as line_item_count\n from order_line\n group by 1,2\n\n)\n\nselect *\nfrom aggregated", "compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["model.shopify_source.stg_shopify__order_line"]}, "config": {"enabled": true, "alias": null, "schema": "shopify", "database": null, "tags": [], "meta": {}, "materialized": "ephemeral", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test_shopify", "fqn": ["shopify", "intermediate", "shopify__orders__order_line_aggregates"], "unique_id": "model.shopify.shopify__orders__order_line_aggregates", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify", "path": "intermediate/shopify__orders__order_line_aggregates.sql", "original_file_path": "models/intermediate/shopify__orders__order_line_aggregates.sql", "name": "shopify__orders__order_line_aggregates", "alias": "shopify__orders__order_line_aggregates", "checksum": {"name": "sha256", "checksum": "837181b671b2beb8e58924357d213e33d6479a47e16c604db35cbb6ce6489fa8"}, "tags": [], "refs": [["stg_shopify__order_line"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify://models/intermediate/intermediate.yml", "compiled_path": "target/compiled/shopify/models/intermediate/shopify__orders__order_line_aggregates.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "shopify", "materialized": "ephemeral"}, "created_at": 1665703195.625797, "compiled_sql": "with order_line as (\n\n select *\n from `dbt-package-testing`.`dbt_test_stg_shopify`.`stg_shopify__order_line`\n\n), aggregated as (\n\n select \n order_id,\n source_relation,\n count(*) as line_item_count\n from order_line\n group by 1,2\n\n)\n\nselect *\nfrom aggregated", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null}, "model.shopify.shopify__customers__order_aggregates": {"raw_sql": "with orders as (\n\n select *\n from {{ var('shopify_order') }}\n\n), transactions as (\n\n select *\n from {{ ref('shopify__transactions' )}}\n where lower(status) = 'success'\n\n), aggregated as (\n\n select\n orders.customer_id,\n orders.source_relation,\n min(orders.created_timestamp) as first_order_timestamp,\n max(orders.created_timestamp) as most_recent_order_timestamp,\n avg(case when lower(transactions.kind) in ('sale','capture') then transactions.currency_exchange_calculated_amount end) as average_order_value,\n sum(case when lower(transactions.kind) in ('sale','capture') then transactions.currency_exchange_calculated_amount end) as lifetime_total_spent,\n sum(case when lower(transactions.kind) in ('refund') then transactions.currency_exchange_calculated_amount end) as lifetime_total_refunded,\n count(distinct orders.order_id) as lifetime_count_orders\n from orders\n left join transactions\n using (order_id, source_relation)\n where customer_id is not null\n group by 1,2\n\n)\n\nselect *\nfrom aggregated", "compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["model.shopify_source.stg_shopify__order", "model.shopify.shopify__transactions"]}, "config": {"enabled": true, "alias": null, "schema": "shopify", "database": null, "tags": [], "meta": {}, "materialized": "ephemeral", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test_shopify", "fqn": ["shopify", "intermediate", "shopify__customers__order_aggregates"], "unique_id": "model.shopify.shopify__customers__order_aggregates", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify", "path": "intermediate/shopify__customers__order_aggregates.sql", "original_file_path": "models/intermediate/shopify__customers__order_aggregates.sql", "name": "shopify__customers__order_aggregates", "alias": "shopify__customers__order_aggregates", "checksum": {"name": "sha256", "checksum": "902e082d29e1b00c443c6d18109a496dc53a1a7e927134bc8a523cdc106076bd"}, "tags": [], "refs": [["stg_shopify__order"], ["shopify__transactions"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify://models/intermediate/intermediate.yml", "compiled_path": "target/compiled/shopify/models/intermediate/shopify__customers__order_aggregates.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "shopify", "materialized": "ephemeral"}, "created_at": 1665703195.625571, "compiled_sql": "with orders as (\n\n select *\n from `dbt-package-testing`.`dbt_test_stg_shopify`.`stg_shopify__order`\n\n), transactions as (\n\n select *\n from `dbt-package-testing`.`dbt_test_shopify`.`shopify__transactions`\n where lower(status) = 'success'\n\n), aggregated as (\n\n select\n orders.customer_id,\n orders.source_relation,\n min(orders.created_timestamp) as first_order_timestamp,\n max(orders.created_timestamp) as most_recent_order_timestamp,\n avg(case when lower(transactions.kind) in ('sale','capture') then transactions.currency_exchange_calculated_amount end) as average_order_value,\n sum(case when lower(transactions.kind) in ('sale','capture') then transactions.currency_exchange_calculated_amount end) as lifetime_total_spent,\n sum(case when lower(transactions.kind) in ('refund') then transactions.currency_exchange_calculated_amount end) as lifetime_total_refunded,\n count(distinct orders.order_id) as lifetime_count_orders\n from orders\n left join transactions\n using (order_id, source_relation)\n where customer_id is not null\n group by 1,2\n\n)\n\nselect *\nfrom aggregated", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null}, "model.shopify.shopify__orders__order_refunds": {"raw_sql": "{{ config(enabled=fivetran_utils.enabled_vars(['shopify__using_order_line_refund','shopify__using_refund'])) }}\n\nwith refunds as (\n\n select *\n from {{ var('shopify_refund') }}\n\n), order_line_refunds as (\n\n select *\n from {{ var('shopify_order_line_refund') }}\n \n), refund_join as (\n\n select \n refunds.refund_id,\n refunds.created_at,\n refunds.order_id,\n refunds.user_id,\n refunds.source_relation,\n order_line_refunds.order_line_refund_id,\n order_line_refunds.order_line_id,\n order_line_refunds.restock_type,\n order_line_refunds.quantity,\n order_line_refunds.subtotal,\n order_line_refunds.total_tax\n from refunds\n left join order_line_refunds\n on refunds.refund_id = order_line_refunds.refund_id\n and refunds.source_relation = order_line_refunds.source_relation\n\n)\n\nselect *\nfrom refund_join", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars"], "nodes": ["model.shopify_source.stg_shopify__refund", "model.shopify_source.stg_shopify__order_line_refund"]}, "config": {"enabled": true, "alias": null, "schema": "shopify", "database": null, "tags": [], "meta": {}, "materialized": "ephemeral", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test_shopify", "fqn": ["shopify", "intermediate", "shopify__orders__order_refunds"], "unique_id": "model.shopify.shopify__orders__order_refunds", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify", "path": "intermediate/shopify__orders__order_refunds.sql", "original_file_path": "models/intermediate/shopify__orders__order_refunds.sql", "name": "shopify__orders__order_refunds", "alias": "shopify__orders__order_refunds", "checksum": {"name": "sha256", "checksum": "1bcc3be258e3bdda4c6845e465f95e7e5b4e0eee823b169e0cd5e7eff4cf7792"}, "tags": [], "refs": [["stg_shopify__refund"], ["stg_shopify__order_line_refund"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify://models/intermediate/intermediate.yml", "compiled_path": "target/compiled/shopify/models/intermediate/shopify__orders__order_refunds.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "shopify", "materialized": "ephemeral", "enabled": true}, "created_at": 1665703195.625984, "compiled_sql": "\n\nwith refunds as (\n\n select *\n from `dbt-package-testing`.`dbt_test_stg_shopify`.`stg_shopify__refund`\n\n), order_line_refunds as (\n\n select *\n from `dbt-package-testing`.`dbt_test_stg_shopify`.`stg_shopify__order_line_refund`\n \n), refund_join as (\n\n select \n refunds.refund_id,\n refunds.created_at,\n refunds.order_id,\n refunds.user_id,\n refunds.source_relation,\n order_line_refunds.order_line_refund_id,\n order_line_refunds.order_line_id,\n order_line_refunds.restock_type,\n order_line_refunds.quantity,\n order_line_refunds.subtotal,\n order_line_refunds.total_tax\n from refunds\n left join order_line_refunds\n on refunds.refund_id = order_line_refunds.refund_id\n and refunds.source_relation = order_line_refunds.source_relation\n\n)\n\nselect *\nfrom refund_join", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null}, "model.shopify_holistic_reporting.shopify_holistic_reporting__customer_enhanced": {"raw_sql": "with shopify_customers as (\n\n select *\n from {{ ref('int__shopify_customer_rollup') }}\n\n), klaviyo_persons as (\n\n select *\n from {{ ref('int__klaviyo_person_rollup') }}\n\n), combine_customer_info as (\n\n select\n coalesce(shopify_customers.email, klaviyo_persons.email) as email,\n\n coalesce(klaviyo_persons.full_name, shopify_customers.full_name) as full_name,\n shopify_customers.customer_ids as shopify_customer_ids,\n klaviyo_persons.person_ids as klaviyo_person_ids,\n coalesce(shopify_customers.phone_numbers, klaviyo_persons.phone_numbers) as phone_number,\n shopify_customers.first_shopify_account_made_at as shopify_customer_first_created_at,\n shopify_customers.last_shopify_account_made_at as shopify_customer_last_created_at,\n klaviyo_persons.first_klaviyo_account_made_at as klaviyo_person_first_created_at,\n klaviyo_persons.last_klaviyo_account_made_at as klaviyo_person_last_created_at,\n shopify_customers.last_updated_at as shopify_customer_last_updated_at,\n klaviyo_persons.last_updated_at as klaviyo_person_last_updated_at,\n shopify_customers.is_verified_email as is_shopify_email_verified,\n\n {{ dbt_utils.star(from=ref('int__shopify_customer_rollup'), relation_alias='shopify_customers', prefix='shopify_',\n except=['source_relation','email', 'full_name', 'customer_ids', 'phone_numbers', 'first_shopify_account_made_at','last_shopify_account_made_at', \n 'last_updated_at', 'is_verified_email'] ) \n }},\n shopify_customers.source_relation as shopify_source_relation,\n\n {{ dbt_utils.star(from=ref('int__klaviyo_person_rollup'), relation_alias='klaviyo_persons', prefix='klaviyo_',\n except=['source_relation','email', 'full_name', 'first_klaviyo_account_made_at', 'last_klaviyo_account_made_at', 'person_ids', 'phone_numbers', 'last_updated_at'] ) \n }},\n klaviyo_persons.source_relation as klaviyo_source_relation\n\n from shopify_customers\n full outer join klaviyo_persons \n on shopify_customers.email = lower(klaviyo_persons.email) -- redshift doesn't like doing 2 lowers here. we lowercase shopify.email in an intermediate model\n\n)\n\nselect *\nfrom combine_customer_info", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": ["model.shopify_holistic_reporting.int__shopify_customer_rollup", "model.shopify_holistic_reporting.int__klaviyo_person_rollup", "model.shopify_holistic_reporting.int__shopify_customer_rollup", "model.shopify_holistic_reporting.int__klaviyo_person_rollup"]}, "config": {"enabled": true, "alias": null, "schema": "shopify_holistic", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test_shopify_holistic", "fqn": ["shopify_holistic_reporting", "shopify_holistic_reporting__customer_enhanced"], "unique_id": "model.shopify_holistic_reporting.shopify_holistic_reporting__customer_enhanced", "package_name": "shopify_holistic_reporting", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_holistic_reporting", "path": "shopify_holistic_reporting__customer_enhanced.sql", "original_file_path": "models/shopify_holistic_reporting__customer_enhanced.sql", "name": "shopify_holistic_reporting__customer_enhanced", "alias": "shopify_holistic_reporting__customer_enhanced", "checksum": {"name": "sha256", "checksum": "db442dfeedb2bb460e284b8e3d2742abc3f9ae90d8db670d6019afc567b53a09"}, "tags": [], "refs": [["int__shopify_customer_rollup"], ["int__klaviyo_person_rollup"], ["int__shopify_customer_rollup"], ["int__klaviyo_person_rollup"]], "sources": [], "metrics": [], "description": "Table consolidating customers and their information and activity metrics from across all platforms. A full outer join is performed in order to union together users who may not exist in both sources, and personal information is coalesced to consolidate as much information as possible. Includes any custom columns specified in passthrough variables for both Shopify and Klaviyo.\nFor **Klaviyo** metrics: Counts of instances of triggered events and sums of the numeric value (i.e. revenue) associated with events (total vs organic/not attributed to flows or campaigns) will be pivoted out into columns, as configured by the klaviyo__count_metrics and klaviyo__sum_revenue_metricsvariables, respectively. See the Klaviyo dbt_project.yml file for the default metrics used. These columns will be prefixed with total_count_, total_sum_revenue_ (organic + attributed), and organic_sum_revenue_ (not attributed to a campaign or flow).\nColumns that come _only_ from one source will be prefixed with that source name (ie klaviyo_)\n", "columns": {"shopify_source_relation": {"name": "shopify_source_relation", "description": "The source where this Shopify data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioning together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_source_relation": {"name": "klaviyo_source_relation", "description": "The source where this Klaviyo data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioning together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_has_accepted_marketing": {"name": "shopify_has_accepted_marketing", "description": "Whether the customer has consented to receive marketing material via email.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_customer_first_created_at": {"name": "shopify_customer_first_created_at", "description": "The date and time when the customer account first associated with this email was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_customer_last_created_at": {"name": "shopify_customer_last_created_at", "description": "The date and time when the customer account first associated with this email was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_customer_last_updated_at": {"name": "shopify_customer_last_updated_at", "description": "Timestamp of when the shopify customer was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_default_address_id": {"name": "shopify_default_address_id", "description": "The default address for the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email": {"name": "email", "description": "The unique email address of the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "full_name": {"name": "full_name", "description": "The customer's full name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_customer_ids": {"name": "shopify_customer_ids", "description": "A comma-separated aggregated list of Shopify IDs for the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_lifetime_count_orders": {"name": "shopify_lifetime_count_orders", "description": "The number of orders associated with this customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "phone_number": {"name": "phone_number", "description": "The unique phone number (E.164 format) for this customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_account_state": {"name": "shopify_account_state", "description": "The state of the customer's account with a shop.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_is_tax_exempt": {"name": "shopify_is_tax_exempt", "description": "Whether the customer is exempt from paying taxes on their order. If true, then taxes won't be applied to an order at checkout. If false, then taxes will be applied at checkout.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_last_updated_at": {"name": "shopify_last_updated_at", "description": "The date and time when the customer information was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_shopify_email_verified": {"name": "is_shopify_email_verified", "description": "Whether the customer has verified their email address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_first_order_at": {"name": "shopify_first_order_at", "description": "The timestamp the customer completed their first order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_last_order_at": {"name": "shopify_last_order_at", "description": "The timestamp the customer completed their most recent order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_average_order_value": {"name": "shopify_average_order_value", "description": "The average order value for the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_lifetime_total_spent": {"name": "shopify_lifetime_total_spent", "description": "The total amount of money that the customer has spent on orders across their order history.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_lifetime_total_refunded": {"name": "shopify_lifetime_total_refunded", "description": "The total amount of money that the customer has been refunded on orders across their order history.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_lifetime_total_amount": {"name": "shopify_lifetime_total_amount", "description": "The total amount of money (minus refunds) that the customer has spent across their order history.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_person_id": {"name": "klaviyo_person_id", "description": "Unique ID of the user if you use your own unique identifier. Otherwise, Klaviyo recommends using the email as the primary key. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_address_1": {"name": "klaviyo_address_1", "description": "First line of the person's address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_address_2": {"name": "klaviyo_address_2", "description": "Second line of the person's address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_city": {"name": "klaviyo_city", "description": "City they live in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_country": {"name": "klaviyo_country", "description": "Country they live in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_zip": {"name": "klaviyo_zip", "description": "Postal code where they live.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_person_created_at": {"name": "klaviyo_person_created_at", "description": "Timestamp of when the person's profile was created in Klaviyo.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_latitude": {"name": "klaviyo_latitude", "description": "Latitude of the person's location.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_longitude": {"name": "klaviyo_longitude", "description": "Longitude of the person's location.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_organization": {"name": "klaviyo_organization", "description": "Business organization they belong to.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_region": {"name": "klaviyo_region", "description": "Region or state they live in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_timezone": {"name": "klaviyo_timezone", "description": "Timezone they are situated in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_title": {"name": "klaviyo_title", "description": "Title at their business or organization.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_person_updated_at": {"name": "klaviyo_person_updated_at", "description": "Timestamp of when the person profile was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_count_total_campaigns": {"name": "klaviyo_count_total_campaigns", "description": "Count of the number of campaigns this person has interacted with.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_count_total_flows": {"name": "klaviyo_count_total_flows", "description": "Count of the number of flows this person has interacted with.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_first_event_at": {"name": "klaviyo_first_event_at", "description": "Timestamp of when the user first triggered an event (not limited to campaign and flow interactions).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_last_event_at": {"name": "klaviyo_last_event_at", "description": "Timestamp of when the user last triggered an event (not limited to campaign and flow interactions).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_first_campaign_touch_at": {"name": "klaviyo_first_campaign_touch_at", "description": "Timestamp of when the user first interacted with a campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_last_campaign_touch_at": {"name": "klaviyo_last_campaign_touch_at", "description": "Timestamp of when the user last interacted with a campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_first_flow_touch_at": {"name": "klaviyo_first_flow_touch_at", "description": "Timestamp of when the user first interacted with a flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_last_flow_touch_at": {"name": "klaviyo_last_flow_touch_at", "description": "Timestamp of when the user last interacted with a flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify_holistic_reporting://models/shopify_holistic_reporting.yml", "compiled_path": "target/compiled/shopify_holistic_reporting/models/shopify_holistic_reporting__customer_enhanced.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "shopify_holistic"}, "created_at": 1665703195.641831, "compiled_sql": "with shopify_customers as (\n\n select *\n from `dbt-package-testing`.`dbt_test_shopify_holistic`.`int__shopify_customer_rollup`\n\n), klaviyo_persons as (\n\n select *\n from `dbt-package-testing`.`dbt_test_shopify_holistic`.`int__klaviyo_person_rollup`\n\n), combine_customer_info as (\n\n select\n coalesce(shopify_customers.email, klaviyo_persons.email) as email,\n\n coalesce(klaviyo_persons.full_name, shopify_customers.full_name) as full_name,\n shopify_customers.customer_ids as shopify_customer_ids,\n klaviyo_persons.person_ids as klaviyo_person_ids,\n coalesce(shopify_customers.phone_numbers, klaviyo_persons.phone_numbers) as phone_number,\n shopify_customers.first_shopify_account_made_at as shopify_customer_first_created_at,\n shopify_customers.last_shopify_account_made_at as shopify_customer_last_created_at,\n klaviyo_persons.first_klaviyo_account_made_at as klaviyo_person_first_created_at,\n klaviyo_persons.last_klaviyo_account_made_at as klaviyo_person_last_created_at,\n shopify_customers.last_updated_at as shopify_customer_last_updated_at,\n klaviyo_persons.last_updated_at as klaviyo_person_last_updated_at,\n shopify_customers.is_verified_email as is_shopify_email_verified,\n\n \n\n shopify_customers.`first_order_at` as `shopify_first_order_at`,\n shopify_customers.`last_order_at` as `shopify_last_order_at`,\n shopify_customers.`lifetime_total_spent` as `shopify_lifetime_total_spent`,\n shopify_customers.`lifetime_total_refunded` as `shopify_lifetime_total_refunded`,\n shopify_customers.`lifetime_total_amount` as `shopify_lifetime_total_amount`,\n shopify_customers.`lifetime_count_orders` as `shopify_lifetime_count_orders`,\n shopify_customers.`average_order_value` as `shopify_average_order_value`,\n shopify_customers.`has_accepted_marketing` as `shopify_has_accepted_marketing`,\n shopify_customers.`is_tax_exempt` as `shopify_is_tax_exempt`,\n shopify_customers.`default_address_id` as `shopify_default_address_id`,\n shopify_customers.`account_state` as `shopify_account_state`,\n shopify_customers.source_relation as shopify_source_relation,\n\n \n\n klaviyo_persons.`first_event_at` as `klaviyo_first_event_at`,\n klaviyo_persons.`last_event_at` as `klaviyo_last_event_at`,\n klaviyo_persons.`first_campaign_touch_at` as `klaviyo_first_campaign_touch_at`,\n klaviyo_persons.`last_campaign_touch_at` as `klaviyo_last_campaign_touch_at`,\n klaviyo_persons.`first_flow_touch_at` as `klaviyo_first_flow_touch_at`,\n klaviyo_persons.`last_flow_touch_at` as `klaviyo_last_flow_touch_at`,\n klaviyo_persons.`count_total_campaigns` as `klaviyo_count_total_campaigns`,\n klaviyo_persons.`count_total_flows` as `klaviyo_count_total_flows`,\n klaviyo_persons.`address_1` as `klaviyo_address_1`,\n klaviyo_persons.`address_2` as `klaviyo_address_2`,\n klaviyo_persons.`city` as `klaviyo_city`,\n klaviyo_persons.`country` as `klaviyo_country`,\n klaviyo_persons.`zip` as `klaviyo_zip`,\n klaviyo_persons.`latitude` as `klaviyo_latitude`,\n klaviyo_persons.`longitude` as `klaviyo_longitude`,\n klaviyo_persons.`organization` as `klaviyo_organization`,\n klaviyo_persons.`region` as `klaviyo_region`,\n klaviyo_persons.`timezone` as `klaviyo_timezone`,\n klaviyo_persons.`title` as `klaviyo_title`,\n klaviyo_persons.`total_sum_revenue_refunded_order` as `klaviyo_total_sum_revenue_refunded_order`,\n klaviyo_persons.`organic_sum_revenue_refunded_order` as `klaviyo_organic_sum_revenue_refunded_order`,\n klaviyo_persons.`total_sum_revenue_placed_order` as `klaviyo_total_sum_revenue_placed_order`,\n klaviyo_persons.`organic_sum_revenue_placed_order` as `klaviyo_organic_sum_revenue_placed_order`,\n klaviyo_persons.`total_sum_revenue_ordered_product` as `klaviyo_total_sum_revenue_ordered_product`,\n klaviyo_persons.`organic_sum_revenue_ordered_product` as `klaviyo_organic_sum_revenue_ordered_product`,\n klaviyo_persons.`total_sum_revenue_checkout_started` as `klaviyo_total_sum_revenue_checkout_started`,\n klaviyo_persons.`organic_sum_revenue_checkout_started` as `klaviyo_organic_sum_revenue_checkout_started`,\n klaviyo_persons.`total_sum_revenue_cancelled_order` as `klaviyo_total_sum_revenue_cancelled_order`,\n klaviyo_persons.`organic_sum_revenue_cancelled_order` as `klaviyo_organic_sum_revenue_cancelled_order`,\n klaviyo_persons.`total_count_active_on_site` as `klaviyo_total_count_active_on_site`,\n klaviyo_persons.`total_count_viewed_product` as `klaviyo_total_count_viewed_product`,\n klaviyo_persons.`total_count_ordered_product` as `klaviyo_total_count_ordered_product`,\n klaviyo_persons.`total_count_placed_order` as `klaviyo_total_count_placed_order`,\n klaviyo_persons.`total_count_refunded_order` as `klaviyo_total_count_refunded_order`,\n klaviyo_persons.`total_count_cancelled_order` as `klaviyo_total_count_cancelled_order`,\n klaviyo_persons.`total_count_fulfilled_order` as `klaviyo_total_count_fulfilled_order`,\n klaviyo_persons.`total_count_received_email` as `klaviyo_total_count_received_email`,\n klaviyo_persons.`total_count_clicked_email` as `klaviyo_total_count_clicked_email`,\n klaviyo_persons.`total_count_opened_email` as `klaviyo_total_count_opened_email`,\n klaviyo_persons.`total_count_bounced_email` as `klaviyo_total_count_bounced_email`,\n klaviyo_persons.`total_count_marked_email_as_spam` as `klaviyo_total_count_marked_email_as_spam`,\n klaviyo_persons.`total_count_dropped_email` as `klaviyo_total_count_dropped_email`,\n klaviyo_persons.`total_count_subscribed_to_list` as `klaviyo_total_count_subscribed_to_list`,\n klaviyo_persons.`total_count_unsubscribed_to_list` as `klaviyo_total_count_unsubscribed_to_list`,\n klaviyo_persons.`total_count_unsubscribed` as `klaviyo_total_count_unsubscribed`,\n klaviyo_persons.`total_count_updated_email_preferences` as `klaviyo_total_count_updated_email_preferences`,\n klaviyo_persons.`total_count_subscribed_to_back_in_stock` as `klaviyo_total_count_subscribed_to_back_in_stock`,\n klaviyo_persons.`total_count_merged_profile` as `klaviyo_total_count_merged_profile`,\n klaviyo_persons.`total_count_received_sms` as `klaviyo_total_count_received_sms`,\n klaviyo_persons.`total_count_clicked_sms` as `klaviyo_total_count_clicked_sms`,\n klaviyo_persons.`total_count_consented_to_receive_sms` as `klaviyo_total_count_consented_to_receive_sms`,\n klaviyo_persons.`total_count_sent_sms` as `klaviyo_total_count_sent_sms`,\n klaviyo_persons.`total_count_unsubscribed_from_sms` as `klaviyo_total_count_unsubscribed_from_sms`,\n klaviyo_persons.`total_count_failed_to_deliver_sms` as `klaviyo_total_count_failed_to_deliver_sms`,\n klaviyo_persons.source_relation as klaviyo_source_relation\n\n from shopify_customers\n full outer join klaviyo_persons \n on shopify_customers.email = lower(klaviyo_persons.email) -- redshift doesn't like doing 2 lowers here. we lowercase shopify.email in an intermediate model\n\n)\n\nselect *\nfrom combine_customer_info", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_test_shopify_holistic`.`shopify_holistic_reporting__customer_enhanced`"}, "model.shopify_holistic_reporting.shopify_holistic_reporting__orders_attribution": {"raw_sql": "{{\n config(\n materialized='incremental',\n unique_key='unique_order_key',\n partition_by={\n \"field\": \"created_timestamp\",\n \"data_type\": \"timestamp\"\n } if target.type == 'bigquery' else none,\n incremental_strategy = 'merge' if target.type not in ('postgres', 'redshift') else 'delete+insert',\n file_format = 'delta'\n )\n}}\n\nwith orders as (\n\n select *\n from {{ ref('shopify__orders') }}\n\n -- just grab new + newly updated orders\n {% if is_incremental() %}\n where updated_timestamp >= (select max(updated_timestamp) from {{ this }})\n {% endif %}\n\n), events as (\n\n select \n *\n from {{ ref('klaviyo__events') }}\n\n where \n coalesce(last_touch_campaign_id, last_touch_flow_id) is not null\n {% if var('klaviyo__eligible_attribution_events') != [] %}\n and lower(type) in {{ \"('\" ~ (var('klaviyo__eligible_attribution_events') | join(\"', '\")) ~ \"')\" }}\n {% endif %}\n\n -- only grab the events for users who are in the new increment of orders\n {% if is_incremental() %}\n and lower(person_email) in (select distinct lower(email) from orders)\n {% endif %}\n\n), join_orders_w_events as (\n\n select \n orders.*,\n events.last_touch_campaign_id,\n events.last_touch_flow_id,\n events.variation_id as last_touch_variation_id,\n events.campaign_name as last_touch_campaign_name,\n events.campaign_subject_line as last_touch_campaign_subject_line,\n events.flow_name as last_touch_flow_name,\n events.campaign_type as last_touch_campaign_type,\n events.event_id as last_touch_event_id,\n events.occurred_at as last_touch_event_occurred_at,\n events.type as last_touch_event_type,\n events.integration_name as last_touch_integration_name,\n events.integration_category as last_touch_integration_category,\n events.source_relation as klaviyo_source_relation\n\n from orders \n left join events on \n lower(orders.email) = lower(events.person_email)\n and {{ dbt_utils.datediff('events.occurred_at', 'orders.created_timestamp', 'hour') }} <= (\n case when events.type like '%sms%' then {{ var('klaviyo__sms_attribution_lookback') }}\n else {{ var('klaviyo__email_attribution_lookback') }} end)\n and orders.created_timestamp > events.occurred_at\n\n), order_events as (\n\n select\n *,\n row_number() over (partition by order_id order by last_touch_event_occurred_at desc) as event_index,\n\n -- the order was made after X interactions with campaign/flow\n count(last_touch_event_id) over (partition by order_id, last_touch_campaign_id) as count_interactions_with_campaign,\n count(last_touch_event_id) over (partition by order_id, last_touch_flow_id) as count_interactions_with_flow\n\n\n from join_orders_w_events\n\n), last_touches as (\n\n select \n {{ dbt_utils.star(from=ref('shopify__orders'), except=['source_relation']) }},\n last_touch_campaign_id is not null or last_touch_flow_id is not null as is_attributed,\n last_touch_campaign_id,\n last_touch_flow_id,\n last_touch_variation_id,\n last_touch_campaign_name,\n last_touch_campaign_subject_line,\n last_touch_campaign_type,\n last_touch_flow_name,\n case when last_touch_campaign_id is not null then count_interactions_with_campaign else null end as count_interactions_with_campaign, -- will be null if it's associated with a flow\n count_interactions_with_flow, -- will be null if it's associated with a campaign\n last_touch_event_id,\n last_touch_event_occurred_at,\n last_touch_event_type,\n last_touch_integration_name,\n last_touch_integration_category,\n source_relation as shopify_source_relation,\n klaviyo_source_relation,\n {{ dbt_utils.surrogate_key(['order_id', 'source_relation']) }} as unique_order_key\n\n from order_events\n where event_index = 1\n)\n\nselect *\nfrom last_touches", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt.is_incremental", "macro.dbt_utils.datediff", "macro.dbt_utils.star", "macro.dbt_utils.surrogate_key"], "nodes": ["model.shopify.shopify__orders", "model.klaviyo.klaviyo__events", "model.shopify.shopify__orders"]}, "config": {"enabled": true, "alias": null, "schema": "shopify_holistic", "database": null, "tags": [], "meta": {}, "materialized": "incremental", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": "unique_order_key", "on_schema_change": "ignore", "grants": {}, "partition_by": {"field": "created_timestamp", "data_type": "timestamp"}, "incremental_strategy": "merge", "file_format": "delta", "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test_shopify_holistic", "fqn": ["shopify_holistic_reporting", "shopify_holistic_reporting__orders_attribution"], "unique_id": "model.shopify_holistic_reporting.shopify_holistic_reporting__orders_attribution", "package_name": "shopify_holistic_reporting", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_holistic_reporting", "path": "shopify_holistic_reporting__orders_attribution.sql", "original_file_path": "models/shopify_holistic_reporting__orders_attribution.sql", "name": "shopify_holistic_reporting__orders_attribution", "alias": "shopify_holistic_reporting__orders_attribution", "checksum": {"name": "sha256", "checksum": "73fb2fe152a44cae675c50dde3179125d102ace0e7450e941072ce481be68efa"}, "tags": [], "refs": [["shopify__orders"], ["klaviyo__events"], ["shopify__orders"]], "sources": [], "metrics": [], "description": "Table of Shopify orders, enriched with a last-touch attribution model associating orders (as conversions) to campaigns or flows in Klaviyo. \nBy default, the package performs attribution [in line with Klaviyo](https://help.klaviyo.com/hc/en-us/articles/115005248128). It considers email opens and clicks, and SMS opens as the events eligible to be credited with orders. This attribution-eligibility can be configured by the `klaviyo__eligible_attribution_events` variable. \nSimilar to the Klaviyo app, the package by default considers the conversion period/lookback window for email events to be 120 hours (5 days) and 24 hours for SMS events. These can be configured through the `klaviyo__email_attribution_lookback` and `klaviyo__sms_attribution_lookback` variables, respectively (in integer-hours).\nRefer to the Klaviyo package [README](https://github.com/fivetran/dbt_klaviyo#attribution-lookback-window) for more details.\nMaterialized incrementally by default.\n", "columns": {"app_id": {"name": "app_id", "description": "The ID of the app that created the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_address_1": {"name": "billing_address_address_1", "description": "The street address of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_address_2": {"name": "billing_address_address_2", "description": "An optional additional field for the street address of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_city": {"name": "billing_address_city", "description": "The city, town, or village of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_company": {"name": "billing_address_company", "description": "The company of the person associated with the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_country": {"name": "billing_address_country", "description": "The name of the country of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_country_code": {"name": "billing_address_country_code", "description": "The two-letter code (ISO 3166-1 format) for the country of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_first_name": {"name": "billing_address_first_name", "description": "The first name of the person associated with the payment method.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_last_name": {"name": "billing_address_last_name", "description": "The last name of the person associated with the payment method.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_latitude": {"name": "billing_address_latitude", "description": "The latitude of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_longitude": {"name": "billing_address_longitude", "description": "The longitude of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_name": {"name": "billing_address_name", "description": "The full name of the person associated with the payment method.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_phone": {"name": "billing_address_phone", "description": "The phone number at the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_province": {"name": "billing_address_province", "description": "The name of the region (province, state, prefecture, \u2026) of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_province_code": {"name": "billing_address_province_code", "description": "The two-letter abbreviation of the region of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_zip": {"name": "billing_address_zip", "description": "The postal code (zip, postcode, Eircode, \u2026) of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "browser_ip": {"name": "browser_ip", "description": "The IP address of the browser used by the customer when they placed the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "has_buyer_accepted_marketing": {"name": "has_buyer_accepted_marketing", "description": "Whether the customer consented to receive email updates from the shop.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "cancel_reason": {"name": "cancel_reason", "description": "The reason why the order was canceled.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "cancelled_timestamp": {"name": "cancelled_timestamp", "description": "The date and time when the order was canceled.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "cart_token": {"name": "cart_token", "description": "The ID of the cart that's associated with the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "closed_timestamp": {"name": "closed_timestamp", "description": "The date and time when the order was closed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_timestamp": {"name": "created_timestamp", "description": "The autogenerated date and time when the order was created in Shopify.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "The three-letter code for the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "customer_id": {"name": "customer_id", "description": "The ID of the order's customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email": {"name": "email", "description": "The customer's email address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "financial_status": {"name": "financial_status", "description": "The status of payments associated with the order. Can only be set when the order is created", "meta": {}, "data_type": null, "quote": null, "tags": []}, "fulfillment_status": {"name": "fulfillment_status", "description": "The order's status in terms of fulfilled line items.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_id": {"name": "order_id", "description": "The ID of the order, used for API purposes. This is different from the order_number property, which is the ID used by the shop owner and customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "landing_site_base_url": {"name": "landing_site_base_url", "description": "The URL for the page where the buyer landed when they entered the shop.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "location_id": {"name": "location_id", "description": "The ID of the physical location where the order was processed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "name": {"name": "name", "description": "The order name, generated by combining the order_number property with the order prefix and suffix that are set in the merchant's general settings.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "note": {"name": "note", "description": "An optional note that a shop owner can attach to the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "number": {"name": "number", "description": "The order's position in the shop's count of orders. Numbers are sequential and start at 1.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_number": {"name": "order_number", "description": "The order 's position in the shop's count of orders starting at 1001. Order numbers are sequential and start at 1001.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "processed_timestamp": {"name": "processed_timestamp", "description": "The date and time when an order was processed. This value is the date that appears on your orders and that's used in the analytic reports.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "processing_method": {"name": "processing_method", "description": "How the payment was processed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "referring_site": {"name": "referring_site", "description": "The website where the customer clicked a link to the shop.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_address_1": {"name": "shipping_address_address_1", "description": "The street address of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_address_2": {"name": "shipping_address_address_2", "description": "An optional additional field for the street address of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_city": {"name": "shipping_address_city", "description": "The city, town, or village of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_company": {"name": "shipping_address_company", "description": "The company of the person associated with the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_country": {"name": "shipping_address_country", "description": "The name of the country of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_country_code": {"name": "shipping_address_country_code", "description": "The two-letter code (ISO 3166-1 format) for the country of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_first_name": {"name": "shipping_address_first_name", "description": "The first name of the person associated with the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_last_name": {"name": "shipping_address_last_name", "description": "The last name of the person associated with the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_latitude": {"name": "shipping_address_latitude", "description": "The latitude of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_longitude": {"name": "shipping_address_longitude", "description": "The longitude of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_name": {"name": "shipping_address_name", "description": "The full name of the person associated with the payment method.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_phone": {"name": "shipping_address_phone", "description": "The phone number at the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_province": {"name": "shipping_address_province", "description": "The name of the region (province, state, prefecture, \u2026) of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_province_code": {"name": "shipping_address_province_code", "description": "The two-letter abbreviation of the region of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_zip": {"name": "shipping_address_zip", "description": "The postal code (zip, postcode, Eircode, \u2026) of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_name": {"name": "source_name", "description": "Where the order originated. Can be set only during order creation, and is not writeable afterwards.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "subtotal_price": {"name": "subtotal_price", "description": "The price of the order in the shop currency after discounts but before shipping, taxes, and tips.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "has_taxes_included": {"name": "has_taxes_included", "description": "Whether taxes are included in the order subtotal.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_test_order": {"name": "is_test_order", "description": "Whether this is a test order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "token": {"name": "token", "description": "A unique token for the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_discounts": {"name": "total_discounts", "description": "The total discounts applied to the price of the order in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_line_items_price": {"name": "total_line_items_price", "description": "The sum of all line item prices in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_price": {"name": "total_price", "description": "The sum of all line item prices, discounts, shipping, taxes, and tips in the shop currency. Must be positive.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_tax": {"name": "total_tax", "description": "The sum of all the taxes applied to the order in th shop currency. Must be positive).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_weight": {"name": "total_weight", "description": "The sum of all line item weights in grams.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_timestamp": {"name": "updated_timestamp", "description": "The date and time (ISO 8601 format) when the order was last modified.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "user_id": {"name": "user_id", "description": "The ID of the user logged into Shopify POS who processed the order, if applicable.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "line_item_count": {"name": "line_item_count", "description": "Number of line items included in the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "customer_order_seq_number": {"name": "customer_order_seq_number", "description": "The sequential number of the order as it relates to the customer", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_vs_repeat": {"name": "new_vs_repeat", "description": "Whether the order was a new or repeat order for the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_cost": {"name": "shipping_cost", "description": "The shipping cost of the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_adjustment_amount": {"name": "order_adjustment_amount", "description": "Total adjustment amount applied to the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_adjustment_tax_amount": {"name": "order_adjustment_tax_amount", "description": "Total tax applied to the adjustment on the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refund_subtotal": {"name": "refund_subtotal", "description": "Total refund amount applied to the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refund_total_tax": {"name": "refund_total_tax", "description": "Total tax applied to the refund on the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_adjusted_total": {"name": "order_adjusted_total", "description": "Order total adjusted for refunds and other adjustments. The calculation used for this field is as follows: total price listed on the original order (including shipping costs and discounts) + adjustments + adjustments tax - total refunds - refunds tax The order_adjusted_total will equate to the total sales - refunds listed within the transactions table for the order (after currency exchange).\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "index": {"name": "index", "description": "Field representing the index of the order line in relation to the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "pre_tax_price": {"name": "pre_tax_price", "description": "The pre tax price of the order line.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "checkout_token": {"name": "checkout_token", "description": "The checkout token applied to the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_shipping_price_set": {"name": "total_shipping_price_set", "description": "The total shipping price set to the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_campaign_id": {"name": "last_touch_campaign_id", "description": "The Klaviyo campaign that the order has been attributed to by the package.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_flow_id": {"name": "last_touch_flow_id", "description": "The Klaviyo flow that the order has been attributed to by the package.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_variation_id": {"name": "last_touch_variation_id", "description": "Unique ID of the attributed Klaviyo flow or campaign variation group. This does not map onto another table. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_campaign_name": {"name": "last_touch_campaign_name", "description": "Name of the attributed Klaviyo campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_campaign_subject_line": {"name": "last_touch_campaign_subject_line", "description": "Email subject line of the attributed Klaviyo campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_flow_name": {"name": "last_touch_flow_name", "description": "Name of the attributed Klaviyo flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_campaign_type": {"name": "last_touch_campaign_type", "description": "Type of Klaviyo campaign that the order is attributed to.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_event_id": {"name": "last_touch_event_id", "description": "Unique Klaviyo event id of the interaction the customer had with the campaign or flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_event_occurred_at": {"name": "last_touch_event_occurred_at", "description": "Timestamp of when the customer interacted with the attributed campaign/flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_event_type": {"name": "last_touch_event_type", "description": "Type of interaction that the customer had with the campaign or flow. Will be one of the event types specified by the `klaviyo__eligible_attribution_events` variable. By default, this is just email opens, email clicks, and sms opens.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_integration_name": {"name": "last_touch_integration_name", "description": "Name of the platform that tracked the campaign/flow interaction (either Klaviyo, the API, or another integration).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_integration_category": {"name": "last_touch_integration_category", "description": "Use-case category of the platform that sent the campaign/flow interaction event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_source_relation": {"name": "shopify_source_relation", "description": "The source where this Shopify data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioning together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_source_relation": {"name": "klaviyo_source_relation", "description": "The source where Klaviyo campaign/flow data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioning together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "count_interactions_with_campaign": {"name": "count_interactions_with_campaign", "description": "The count of distinct attributable events the customer had with the campaign throughout the attribution window.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "count_interactions_with_flow": {"name": "count_interactions_with_flow", "description": "The count of distinct attributable events the customer had with the flow throughout the attribution window.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify_holistic_reporting://models/shopify_holistic_reporting.yml", "compiled_path": "target/compiled/shopify_holistic_reporting/models/shopify_holistic_reporting__orders_attribution.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "incremental", "schema": "shopify_holistic", "unique_key": "unique_order_key", "partition_by": {"field": "created_timestamp", "data_type": "timestamp"}, "incremental_strategy": "merge", "file_format": "delta"}, "created_at": 1665703195.65953, "compiled_sql": "\n\nwith orders as (\n\n select *\n from `dbt-package-testing`.`dbt_test_shopify`.`shopify__orders`\n\n -- just grab new + newly updated orders\n \n where updated_timestamp >= (select max(updated_timestamp) from `dbt-package-testing`.`dbt_test_shopify_holistic`.`shopify_holistic_reporting__orders_attribution`)\n \n\n), events as (\n\n select \n *\n from `dbt-package-testing`.`dbt_test_klaviyo`.`klaviyo__events`\n\n where \n coalesce(last_touch_campaign_id, last_touch_flow_id) is not null\n \n and lower(type) in ('opened email', 'clicked email', 'clicked sms')\n \n\n -- only grab the events for users who are in the new increment of orders\n \n and lower(person_email) in (select distinct lower(email) from orders)\n \n\n), join_orders_w_events as (\n\n select \n orders.*,\n events.last_touch_campaign_id,\n events.last_touch_flow_id,\n events.variation_id as last_touch_variation_id,\n events.campaign_name as last_touch_campaign_name,\n events.campaign_subject_line as last_touch_campaign_subject_line,\n events.flow_name as last_touch_flow_name,\n events.campaign_type as last_touch_campaign_type,\n events.event_id as last_touch_event_id,\n events.occurred_at as last_touch_event_occurred_at,\n events.type as last_touch_event_type,\n events.integration_name as last_touch_integration_name,\n events.integration_category as last_touch_integration_category,\n events.source_relation as klaviyo_source_relation\n\n from orders \n left join events on \n lower(orders.email) = lower(events.person_email)\n and datetime_diff(\n cast(orders.created_timestamp as datetime),\n cast(events.occurred_at as datetime),\n hour\n ) <= (\n case when events.type like '%sms%' then 24\n else 120 end)\n and orders.created_timestamp > events.occurred_at\n\n), order_events as (\n\n select\n *,\n row_number() over (partition by order_id order by last_touch_event_occurred_at desc) as event_index,\n\n -- the order was made after X interactions with campaign/flow\n count(last_touch_event_id) over (partition by order_id, last_touch_campaign_id) as count_interactions_with_campaign,\n count(last_touch_event_id) over (partition by order_id, last_touch_flow_id) as count_interactions_with_flow\n\n\n from join_orders_w_events\n\n), last_touches as (\n\n select \n \n\n `order_id`,\n `processed_timestamp`,\n `updated_timestamp`,\n `user_id`,\n `total_discounts`,\n `total_line_items_price`,\n `total_price`,\n `total_tax`,\n `source_name`,\n `subtotal_price`,\n `has_taxes_included`,\n `total_weight`,\n `landing_site_base_url`,\n `location_id`,\n `name`,\n `note`,\n `number`,\n `order_number`,\n `cancel_reason`,\n `cancelled_timestamp`,\n `cart_token`,\n `checkout_token`,\n `closed_timestamp`,\n `created_timestamp`,\n `currency`,\n `customer_id`,\n `email`,\n `financial_status`,\n `fulfillment_status`,\n `processing_method`,\n `referring_site`,\n `billing_address_address_1`,\n `billing_address_address_2`,\n `billing_address_city`,\n `billing_address_company`,\n `billing_address_country`,\n `billing_address_country_code`,\n `billing_address_first_name`,\n `billing_address_last_name`,\n `billing_address_latitude`,\n `billing_address_longitude`,\n `billing_address_name`,\n `billing_address_phone`,\n `billing_address_province`,\n `billing_address_province_code`,\n `billing_address_zip`,\n `browser_ip`,\n `has_buyer_accepted_marketing`,\n `total_shipping_price_set`,\n `shipping_address_address_1`,\n `shipping_address_address_2`,\n `shipping_address_city`,\n `shipping_address_company`,\n `shipping_address_country`,\n `shipping_address_country_code`,\n `shipping_address_first_name`,\n `shipping_address_last_name`,\n `shipping_address_latitude`,\n `shipping_address_longitude`,\n `shipping_address_name`,\n `shipping_address_phone`,\n `shipping_address_province`,\n `shipping_address_province_code`,\n `shipping_address_zip`,\n `is_test_order`,\n `token`,\n `_fivetran_synced`,\n `shipping_cost`,\n `order_adjustment_amount`,\n `order_adjustment_tax_amount`,\n `refund_subtotal`,\n `refund_total_tax`,\n `order_adjusted_total`,\n `line_item_count`,\n `customer_order_seq_number`,\n `new_vs_repeat`,\n last_touch_campaign_id is not null or last_touch_flow_id is not null as is_attributed,\n last_touch_campaign_id,\n last_touch_flow_id,\n last_touch_variation_id,\n last_touch_campaign_name,\n last_touch_campaign_subject_line,\n last_touch_campaign_type,\n last_touch_flow_name,\n case when last_touch_campaign_id is not null then count_interactions_with_campaign else null end as count_interactions_with_campaign, -- will be null if it's associated with a flow\n count_interactions_with_flow, -- will be null if it's associated with a campaign\n last_touch_event_id,\n last_touch_event_occurred_at,\n last_touch_event_type,\n last_touch_integration_name,\n last_touch_integration_category,\n source_relation as shopify_source_relation,\n klaviyo_source_relation,\n to_hex(md5(cast(coalesce(cast(order_id as \n string\n), '') || '-' || coalesce(cast(source_relation as \n string\n), '') as \n string\n))) as unique_order_key\n\n from order_events\n where event_index = 1\n)\n\nselect *\nfrom last_touches", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_test_shopify_holistic`.`shopify_holistic_reporting__orders_attribution`"}, "model.shopify_holistic_reporting.shopify_holistic_reporting__daily_customer_metrics": {"raw_sql": "with shopify_daily as (\n\n select *\n from {{ ref('int__daily_shopify_customer_orders') }}\n\n), klaviyo_daily as (\n\n select *\n from {{ ref('int__daily_klaviyo_user_metrics') }}\n\n), combine_histories as (\n\n select \n coalesce(shopify_daily.date_day, klaviyo_daily.date_day) as date_day,\n coalesce(shopify_daily.email, klaviyo_daily.email) as email,\n\n -- when the below is null, these are unattributed actions\n coalesce(shopify_daily.last_touch_campaign_id, klaviyo_daily.last_touch_campaign_id) as campaign_id,\n coalesce(shopify_daily.last_touch_flow_id, klaviyo_daily.last_touch_flow_id) as flow_id,\n coalesce(shopify_daily.last_touch_campaign_name, klaviyo_daily.campaign_name) as campaign_name,\n coalesce(shopify_daily.last_touch_flow_name, klaviyo_daily.flow_name) as flow_name,\n coalesce(shopify_daily.last_touch_variation_id, klaviyo_daily.variation_id) as variation_id,\n coalesce(shopify_daily.last_touch_campaign_subject_line, klaviyo_daily.campaign_subject_line) as campaign_subject_line,\n coalesce(shopify_daily.last_touch_campaign_type, klaviyo_daily.campaign_type) as campaign_type,\n \n {{ dbt_utils.star(from=ref('int__daily_shopify_customer_orders'), relation_alias='shopify_daily', prefix='shopify_',\n except=['source_relation','date_day', 'email', 'last_touch_variation_id', 'last_touch_flow_name', 'last_touch_campaign_name', 'last_touch_flow_id', 'last_touch_campaign_id', 'last_touch_campaign_subject_line', 'last_touch_campaign_type']) }},\n shopify_daily.source_relation as shopify_source_relation,\n\n {{ dbt_utils.star(from=ref('int__daily_klaviyo_user_metrics'), relation_alias='klaviyo_daily', prefix='klaviyo_',\n except=['source_relation','date_day', 'email', 'variation_id', 'flow_name', 'campaign_name', 'last_touch_flow_id', 'last_touch_campaign_id', 'campaign_subject_line', 'campaign_type']) }},\n klaviyo_daily.source_relation as klaviyo_source_relation\n\n from shopify_daily\n full outer join klaviyo_daily\n on lower(shopify_daily.email) = lower(klaviyo_daily.email)\n and shopify_daily.date_day = klaviyo_daily.date_day\n)\n\nselect *\nfrom combine_histories", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": ["model.shopify_holistic_reporting.int__daily_shopify_customer_orders", "model.shopify_holistic_reporting.int__daily_klaviyo_user_metrics", "model.shopify_holistic_reporting.int__daily_shopify_customer_orders", "model.shopify_holistic_reporting.int__daily_klaviyo_user_metrics"]}, "config": {"enabled": true, "alias": null, "schema": "shopify_holistic", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test_shopify_holistic", "fqn": ["shopify_holistic_reporting", "shopify_holistic_reporting__daily_customer_metrics"], "unique_id": "model.shopify_holistic_reporting.shopify_holistic_reporting__daily_customer_metrics", "package_name": "shopify_holistic_reporting", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_holistic_reporting", "path": "shopify_holistic_reporting__daily_customer_metrics.sql", "original_file_path": "models/shopify_holistic_reporting__daily_customer_metrics.sql", "name": "shopify_holistic_reporting__daily_customer_metrics", "alias": "shopify_holistic_reporting__daily_customer_metrics", "checksum": {"name": "sha256", "checksum": "971dcdccf88ae613b19a18bff1ebb515f480d4fd5fb1c4ae1c8cfb3c0d07072d"}, "tags": [], "refs": [["int__daily_shopify_customer_orders"], ["int__daily_klaviyo_user_metrics"], ["int__daily_shopify_customer_orders"], ["int__daily_klaviyo_user_metrics"]], "sources": [], "metrics": [], "description": "Table that aggregates Shopify and Klaviyo metrics to the day-customer-campaign or day-customer-flow grain (but note that if a user interacts with 2 different variations of a flow/campaign somehow, they will have 2 records). Also note that non-attributed (to Klaviyo at least) orders and interactions (someone with null campaign_id/flow_id) are included in this table. \nFor **Klaviyo**: **Counts** of the instances of the events, as well as **sums** of the numeric value associated with events (i.e. revenue) will be pivoted out into columns, as configured by the `klaviyo__count_metrics` and `klaviyo__sum_revenue_metrics` variables, respectively. See the dbt_project.yml file for the default metrics used. These columns will be prefixed with `count_` and `sum_revenue_`.\nNote that 0-activity days will not appear. \n", "columns": {"date_day": {"name": "date_day", "description": "Day on which the customer performed these activities.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email": {"name": "email", "description": "Email address of the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Foreign key referencing the CAMPAIGN attributed with these metrics (by the package's attribution model).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_id": {"name": "flow_id", "description": "Foreign key referencing the FLOW attributed with these metrics (by the package's attribution model).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_name": {"name": "campaign_name", "description": "Name of the attributed campaign. If not specified, this will default to the subject of the campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_name": {"name": "flow_name", "description": "Name of the attributed flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variation_id": {"name": "variation_id", "description": "Unique ID of the attributed flow or campaign variation group. This does not map onto another table. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_first_event_at": {"name": "klaviyo_first_event_at", "description": "Timestamp of the first interaction between this campaign/flow and a person on this day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_last_event_at": {"name": "klaviyo_last_event_at", "description": "Timestamp of the last interaction between this campaign/flow and a person on this day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_subject_line": {"name": "campaign_subject_line", "description": "Email subject line of the Klaviyo campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_type": {"name": "campaign_type", "description": "Type of campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_source_relation": {"name": "shopify_source_relation", "description": "The source where this Shopify data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioning together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "klaviyo_source_relation": {"name": "klaviyo_source_relation", "description": "The source where this Klaviyo data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioning together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_total_orders": {"name": "shopify_total_orders", "description": "Total number of orders the customer placed on this day, associated with this campaign or flow. Includes canceled orders.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_total_price": {"name": "shopify_total_price", "description": "Total adjusted price the customer paid on this day, associated with this campaign or flow, in shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_count_line_items": {"name": "shopify_count_line_items", "description": "The count of order line items the customer placed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_total_line_items_price": {"name": "shopify_total_line_items_price", "description": "The sum of all line item prices in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_total_discounts": {"name": "shopify_total_discounts", "description": "The sum of discounts applied to the customer's orders, in shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_total_tax": {"name": "shopify_total_tax", "description": "The sum of taxes paid by the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_total_shipping_cost": {"name": "shopify_total_shipping_cost", "description": "The sum of shipping costs paid.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_total_refund_subtotal": {"name": "shopify_total_refund_subtotal", "description": "Total amount refunded by the customer. Note that that `date_day` will be when the order was created, not refunded.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_total_refund_tax": {"name": "shopify_total_refund_tax", "description": "Total tax applied to the customer's refunds.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_count_cancelled_orders": {"name": "shopify_count_cancelled_orders", "description": "The count of orders that the customer made on this day and canceled.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_count_products": {"name": "shopify_count_products", "description": "The count of distinct products (based on distinct `product_ids`) that the customer purchased.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_count_product_variants": {"name": "shopify_count_product_variants", "description": "The count of distinct products variants that the customer purchased.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_sum_quantity": {"name": "shopify_sum_quantity", "description": "The total quantity of items that the customer purchased.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_total_order_adjustment_amount": {"name": "shopify_total_order_adjustment_amount", "description": "The total amount of adjustments made to the customer's orders.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shopify_total_order_adjustment_tax_amount": {"name": "shopify_total_order_adjustment_tax_amount", "description": "The total amount of taxes applied to adjustments made to the customer's orders.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify_holistic_reporting://models/shopify_holistic_reporting.yml", "compiled_path": "target/compiled/shopify_holistic_reporting/models/shopify_holistic_reporting__daily_customer_metrics.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "schema": "shopify_holistic"}, "created_at": 1665703195.645756, "compiled_sql": "with shopify_daily as (\n\n select *\n from `dbt-package-testing`.`dbt_test_shopify_holistic`.`int__daily_shopify_customer_orders`\n\n), klaviyo_daily as (\n\n select *\n from `dbt-package-testing`.`dbt_test_shopify_holistic`.`int__daily_klaviyo_user_metrics`\n\n), combine_histories as (\n\n select \n coalesce(shopify_daily.date_day, klaviyo_daily.date_day) as date_day,\n coalesce(shopify_daily.email, klaviyo_daily.email) as email,\n\n -- when the below is null, these are unattributed actions\n coalesce(shopify_daily.last_touch_campaign_id, klaviyo_daily.last_touch_campaign_id) as campaign_id,\n coalesce(shopify_daily.last_touch_flow_id, klaviyo_daily.last_touch_flow_id) as flow_id,\n coalesce(shopify_daily.last_touch_campaign_name, klaviyo_daily.campaign_name) as campaign_name,\n coalesce(shopify_daily.last_touch_flow_name, klaviyo_daily.flow_name) as flow_name,\n coalesce(shopify_daily.last_touch_variation_id, klaviyo_daily.variation_id) as variation_id,\n coalesce(shopify_daily.last_touch_campaign_subject_line, klaviyo_daily.campaign_subject_line) as campaign_subject_line,\n coalesce(shopify_daily.last_touch_campaign_type, klaviyo_daily.campaign_type) as campaign_type,\n \n \n\n shopify_daily.`total_orders` as `shopify_total_orders`,\n shopify_daily.`total_price` as `shopify_total_price`,\n shopify_daily.`count_line_items` as `shopify_count_line_items`,\n shopify_daily.`total_line_items_price` as `shopify_total_line_items_price`,\n shopify_daily.`total_discounts` as `shopify_total_discounts`,\n shopify_daily.`total_tax` as `shopify_total_tax`,\n shopify_daily.`total_shipping_cost` as `shopify_total_shipping_cost`,\n shopify_daily.`total_refund_subtotal` as `shopify_total_refund_subtotal`,\n shopify_daily.`total_refund_tax` as `shopify_total_refund_tax`,\n shopify_daily.`count_cancelled_orders` as `shopify_count_cancelled_orders`,\n shopify_daily.`count_products` as `shopify_count_products`,\n shopify_daily.`count_product_variants` as `shopify_count_product_variants`,\n shopify_daily.`sum_quantity` as `shopify_sum_quantity`,\n shopify_daily.`total_order_adjustment_amount` as `shopify_total_order_adjustment_amount`,\n shopify_daily.`total_order_adjustment_tax_amount` as `shopify_total_order_adjustment_tax_amount`,\n shopify_daily.source_relation as shopify_source_relation,\n\n \n\n klaviyo_daily.`first_event_at` as `klaviyo_first_event_at`,\n klaviyo_daily.`last_event_at` as `klaviyo_last_event_at`,\n klaviyo_daily.`sum_revenue_refunded_order` as `klaviyo_sum_revenue_refunded_order`,\n klaviyo_daily.`sum_revenue_placed_order` as `klaviyo_sum_revenue_placed_order`,\n klaviyo_daily.`sum_revenue_ordered_product` as `klaviyo_sum_revenue_ordered_product`,\n klaviyo_daily.`sum_revenue_checkout_started` as `klaviyo_sum_revenue_checkout_started`,\n klaviyo_daily.`sum_revenue_cancelled_order` as `klaviyo_sum_revenue_cancelled_order`,\n klaviyo_daily.`count_active_on_site` as `klaviyo_count_active_on_site`,\n klaviyo_daily.`count_viewed_product` as `klaviyo_count_viewed_product`,\n klaviyo_daily.`count_ordered_product` as `klaviyo_count_ordered_product`,\n klaviyo_daily.`count_placed_order` as `klaviyo_count_placed_order`,\n klaviyo_daily.`count_refunded_order` as `klaviyo_count_refunded_order`,\n klaviyo_daily.`count_received_email` as `klaviyo_count_received_email`,\n klaviyo_daily.`count_clicked_email` as `klaviyo_count_clicked_email`,\n klaviyo_daily.`count_opened_email` as `klaviyo_count_opened_email`,\n klaviyo_daily.`count_marked_email_as_spam` as `klaviyo_count_marked_email_as_spam`,\n klaviyo_daily.`count_unsubscribed` as `klaviyo_count_unsubscribed`,\n klaviyo_daily.`count_received_sms` as `klaviyo_count_received_sms`,\n klaviyo_daily.`count_clicked_sms` as `klaviyo_count_clicked_sms`,\n klaviyo_daily.`count_sent_sms` as `klaviyo_count_sent_sms`,\n klaviyo_daily.`count_unsubscribed_from_sms` as `klaviyo_count_unsubscribed_from_sms`,\n klaviyo_daily.source_relation as klaviyo_source_relation\n\n from shopify_daily\n full outer join klaviyo_daily\n on lower(shopify_daily.email) = lower(klaviyo_daily.email)\n and shopify_daily.date_day = klaviyo_daily.date_day\n)\n\nselect *\nfrom combine_histories", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_test_shopify_holistic`.`shopify_holistic_reporting__daily_customer_metrics`"}, "model.shopify_holistic_reporting.int__daily_shopify_customer_orders": {"raw_sql": "with orders as (\n\n select *\n from {{ ref('shopify_holistic_reporting__orders_attribution') }}\n\n), order_lines as (\n\n select *\n from {{ ref('shopify__order_lines') }}\n\n), order_line_metrics as (\n\n select \n order_id,\n source_relation,\n count(distinct product_id) as count_products,\n count(distinct product_id || '-' || variant_id) as count_product_variants,\n sum(quantity) as sum_quantity\n \n from order_lines\n group by 1,2\n\n), join_orders as (\n\n select \n orders.*,\n order_line_metrics.count_products,\n order_line_metrics.count_product_variants,\n order_line_metrics.sum_quantity\n\n from orders \n left join order_line_metrics\n on orders.order_id = order_line_metrics.order_id\n and orders.shopify_source_relation = order_line_metrics.source_relation\n\n), daily_order_metrics as (\n\n select\n cast( {{ dbt_utils.date_trunc('day', 'created_timestamp') }} as date) as date_day,\n email,\n last_touch_campaign_id,\n last_touch_flow_id,\n last_touch_campaign_name,\n last_touch_flow_name,\n last_touch_variation_id,\n last_touch_campaign_subject_line,\n last_touch_campaign_type,\n shopify_source_relation as source_relation,\n\n count(distinct order_id) as total_orders,\n sum(order_adjusted_total) as total_price,\n\n sum(line_item_count) as count_line_items,\n sum(total_line_items_price) as total_line_items_price,\n \n\n sum(total_discounts) as total_discounts,\n sum(total_tax) as total_tax,\n sum(shipping_cost) as total_shipping_cost,\n\n {% if fivetran_utils.enabled_vars(vars=[\"shopify__using_order_line_refund\", \"shopify__using_refund\"]) %}\n sum(refund_subtotal) as total_refund_subtotal,\n sum(refund_total_tax) as total_refund_tax,\n {% endif %}\n\n sum(case when cancelled_timestamp is not null then 1 else 0 end) as count_cancelled_orders,\n sum(count_products) as count_products,\n sum(count_product_variants) as count_product_variants,\n sum(sum_quantity) as sum_quantity\n\n {% if var('shopify__using_order_adjustment', true) %}\n , sum(order_adjustment_amount) as total_order_adjustment_amount\n , sum(order_adjustment_tax_amount) as total_order_adjustment_tax_amount\n {% endif %}\n \n\n from join_orders\n {{ dbt_utils.group_by(n=10)}}\n)\n\nselect *\nfrom daily_order_metrics", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt_utils.date_trunc", "macro.fivetran_utils.enabled_vars", "macro.dbt_utils.group_by"], "nodes": ["model.shopify_holistic_reporting.shopify_holistic_reporting__orders_attribution", "model.shopify.shopify__order_lines"]}, "config": {"enabled": true, "alias": null, "schema": "shopify_holistic", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test_shopify_holistic", "fqn": ["shopify_holistic_reporting", "intermediate", "int__daily_shopify_customer_orders"], "unique_id": "model.shopify_holistic_reporting.int__daily_shopify_customer_orders", "package_name": "shopify_holistic_reporting", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_holistic_reporting", "path": "intermediate/int__daily_shopify_customer_orders.sql", "original_file_path": "models/intermediate/int__daily_shopify_customer_orders.sql", "name": "int__daily_shopify_customer_orders", "alias": "int__daily_shopify_customer_orders", "checksum": {"name": "sha256", "checksum": "d72f384b963f98264127d5e031e2e30ac3cafbc48bbf79494b80bd8367e1b0a2"}, "tags": [], "refs": [["shopify_holistic_reporting__orders_attribution"], ["shopify__order_lines"]], "sources": [], "metrics": [], "description": "", "columns": {"date_day": {"name": "date_day", "description": "Day on which the customer performed these activities.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email": {"name": "email", "description": "Email address of the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_campaign_id": {"name": "last_touch_campaign_id", "description": "Foreign key referencing the CAMPAIGN attributed with these metrics (by the package's attribution model).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_flow_id": {"name": "last_touch_flow_id", "description": "Foreign key referencing the FLOW attributed with these metrics (by the package's attribution model).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_campaign_name": {"name": "last_touch_campaign_name", "description": "Name of the attributed campaign. If not specified, this will default to the subject of the campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_flow_name": {"name": "last_touch_flow_name", "description": "Name of the attributed flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_variation_id": {"name": "last_touch_variation_id", "description": "Unique ID of the attributed flow or campaign variation group. This does not map onto another table. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_campaign_subject_line": {"name": "last_touch_campaign_subject_line", "description": "Email subject line of the Klaviyo campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_campaign_type": {"name": "last_touch_campaign_type", "description": "Type of campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_relation": {"name": "source_relation", "description": "The source where this Shopify data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioning together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_orders": {"name": "total_orders", "description": "Total number of orders the customer placed on this day, associated with this campaign or flow. Includes canceled orders.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_price": {"name": "total_price", "description": "Total adjusted price the customer paid on this day, associated with this campaign or flow, in shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "count_line_items": {"name": "count_line_items", "description": "The count of order line items the customer placed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_line_items_price": {"name": "total_line_items_price", "description": "The sum of all line item prices in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_discounts": {"name": "total_discounts", "description": "The sum of discounts applied to the customer's orders, in shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_tax": {"name": "total_tax", "description": "The sum of taxes paid by the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_shipping_cost": {"name": "total_shipping_cost", "description": "The sum of shipping costs paid.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_refund_subtotal": {"name": "total_refund_subtotal", "description": "Total amount refunded by the customer. Note that that `date_day` will be when the order was created, not refunded.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_refund_tax": {"name": "total_refund_tax", "description": "Total tax applied to the customer's refunds.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "count_cancelled_orders": {"name": "count_cancelled_orders", "description": "The count of orders that the customer made on this day and canceled.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "count_products": {"name": "count_products", "description": "The count of distinct products (based on distinct `product_ids`) that the customer purchased.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "count_product_variants": {"name": "count_product_variants", "description": "The count of distinct products variants that the customer purchased.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "sum_quantity": {"name": "sum_quantity", "description": "The total quantity of items that the customer purchased.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_order_adjustment_amount": {"name": "total_order_adjustment_amount", "description": "The total amount of adjustments made to the customer's orders.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_order_adjustment_tax_amount": {"name": "total_order_adjustment_tax_amount", "description": "The total amount of taxes applied to adjustments made to the customer's orders.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify_holistic_reporting://models/intermediate/int_shopify_holistic_reporting.yml", "compiled_path": "target/compiled/shopify_holistic_reporting/models/intermediate/int__daily_shopify_customer_orders.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "shopify_holistic"}, "created_at": 1665703195.675806, "compiled_sql": "with orders as (\n\n select *\n from `dbt-package-testing`.`dbt_test_shopify_holistic`.`shopify_holistic_reporting__orders_attribution`\n\n), order_lines as (\n\n select *\n from `dbt-package-testing`.`dbt_test_shopify`.`shopify__order_lines`\n\n), order_line_metrics as (\n\n select \n order_id,\n source_relation,\n count(distinct product_id) as count_products,\n count(distinct product_id || '-' || variant_id) as count_product_variants,\n sum(quantity) as sum_quantity\n \n from order_lines\n group by 1,2\n\n), join_orders as (\n\n select \n orders.*,\n order_line_metrics.count_products,\n order_line_metrics.count_product_variants,\n order_line_metrics.sum_quantity\n\n from orders \n left join order_line_metrics\n on orders.order_id = order_line_metrics.order_id\n and orders.shopify_source_relation = order_line_metrics.source_relation\n\n), daily_order_metrics as (\n\n select\n cast( timestamp_trunc(\n cast(created_timestamp as timestamp),\n day\n ) as date) as date_day,\n email,\n last_touch_campaign_id,\n last_touch_flow_id,\n last_touch_campaign_name,\n last_touch_flow_name,\n last_touch_variation_id,\n last_touch_campaign_subject_line,\n last_touch_campaign_type,\n shopify_source_relation as source_relation,\n\n count(distinct order_id) as total_orders,\n sum(order_adjusted_total) as total_price,\n\n sum(line_item_count) as count_line_items,\n sum(total_line_items_price) as total_line_items_price,\n \n\n sum(total_discounts) as total_discounts,\n sum(total_tax) as total_tax,\n sum(shipping_cost) as total_shipping_cost,\n\n \n sum(refund_subtotal) as total_refund_subtotal,\n sum(refund_total_tax) as total_refund_tax,\n \n\n sum(case when cancelled_timestamp is not null then 1 else 0 end) as count_cancelled_orders,\n sum(count_products) as count_products,\n sum(count_product_variants) as count_product_variants,\n sum(sum_quantity) as sum_quantity\n\n \n , sum(order_adjustment_amount) as total_order_adjustment_amount\n , sum(order_adjustment_tax_amount) as total_order_adjustment_tax_amount\n \n \n\n from join_orders\n group by 1,2,3,4,5,6,7,8,9,10\n)\n\nselect *\nfrom daily_order_metrics", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_test_shopify_holistic`.`int__daily_shopify_customer_orders`"}, "model.shopify_holistic_reporting.int__shopify_customer_rollup": {"raw_sql": "with customers as (\n\n select \n *,\n row_number() over(partition by email order by created_timestamp desc) as customer_index\n\n from {{ ref('shopify__customers') }}\n\n where email is not null -- nonsensical to include any null emails in this package\n\n), aggregate_customers as (\n\n select\n lower(email) as email,\n source_relation,\n {{ fivetran_utils.string_agg(\"cast(customer_id as \" ~ dbt_utils.type_string() ~ \")\", \"', '\") }} as customer_ids,\n {{ fivetran_utils.string_agg(\"distinct cast(phone as \" ~ dbt_utils.type_string() ~ \")\", \"', '\") }} as phone_numbers,\n\n max(case when customer_index = 1 then first_name || ' ' || last_name else null end) as full_name,\n\n min(created_timestamp) as first_shopify_account_made_at,\n max(created_timestamp) as last_shopify_account_made_at,\n min(first_order_timestamp) as first_order_at,\n max(most_recent_order_timestamp) as last_order_at,\n max(updated_timestamp) as last_updated_at,\n\n -- sum across accounts\n sum(lifetime_total_spent) as lifetime_total_spent,\n sum(lifetime_total_refunded) as lifetime_total_refunded,\n sum(lifetime_total_amount) as lifetime_total_amount,\n sum(lifetime_count_orders) as lifetime_count_orders,\n case \n when sum(lifetime_count_orders) = 0 then 0\n else sum(lifetime_total_spent) / sum(lifetime_count_orders) end as average_order_value,\n\n -- take true if ever given for boolean fields\n {{ fivetran_utils.max_bool(\"has_accepted_marketing\") }} as has_accepted_marketing,\n {{ fivetran_utils.max_bool(\"case when customer_index = 1 then is_tax_exempt else null end\") }} as is_tax_exempt, -- since this changes every year\n {{ fivetran_utils.max_bool(\"is_verified_email\") }} as is_verified_email,\n\n -- other stuff\n max(case when customer_index = 1 then default_address_id else null end) as default_address_id,\n max(case when customer_index = 1 then account_state else null end) as account_state\n\n -- ok let's get any custom passthrough columns! might want to put all max(Case when)'s in here....\n {% set cols = adapter.get_columns_in_relation(ref('shopify__customers')) %}\n {% set except_cols = ['_fivetran_synced', 'email', 'source_relation', 'customer_id', 'phone', 'first_name', 'last_name', 'created_timestamp', 'first_order_timestamp', 'most_recent_order_timestamp',\n 'updated_timestamp', 'lifetime_total_spent', 'lifetime_total_refunded', 'lifetime_total_amount', 'lifetime_count_orders', 'average_order_value', 'has_accepted_marketing',\n 'is_tax_exempt', 'is_verified_email', 'default_address_id', 'account_state'] %}\n {% for col in cols %}\n {% if col.column|lower not in except_cols %}\n , max(case when customer_index = 1 then {{ col.column }} else null end) as {{ col.column }}\n {% endif %}\n {% endfor %}\n\n from customers \n\n group by 1,2\n\n)\n\nselect *\nfrom aggregate_customers", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt_utils.type_string", "macro.fivetran_utils.string_agg", "macro.fivetran_utils.max_bool"], "nodes": ["model.shopify.shopify__customers", "model.shopify.shopify__customers"]}, "config": {"enabled": true, "alias": null, "schema": "shopify_holistic", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test_shopify_holistic", "fqn": ["shopify_holistic_reporting", "intermediate", "int__shopify_customer_rollup"], "unique_id": "model.shopify_holistic_reporting.int__shopify_customer_rollup", "package_name": "shopify_holistic_reporting", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_holistic_reporting", "path": "intermediate/int__shopify_customer_rollup.sql", "original_file_path": "models/intermediate/int__shopify_customer_rollup.sql", "name": "int__shopify_customer_rollup", "alias": "int__shopify_customer_rollup", "checksum": {"name": "sha256", "checksum": "4ee4ea4a1e004aa732004a879fff8a885afe00f56e679b43ae87032740905bff"}, "tags": [], "refs": [["shopify__customers"], ["shopify__customers"]], "sources": [], "metrics": [], "description": "Table rolling up shopify customer accounts to the email level. In theory, these should be 1:1, but under certain circumstances (ie bots) one email can be associated with multiple customer_ids.\n", "columns": {"source_relation": {"name": "source_relation", "description": "The source where this data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioning together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "has_accepted_marketing": {"name": "has_accepted_marketing", "description": "Whether the customer has consented to receive marketing material via email.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_shopify_account_made_at": {"name": "first_shopify_account_made_at", "description": "The date and time when the customer account first associated with this email was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_shopify_account_made_at": {"name": "last_shopify_account_made_at", "description": "The date and time when the customer account first associated with this email was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "default_address_id": {"name": "default_address_id", "description": "The default address for the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email": {"name": "email", "description": "The unique email address of the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "full_name": {"name": "full_name", "description": "The customer's full name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "customer_ids": {"name": "customer_ids", "description": "A comma-separated aggregated list of Shopify IDs for the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "lifetime_count_orders": {"name": "lifetime_count_orders", "description": "The number of orders associated with this customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "phone_numbers": {"name": "phone_numbers", "description": "Comma separated aggregated list of unique phone numbers (E.164 format) for this customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "account_state": {"name": "account_state", "description": "The state of the customer's account with a shop.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_tax_exempt": {"name": "is_tax_exempt", "description": "Whether the customer is exempt from paying taxes on their order. If true, then taxes won't be applied to an order at checkout. If false, then taxes will be applied at checkout.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_updated_at": {"name": "last_updated_at", "description": "The date and time when the customer information was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_order_at": {"name": "first_order_at", "description": "The timestamp the customer completed their first order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_order_at": {"name": "last_order_at", "description": "The timestamp the customer completed their most recent order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "average_order_value": {"name": "average_order_value", "description": "The average order value for the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "lifetime_total_spent": {"name": "lifetime_total_spent", "description": "The total amount of money that the customer has spent on orders across their order history.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "lifetime_total_refunded": {"name": "lifetime_total_refunded", "description": "The total amount of money that the customer has been refunded on orders across their order history.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "lifetime_total_amount": {"name": "lifetime_total_amount", "description": "The total amount of money (minus refunds) that the customer has spent across their order history.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_verified_email": {"name": "is_verified_email", "description": "Whether the customer has verified their email address.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify_holistic_reporting://models/intermediate/int_shopify_holistic_reporting.yml", "compiled_path": "target/compiled/shopify_holistic_reporting/models/intermediate/int__shopify_customer_rollup.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "shopify_holistic"}, "created_at": 1665703195.678601, "compiled_sql": "with customers as (\n\n select \n *,\n row_number() over(partition by email order by created_timestamp desc) as customer_index\n\n from `dbt-package-testing`.`dbt_test_shopify`.`shopify__customers`\n\n where email is not null -- nonsensical to include any null emails in this package\n\n), aggregate_customers as (\n\n select\n lower(email) as email,\n source_relation,\n \n string_agg(cast(customer_id as \n string\n), ', ')\n\n as customer_ids,\n \n string_agg(distinct cast(phone as \n string\n), ', ')\n\n as phone_numbers,\n\n max(case when customer_index = 1 then first_name || ' ' || last_name else null end) as full_name,\n\n min(created_timestamp) as first_shopify_account_made_at,\n max(created_timestamp) as last_shopify_account_made_at,\n min(first_order_timestamp) as first_order_at,\n max(most_recent_order_timestamp) as last_order_at,\n max(updated_timestamp) as last_updated_at,\n\n -- sum across accounts\n sum(lifetime_total_spent) as lifetime_total_spent,\n sum(lifetime_total_refunded) as lifetime_total_refunded,\n sum(lifetime_total_amount) as lifetime_total_amount,\n sum(lifetime_count_orders) as lifetime_count_orders,\n case \n when sum(lifetime_count_orders) = 0 then 0\n else sum(lifetime_total_spent) / sum(lifetime_count_orders) end as average_order_value,\n\n -- take true if ever given for boolean fields\n \n\n max( has_accepted_marketing )\n\n as has_accepted_marketing,\n \n\n max( case when customer_index = 1 then is_tax_exempt else null end )\n\n as is_tax_exempt, -- since this changes every year\n \n\n max( is_verified_email )\n\n as is_verified_email,\n\n -- other stuff\n max(case when customer_index = 1 then default_address_id else null end) as default_address_id,\n max(case when customer_index = 1 then account_state else null end) as account_state\n\n -- ok let's get any custom passthrough columns! might want to put all max(Case when)'s in here....\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n from customers \n\n group by 1,2\n\n)\n\nselect *\nfrom aggregate_customers", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_test_shopify_holistic`.`int__shopify_customer_rollup`"}, "model.shopify_holistic_reporting.int__daily_klaviyo_user_metrics": {"raw_sql": "with events as (\n\n select *\n from {{ ref('klaviyo__events') }}\n\n), pivot_out_events as (\n \n select \n cast( {{ dbt_utils.date_trunc('day', 'occurred_at') }} as date) as date_day,\n person_email as email,\n last_touch_campaign_id,\n last_touch_flow_id,\n campaign_name,\n flow_name,\n variation_id,\n campaign_subject_line,\n campaign_type,\n source_relation,\n min(occurred_at) as first_event_at,\n max(occurred_at) as last_event_at\n\n -- sum up the numeric value associated with events (most likely will mean revenue)\n {% for rm in var('klaviyo__sum_revenue_metrics') %}\n , sum(case when lower(type) = '{{ rm | lower }}' then \n coalesce({{ fivetran_utils.try_cast(\"numeric_value\", \"numeric\") }}, 0)\n else 0 end) \n as {{ 'sum_revenue_' ~ rm | replace(' ', '_') | replace('(', '') | replace(')', '') | lower }} -- removing special characters that I have seen in different integration events\n {% endfor %}\n\n -- count up the number of instances of each metric\n {% for cm in var('klaviyo__count_metrics') %}\n , sum(case when lower(type) = '{{ cm | lower }}' then 1 else 0 end) \n as {{ 'count_' ~ cm | replace(' ', '_') | replace('(', '') | replace(')', '') | lower }} -- removing special characters that I have seen in different integration events\n {% endfor %}\n\n from events\n {{ dbt_utils.group_by(n=10) }}\n)\n\n-- the grain will be person-flow-campaign-variation-day\nselect *\nfrom pivot_out_events", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.dbt_utils.date_trunc", "macro.fivetran_utils.try_cast", "macro.dbt_utils.group_by"], "nodes": ["model.klaviyo.klaviyo__events"]}, "config": {"enabled": true, "alias": null, "schema": "shopify_holistic", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test_shopify_holistic", "fqn": ["shopify_holistic_reporting", "intermediate", "int__daily_klaviyo_user_metrics"], "unique_id": "model.shopify_holistic_reporting.int__daily_klaviyo_user_metrics", "package_name": "shopify_holistic_reporting", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_holistic_reporting", "path": "intermediate/int__daily_klaviyo_user_metrics.sql", "original_file_path": "models/intermediate/int__daily_klaviyo_user_metrics.sql", "name": "int__daily_klaviyo_user_metrics", "alias": "int__daily_klaviyo_user_metrics", "checksum": {"name": "sha256", "checksum": "9074aea6aba5dc661a9c2bf48cfddff3d94f7729b5ce0fd29316de663883d7b8"}, "tags": [], "refs": [["klaviyo__events"]], "sources": [], "metrics": [], "description": "", "columns": {"date_day": {"name": "date_day", "description": "Day on which the customer performed these activities.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email": {"name": "email", "description": "Email address of the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_campaign_id": {"name": "last_touch_campaign_id", "description": "Foreign key referencing the CAMPAIGN attributed with these metrics (by the package's attribution model).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_touch_flow_id": {"name": "last_touch_flow_id", "description": "Foreign key referencing the FLOW attributed with these metrics (by the package's attribution model).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_name": {"name": "campaign_name", "description": "Name of the attributed campaign. If not specified, this will default to the subject of the campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_name": {"name": "flow_name", "description": "Name of the attributed flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variation_id": {"name": "variation_id", "description": "Unique ID of the attributed flow or campaign variation group. This does not map onto another table. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_event_at": {"name": "first_event_at", "description": "Timestamp of the first interaction between this campaign/flow and a person on this day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_event_at": {"name": "last_event_at", "description": "Timestamp of the last interaction between this campaign/flow and a person on this day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_subject_line": {"name": "campaign_subject_line", "description": "Email subject line of the Klaviyo campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_type": {"name": "campaign_type", "description": "Type of campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_relation": {"name": "source_relation", "description": "The source where this Klaviyo data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioning together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify_holistic_reporting://models/intermediate/int_shopify_holistic_reporting.yml", "compiled_path": "target/compiled/shopify_holistic_reporting/models/intermediate/int__daily_klaviyo_user_metrics.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "shopify_holistic"}, "created_at": 1665703195.6721249, "compiled_sql": "with events as (\n\n select *\n from `dbt-package-testing`.`dbt_test_klaviyo`.`klaviyo__events`\n\n), pivot_out_events as (\n \n select \n cast( timestamp_trunc(\n cast(occurred_at as timestamp),\n day\n ) as date) as date_day,\n person_email as email,\n last_touch_campaign_id,\n last_touch_flow_id,\n campaign_name,\n flow_name,\n variation_id,\n campaign_subject_line,\n campaign_type,\n source_relation,\n min(occurred_at) as first_event_at,\n max(occurred_at) as last_event_at\n\n -- sum up the numeric value associated with events (most likely will mean revenue)\n \n , sum(case when lower(type) = 'refunded order' then \n coalesce(\n \n safe_cast(numeric_value as numeric)\n\n, 0)\n else 0 end) \n as sum_revenue_refunded_order -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'placed order' then \n coalesce(\n \n safe_cast(numeric_value as numeric)\n\n, 0)\n else 0 end) \n as sum_revenue_placed_order -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'ordered product' then \n coalesce(\n \n safe_cast(numeric_value as numeric)\n\n, 0)\n else 0 end) \n as sum_revenue_ordered_product -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'checkout started' then \n coalesce(\n \n safe_cast(numeric_value as numeric)\n\n, 0)\n else 0 end) \n as sum_revenue_checkout_started -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'cancelled order' then \n coalesce(\n \n safe_cast(numeric_value as numeric)\n\n, 0)\n else 0 end) \n as sum_revenue_cancelled_order -- removing special characters that I have seen in different integration events\n \n\n -- count up the number of instances of each metric\n \n , sum(case when lower(type) = 'active on site' then 1 else 0 end) \n as count_active_on_site -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'viewed product' then 1 else 0 end) \n as count_viewed_product -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'ordered product' then 1 else 0 end) \n as count_ordered_product -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'placed order' then 1 else 0 end) \n as count_placed_order -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'refunded order' then 1 else 0 end) \n as count_refunded_order -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'received email' then 1 else 0 end) \n as count_received_email -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'clicked email' then 1 else 0 end) \n as count_clicked_email -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'opened email' then 1 else 0 end) \n as count_opened_email -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'marked email as spam' then 1 else 0 end) \n as count_marked_email_as_spam -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'unsubscribed' then 1 else 0 end) \n as count_unsubscribed -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'received sms' then 1 else 0 end) \n as count_received_sms -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'clicked sms' then 1 else 0 end) \n as count_clicked_sms -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'sent sms' then 1 else 0 end) \n as count_sent_sms -- removing special characters that I have seen in different integration events\n \n , sum(case when lower(type) = 'unsubscribed from sms' then 1 else 0 end) \n as count_unsubscribed_from_sms -- removing special characters that I have seen in different integration events\n \n\n from events\n group by 1,2,3,4,5,6,7,8,9,10\n)\n\n-- the grain will be person-flow-campaign-variation-day\nselect *\nfrom pivot_out_events", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_test_shopify_holistic`.`int__daily_klaviyo_user_metrics`"}, "model.shopify_holistic_reporting.int__klaviyo_person_rollup": {"raw_sql": "with persons as (\n\n select\n *,\n row_number() over (partition by email order by created_at desc) as person_index\n \n from {{ ref('klaviyo__persons') }}\n where email is not null -- should never be the case but just in case\n\n), aggregate_persons as (\n\n select \n lower(email) as email,\n source_relation,\n {{ fivetran_utils.string_agg(\"person_id\", \"', '\") }} as person_ids,\n {{ fivetran_utils.string_agg(\"distinct cast(phone_number as \" ~ dbt_utils.type_string() ~ \")\", \"', '\") }} as phone_numbers,\n max( case when person_index = 1 then full_name else null end) as full_name,\n \n min(created_at) as first_klaviyo_account_made_at,\n max(created_at) as last_klaviyo_account_made_at,\n max(updated_at) as last_updated_at,\n min(first_event_at) as first_event_at,\n max(last_event_at) as last_event_at,\n min(first_campaign_touch_at) as first_campaign_touch_at,\n max(last_campaign_touch_at) as last_campaign_touch_at,\n min(first_flow_touch_at) as first_flow_touch_at,\n max(last_flow_touch_at) as last_flow_touch_at,\n\n sum(count_total_campaigns) as count_total_campaigns,\n sum(count_total_flows) as count_total_flows\n\n\n {% set cols = adapter.get_columns_in_relation(ref('klaviyo__persons')) %}\n {% set except_cols = ['_fivetran_synced', 'email', 'source_relation', 'person_id', 'phone_number', 'full_name', 'created_at', 'updated_at', 'count_total_campaigns', 'count_total_flows',\n 'first_event_at', 'last_event_at', 'first_campaign_touch_at', 'last_campaign_touch_at', 'first_flow_touch_at', 'last_flow_touch_at'] %}\n {% for col in cols %}\n {% if col.column|lower not in except_cols %}\n , max(case when person_index = 1 then {{ col.column }} else null end) as {{ col.column }}\n {% endif %}\n {% endfor %}\n\n from persons\n group by 1,2\n)\n\nselect *\nfrom aggregate_persons", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.string_agg", "macro.dbt_utils.type_string"], "nodes": ["model.klaviyo.klaviyo__persons", "model.klaviyo.klaviyo__persons"]}, "config": {"enabled": true, "alias": null, "schema": "shopify_holistic", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test_shopify_holistic", "fqn": ["shopify_holistic_reporting", "intermediate", "int__klaviyo_person_rollup"], "unique_id": "model.shopify_holistic_reporting.int__klaviyo_person_rollup", "package_name": "shopify_holistic_reporting", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_holistic_reporting", "path": "intermediate/int__klaviyo_person_rollup.sql", "original_file_path": "models/intermediate/int__klaviyo_person_rollup.sql", "name": "int__klaviyo_person_rollup", "alias": "int__klaviyo_person_rollup", "checksum": {"name": "sha256", "checksum": "45decc1969fef4f4fe0fb7ec2b4531a4a57a160d1610e2fa5f8029173b50414a"}, "tags": [], "refs": [["klaviyo__persons"], ["klaviyo__persons"]], "sources": [], "metrics": [], "description": "Table rolling up Klaviyo person accounts to the email level. In theory, these should certainly be 1:1, but under certain circumstances emails can be sent with multiple person_ids from the Klaviyo API.\n", "columns": {"source_relation": {"name": "source_relation", "description": "The source where this data was pulled from. If you are making use of the `union_schemas` variable, this will be the source schema. If you are making use of the `union_databases` variable, this will be the source database. If you are not unioning together multiple sources, this will be an empty string.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email": {"name": "email", "description": "The email address and the unique identifier for a profile.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "person_ids": {"name": "person_ids", "description": "A comma-separated aggregated list of Klaviyo IDs for the person.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "phone_numbers": {"name": "phone_numbers", "description": "Comma separated aggregated list of unique phone numbers for this person.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "full_name": {"name": "full_name", "description": "Person's full name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_klaviyo_account_made_at": {"name": "first_klaviyo_account_made_at", "description": "Timestamp of when the person's profile was first created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_klaviyo_account_made_at": {"name": "last_klaviyo_account_made_at", "description": "Timestamp of when the person's profile was last created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_updated_at": {"name": "last_updated_at", "description": "Timestamp of when the person profile was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_event_at": {"name": "first_event_at", "description": "Timestamp of when the user first triggered an event (not limited to campaign and flow interactions).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_event_at": {"name": "last_event_at", "description": "Timestamp of when the user last triggered an event (not limited to campaign and flow interactions).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_campaign_touch_at": {"name": "first_campaign_touch_at", "description": "Timestamp of when the user first interacted with a campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_campaign_touch_at": {"name": "last_campaign_touch_at", "description": "Timestamp of when the user last interacted with a campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_flow_touch_at": {"name": "first_flow_touch_at", "description": "Timestamp of when the user first interacted with a flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_flow_touch_at": {"name": "last_flow_touch_at", "description": "Timestamp of when the user last interacted with a flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "count_total_campaigns": {"name": "count_total_campaigns", "description": "Count of the number of campaigns this person has interacted with.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "count_total_flows": {"name": "count_total_flows", "description": "Count of the number of flows this person has interacted with.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "address_1": {"name": "address_1", "description": "First line of the person's address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "address_2": {"name": "address_2", "description": "Second line of the person's address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "city": {"name": "city", "description": "City they live in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "country": {"name": "country", "description": "Country they live in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "zip": {"name": "zip", "description": "Postal code where they live.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "latitude": {"name": "latitude", "description": "Latitude of the person's location.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "longitude": {"name": "longitude", "description": "Longitude of the person's location.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization": {"name": "organization", "description": "Business organization they belong to.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "region": {"name": "region", "description": "Region or state they live in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "timezone": {"name": "timezone", "description": "Timezone they are situated in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "title": {"name": "title", "description": "Title at their business or organization.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "shopify_holistic_reporting://models/intermediate/int_shopify_holistic_reporting.yml", "compiled_path": "target/compiled/shopify_holistic_reporting/models/intermediate/int__klaviyo_person_rollup.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "schema": "shopify_holistic"}, "created_at": 1665703195.682824, "compiled_sql": "with persons as (\n\n select\n *,\n row_number() over (partition by email order by created_at desc) as person_index\n \n from `dbt-package-testing`.`dbt_test_klaviyo`.`klaviyo__persons`\n where email is not null -- should never be the case but just in case\n\n), aggregate_persons as (\n\n select \n lower(email) as email,\n source_relation,\n \n string_agg(person_id, ', ')\n\n as person_ids,\n \n string_agg(distinct cast(phone_number as \n string\n), ', ')\n\n as phone_numbers,\n max( case when person_index = 1 then full_name else null end) as full_name,\n \n min(created_at) as first_klaviyo_account_made_at,\n max(created_at) as last_klaviyo_account_made_at,\n max(updated_at) as last_updated_at,\n min(first_event_at) as first_event_at,\n max(last_event_at) as last_event_at,\n min(first_campaign_touch_at) as first_campaign_touch_at,\n max(last_campaign_touch_at) as last_campaign_touch_at,\n min(first_flow_touch_at) as first_flow_touch_at,\n max(last_flow_touch_at) as last_flow_touch_at,\n\n sum(count_total_campaigns) as count_total_campaigns,\n sum(count_total_flows) as count_total_flows\n\n\n \n \n \n \n \n \n , max(case when person_index = 1 then address_1 else null end) as address_1\n \n \n \n , max(case when person_index = 1 then address_2 else null end) as address_2\n \n \n \n , max(case when person_index = 1 then city else null end) as city\n \n \n \n , max(case when person_index = 1 then country else null end) as country\n \n \n \n , max(case when person_index = 1 then zip else null end) as zip\n \n \n \n \n \n \n \n \n \n , max(case when person_index = 1 then latitude else null end) as latitude\n \n \n \n , max(case when person_index = 1 then longitude else null end) as longitude\n \n \n \n , max(case when person_index = 1 then organization else null end) as organization\n \n \n \n \n \n , max(case when person_index = 1 then region else null end) as region\n \n \n \n , max(case when person_index = 1 then timezone else null end) as timezone\n \n \n \n , max(case when person_index = 1 then title else null end) as title\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n , max(case when person_index = 1 then total_sum_revenue_refunded_order else null end) as total_sum_revenue_refunded_order\n \n \n \n , max(case when person_index = 1 then organic_sum_revenue_refunded_order else null end) as organic_sum_revenue_refunded_order\n \n \n \n , max(case when person_index = 1 then total_sum_revenue_placed_order else null end) as total_sum_revenue_placed_order\n \n \n \n , max(case when person_index = 1 then organic_sum_revenue_placed_order else null end) as organic_sum_revenue_placed_order\n \n \n \n , max(case when person_index = 1 then total_sum_revenue_ordered_product else null end) as total_sum_revenue_ordered_product\n \n \n \n , max(case when person_index = 1 then organic_sum_revenue_ordered_product else null end) as organic_sum_revenue_ordered_product\n \n \n \n , max(case when person_index = 1 then total_sum_revenue_checkout_started else null end) as total_sum_revenue_checkout_started\n \n \n \n , max(case when person_index = 1 then organic_sum_revenue_checkout_started else null end) as organic_sum_revenue_checkout_started\n \n \n \n , max(case when person_index = 1 then total_sum_revenue_cancelled_order else null end) as total_sum_revenue_cancelled_order\n \n \n \n , max(case when person_index = 1 then organic_sum_revenue_cancelled_order else null end) as organic_sum_revenue_cancelled_order\n \n \n \n , max(case when person_index = 1 then total_count_active_on_site else null end) as total_count_active_on_site\n \n \n \n , max(case when person_index = 1 then total_count_viewed_product else null end) as total_count_viewed_product\n \n \n \n , max(case when person_index = 1 then total_count_ordered_product else null end) as total_count_ordered_product\n \n \n \n , max(case when person_index = 1 then total_count_placed_order else null end) as total_count_placed_order\n \n \n \n , max(case when person_index = 1 then total_count_refunded_order else null end) as total_count_refunded_order\n \n \n \n , max(case when person_index = 1 then total_count_cancelled_order else null end) as total_count_cancelled_order\n \n \n \n , max(case when person_index = 1 then total_count_fulfilled_order else null end) as total_count_fulfilled_order\n \n \n \n , max(case when person_index = 1 then total_count_received_email else null end) as total_count_received_email\n \n \n \n , max(case when person_index = 1 then total_count_clicked_email else null end) as total_count_clicked_email\n \n \n \n , max(case when person_index = 1 then total_count_opened_email else null end) as total_count_opened_email\n \n \n \n , max(case when person_index = 1 then total_count_bounced_email else null end) as total_count_bounced_email\n \n \n \n , max(case when person_index = 1 then total_count_marked_email_as_spam else null end) as total_count_marked_email_as_spam\n \n \n \n , max(case when person_index = 1 then total_count_dropped_email else null end) as total_count_dropped_email\n \n \n \n , max(case when person_index = 1 then total_count_subscribed_to_list else null end) as total_count_subscribed_to_list\n \n \n \n , max(case when person_index = 1 then total_count_unsubscribed_to_list else null end) as total_count_unsubscribed_to_list\n \n \n \n , max(case when person_index = 1 then total_count_unsubscribed else null end) as total_count_unsubscribed\n \n \n \n , max(case when person_index = 1 then total_count_updated_email_preferences else null end) as total_count_updated_email_preferences\n \n \n \n , max(case when person_index = 1 then total_count_subscribed_to_back_in_stock else null end) as total_count_subscribed_to_back_in_stock\n \n \n \n , max(case when person_index = 1 then total_count_merged_profile else null end) as total_count_merged_profile\n \n \n \n , max(case when person_index = 1 then total_count_received_sms else null end) as total_count_received_sms\n \n \n \n , max(case when person_index = 1 then total_count_clicked_sms else null end) as total_count_clicked_sms\n \n \n \n , max(case when person_index = 1 then total_count_consented_to_receive_sms else null end) as total_count_consented_to_receive_sms\n \n \n \n , max(case when person_index = 1 then total_count_sent_sms else null end) as total_count_sent_sms\n \n \n \n , max(case when person_index = 1 then total_count_unsubscribed_from_sms else null end) as total_count_unsubscribed_from_sms\n \n \n \n , max(case when person_index = 1 then total_count_failed_to_deliver_sms else null end) as total_count_failed_to_deliver_sms\n \n \n\n from persons\n group by 1,2\n)\n\nselect *\nfrom aggregate_persons", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`dbt_test_shopify_holistic`.`int__klaviyo_person_rollup`"}, "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__customer_customer_id__source_relation.1b2185db25": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_d00da641d0cc06ebef083c43ddfae4be\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["customer_id", "source_relation"], "model": "{{ get_where_subquery(ref('stg_shopify__customer')) }}"}, "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.shopify_source.stg_shopify__customer"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_d00da641d0cc06ebef083c43ddfae4be", "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": "dbt_test_dbt_test__audit", "fqn": ["shopify_source", "dbt_utils_unique_combination_of_columns_stg_shopify__customer_customer_id__source_relation"], "unique_id": "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__customer_customer_id__source_relation.1b2185db25", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "dbt_utils_unique_combination_o_d00da641d0cc06ebef083c43ddfae4be.sql", "original_file_path": "models/stg_shopify.yml", "name": "dbt_utils_unique_combination_of_columns_stg_shopify__customer_customer_id__source_relation", "alias": "dbt_utils_unique_combination_o_d00da641d0cc06ebef083c43ddfae4be", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_shopify__customer"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/stg_shopify.yml/dbt_utils_unique_combination_o_d00da641d0cc06ebef083c43ddfae4be.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_d00da641d0cc06ebef083c43ddfae4be"}, "created_at": 1665703195.348107, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n customer_id, source_relation\n from `dbt-package-testing`.`dbt_test_stg_shopify`.`stg_shopify__customer`\n group by customer_id, source_relation\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_shopify__customer"}, "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_line_refund_order_line_refund_id__source_relation.1877420c29": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_33b2f20dc9ea13a94a10a635383becf3\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["order_line_refund_id", "source_relation"], "model": "{{ get_where_subquery(ref('stg_shopify__order_line_refund')) }}"}, "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.shopify_source.stg_shopify__order_line_refund"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_33b2f20dc9ea13a94a10a635383becf3", "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": "dbt_test_dbt_test__audit", "fqn": ["shopify_source", "dbt_utils_unique_combination_of_columns_stg_shopify__order_line_refund_order_line_refund_id__source_relation"], "unique_id": "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_line_refund_order_line_refund_id__source_relation.1877420c29", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "dbt_utils_unique_combination_o_33b2f20dc9ea13a94a10a635383becf3.sql", "original_file_path": "models/stg_shopify.yml", "name": "dbt_utils_unique_combination_of_columns_stg_shopify__order_line_refund_order_line_refund_id__source_relation", "alias": "dbt_utils_unique_combination_o_33b2f20dc9ea13a94a10a635383becf3", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_shopify__order_line_refund"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/stg_shopify.yml/dbt_utils_unique_combination_o_33b2f20dc9ea13a94a10a635383becf3.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_33b2f20dc9ea13a94a10a635383becf3"}, "created_at": 1665703195.3556721, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n order_line_refund_id, source_relation\n from `dbt-package-testing`.`dbt_test_stg_shopify`.`stg_shopify__order_line_refund`\n group by order_line_refund_id, source_relation\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_shopify__order_line_refund"}, "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_line_order_line_id__source_relation.c2797e7a9c": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_d47b5ce640a9316320c17565339223ec\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["order_line_id", "source_relation"], "model": "{{ get_where_subquery(ref('stg_shopify__order_line')) }}"}, "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.shopify_source.stg_shopify__order_line"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_d47b5ce640a9316320c17565339223ec", "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": "dbt_test_dbt_test__audit", "fqn": ["shopify_source", "dbt_utils_unique_combination_of_columns_stg_shopify__order_line_order_line_id__source_relation"], "unique_id": "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_line_order_line_id__source_relation.c2797e7a9c", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "dbt_utils_unique_combination_o_d47b5ce640a9316320c17565339223ec.sql", "original_file_path": "models/stg_shopify.yml", "name": "dbt_utils_unique_combination_of_columns_stg_shopify__order_line_order_line_id__source_relation", "alias": "dbt_utils_unique_combination_o_d47b5ce640a9316320c17565339223ec", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_shopify__order_line"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/stg_shopify.yml/dbt_utils_unique_combination_o_d47b5ce640a9316320c17565339223ec.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_d47b5ce640a9316320c17565339223ec"}, "created_at": 1665703195.3583438, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n order_line_id, source_relation\n from `dbt-package-testing`.`dbt_test_stg_shopify`.`stg_shopify__order_line`\n group by order_line_id, source_relation\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_shopify__order_line"}, "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_order_id__source_relation.81d10381c1": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_3f5201314db17428b709b11583cd0f7e\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["order_id", "source_relation"], "model": "{{ get_where_subquery(ref('stg_shopify__order')) }}"}, "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.shopify_source.stg_shopify__order"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_3f5201314db17428b709b11583cd0f7e", "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": "dbt_test_dbt_test__audit", "fqn": ["shopify_source", "dbt_utils_unique_combination_of_columns_stg_shopify__order_order_id__source_relation"], "unique_id": "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_order_id__source_relation.81d10381c1", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "dbt_utils_unique_combination_o_3f5201314db17428b709b11583cd0f7e.sql", "original_file_path": "models/stg_shopify.yml", "name": "dbt_utils_unique_combination_of_columns_stg_shopify__order_order_id__source_relation", "alias": "dbt_utils_unique_combination_o_3f5201314db17428b709b11583cd0f7e", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_shopify__order"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/stg_shopify.yml/dbt_utils_unique_combination_o_3f5201314db17428b709b11583cd0f7e.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_3f5201314db17428b709b11583cd0f7e"}, "created_at": 1665703195.3608892, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n order_id, source_relation\n from `dbt-package-testing`.`dbt_test_stg_shopify`.`stg_shopify__order`\n group by order_id, source_relation\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_shopify__order"}, "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__product_product_id__source_relation.48b32ab6a2": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_eb9efccfbdaff32f938da98287403a1d\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["product_id", "source_relation"], "model": "{{ get_where_subquery(ref('stg_shopify__product')) }}"}, "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.shopify_source.stg_shopify__product"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_eb9efccfbdaff32f938da98287403a1d", "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": "dbt_test_dbt_test__audit", "fqn": ["shopify_source", "dbt_utils_unique_combination_of_columns_stg_shopify__product_product_id__source_relation"], "unique_id": "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__product_product_id__source_relation.48b32ab6a2", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "dbt_utils_unique_combination_o_eb9efccfbdaff32f938da98287403a1d.sql", "original_file_path": "models/stg_shopify.yml", "name": "dbt_utils_unique_combination_of_columns_stg_shopify__product_product_id__source_relation", "alias": "dbt_utils_unique_combination_o_eb9efccfbdaff32f938da98287403a1d", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_shopify__product"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/stg_shopify.yml/dbt_utils_unique_combination_o_eb9efccfbdaff32f938da98287403a1d.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_eb9efccfbdaff32f938da98287403a1d"}, "created_at": 1665703195.3634229, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n product_id, source_relation\n from `dbt-package-testing`.`dbt_test_stg_shopify`.`stg_shopify__product`\n group by product_id, source_relation\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_shopify__product"}, "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__product_variant_variant_id__source_relation.7506695ec0": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_84d19b85e52ebcaca03bcefe4191b60e\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["variant_id", "source_relation"], "model": "{{ get_where_subquery(ref('stg_shopify__product_variant')) }}"}, "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.shopify_source.stg_shopify__product_variant"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_84d19b85e52ebcaca03bcefe4191b60e", "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": "dbt_test_dbt_test__audit", "fqn": ["shopify_source", "dbt_utils_unique_combination_of_columns_stg_shopify__product_variant_variant_id__source_relation"], "unique_id": "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__product_variant_variant_id__source_relation.7506695ec0", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "dbt_utils_unique_combination_o_84d19b85e52ebcaca03bcefe4191b60e.sql", "original_file_path": "models/stg_shopify.yml", "name": "dbt_utils_unique_combination_of_columns_stg_shopify__product_variant_variant_id__source_relation", "alias": "dbt_utils_unique_combination_o_84d19b85e52ebcaca03bcefe4191b60e", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_shopify__product_variant"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/stg_shopify.yml/dbt_utils_unique_combination_o_84d19b85e52ebcaca03bcefe4191b60e.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_84d19b85e52ebcaca03bcefe4191b60e"}, "created_at": 1665703195.3659542, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n variant_id, source_relation\n from `dbt-package-testing`.`dbt_test_stg_shopify`.`stg_shopify__product_variant`\n group by variant_id, source_relation\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_shopify__product_variant"}, "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__transaction_transaction_id__source_relation.d55a33652a": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_47aceb0b987e9f3279b4301c10167f92\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["transaction_id", "source_relation"], "model": "{{ get_where_subquery(ref('stg_shopify__transaction')) }}"}, "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.shopify_source.stg_shopify__transaction"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_47aceb0b987e9f3279b4301c10167f92", "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": "dbt_test_dbt_test__audit", "fqn": ["shopify_source", "dbt_utils_unique_combination_of_columns_stg_shopify__transaction_transaction_id__source_relation"], "unique_id": "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__transaction_transaction_id__source_relation.d55a33652a", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "dbt_utils_unique_combination_o_47aceb0b987e9f3279b4301c10167f92.sql", "original_file_path": "models/stg_shopify.yml", "name": "dbt_utils_unique_combination_of_columns_stg_shopify__transaction_transaction_id__source_relation", "alias": "dbt_utils_unique_combination_o_47aceb0b987e9f3279b4301c10167f92", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_shopify__transaction"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/stg_shopify.yml/dbt_utils_unique_combination_o_47aceb0b987e9f3279b4301c10167f92.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_47aceb0b987e9f3279b4301c10167f92"}, "created_at": 1665703195.3683681, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n transaction_id, source_relation\n from `dbt-package-testing`.`dbt_test_stg_shopify`.`stg_shopify__transaction`\n group by transaction_id, source_relation\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_shopify__transaction"}, "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__refund_refund_id__source_relation.cd4dbc2b35": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_b6b83918833e84e9f886aa4151e4e659\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["refund_id", "source_relation"], "model": "{{ get_where_subquery(ref('stg_shopify__refund')) }}"}, "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.shopify_source.stg_shopify__refund"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_b6b83918833e84e9f886aa4151e4e659", "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": "dbt_test_dbt_test__audit", "fqn": ["shopify_source", "dbt_utils_unique_combination_of_columns_stg_shopify__refund_refund_id__source_relation"], "unique_id": "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__refund_refund_id__source_relation.cd4dbc2b35", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "dbt_utils_unique_combination_o_b6b83918833e84e9f886aa4151e4e659.sql", "original_file_path": "models/stg_shopify.yml", "name": "dbt_utils_unique_combination_of_columns_stg_shopify__refund_refund_id__source_relation", "alias": "dbt_utils_unique_combination_o_b6b83918833e84e9f886aa4151e4e659", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_shopify__refund"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/stg_shopify.yml/dbt_utils_unique_combination_o_b6b83918833e84e9f886aa4151e4e659.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_b6b83918833e84e9f886aa4151e4e659"}, "created_at": 1665703195.370878, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n refund_id, source_relation\n from `dbt-package-testing`.`dbt_test_stg_shopify`.`stg_shopify__refund`\n group by refund_id, source_relation\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_shopify__refund"}, "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_adjustment_order_adjustment_id__source_relation.00b7d10cb0": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_8c4679057a756bef5907cd3799634207\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["order_adjustment_id", "source_relation"], "model": "{{ get_where_subquery(ref('stg_shopify__order_adjustment')) }}"}, "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.shopify_source.stg_shopify__order_adjustment"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_8c4679057a756bef5907cd3799634207", "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": "dbt_test_dbt_test__audit", "fqn": ["shopify_source", "dbt_utils_unique_combination_of_columns_stg_shopify__order_adjustment_order_adjustment_id__source_relation"], "unique_id": "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_adjustment_order_adjustment_id__source_relation.00b7d10cb0", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "dbt_utils_unique_combination_o_8c4679057a756bef5907cd3799634207.sql", "original_file_path": "models/stg_shopify.yml", "name": "dbt_utils_unique_combination_of_columns_stg_shopify__order_adjustment_order_adjustment_id__source_relation", "alias": "dbt_utils_unique_combination_o_8c4679057a756bef5907cd3799634207", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_shopify__order_adjustment"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_source/models/stg_shopify.yml/dbt_utils_unique_combination_o_8c4679057a756bef5907cd3799634207.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_8c4679057a756bef5907cd3799634207"}, "created_at": 1665703195.3733902, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n order_adjustment_id, source_relation\n from `dbt-package-testing`.`dbt_test_stg_shopify`.`stg_shopify__order_adjustment`\n group by order_adjustment_id, source_relation\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_shopify__order_adjustment"}, "test.klaviyo_source.not_null_stg_klaviyo__campaign_campaign_id.5dfc47dc1d": {"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_klaviyo__campaign')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.klaviyo_source.stg_klaviyo__campaign"]}, "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": "dbt_test_dbt_test__audit", "fqn": ["klaviyo_source", "not_null_stg_klaviyo__campaign_campaign_id"], "unique_id": "test.klaviyo_source.not_null_stg_klaviyo__campaign_campaign_id.5dfc47dc1d", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "not_null_stg_klaviyo__campaign_campaign_id.sql", "original_file_path": "models/stg_klaviyo.yml", "name": "not_null_stg_klaviyo__campaign_campaign_id", "alias": "not_null_stg_klaviyo__campaign_campaign_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_klaviyo__campaign"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo.yml/not_null_stg_klaviyo__campaign_campaign_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1665703195.463882, "compiled_sql": "\n \n \n\n\n\nselect campaign_id\nfrom `dbt-package-testing`.`dbt_test_stg_klaviyo`.`stg_klaviyo__campaign`\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_klaviyo__campaign"}, "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__campaign_campaign_id__source_relation.59158488ff": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_972961dcf9c5c4d5b8e43db578561c26\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["campaign_id", "source_relation"], "model": "{{ get_where_subquery(ref('stg_klaviyo__campaign')) }}"}, "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.klaviyo_source.stg_klaviyo__campaign"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_972961dcf9c5c4d5b8e43db578561c26", "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": "dbt_test_dbt_test__audit", "fqn": ["klaviyo_source", "dbt_utils_unique_combination_of_columns_stg_klaviyo__campaign_campaign_id__source_relation"], "unique_id": "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__campaign_campaign_id__source_relation.59158488ff", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "dbt_utils_unique_combination_o_972961dcf9c5c4d5b8e43db578561c26.sql", "original_file_path": "models/stg_klaviyo.yml", "name": "dbt_utils_unique_combination_of_columns_stg_klaviyo__campaign_campaign_id__source_relation", "alias": "dbt_utils_unique_combination_o_972961dcf9c5c4d5b8e43db578561c26", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_klaviyo__campaign"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo.yml/dbt_utils_unique_combination_o_972961dcf9c5c4d5b8e43db578561c26.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_972961dcf9c5c4d5b8e43db578561c26"}, "created_at": 1665703195.465271, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n campaign_id, source_relation\n from `dbt-package-testing`.`dbt_test_stg_klaviyo`.`stg_klaviyo__campaign`\n group by campaign_id, source_relation\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_klaviyo__campaign"}, "test.klaviyo_source.not_null_stg_klaviyo__event_event_id.7a09ac6ec1": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('stg_klaviyo__event')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.klaviyo_source.stg_klaviyo__event"]}, "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": "dbt_test_dbt_test__audit", "fqn": ["klaviyo_source", "not_null_stg_klaviyo__event_event_id"], "unique_id": "test.klaviyo_source.not_null_stg_klaviyo__event_event_id.7a09ac6ec1", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "not_null_stg_klaviyo__event_event_id.sql", "original_file_path": "models/stg_klaviyo.yml", "name": "not_null_stg_klaviyo__event_event_id", "alias": "not_null_stg_klaviyo__event_event_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_klaviyo__event"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo.yml/not_null_stg_klaviyo__event_event_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1665703195.468443, "compiled_sql": "\n \n \n\n\n\nselect event_id\nfrom `dbt-package-testing`.`dbt_test_stg_klaviyo`.`stg_klaviyo__event`\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_id", "file_key_name": "models.stg_klaviyo__event"}, "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__event_event_id__source_relation.3778c651d7": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_8881439048410324e034ca08f1ef95fa\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["event_id", "source_relation"], "model": "{{ get_where_subquery(ref('stg_klaviyo__event')) }}"}, "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.klaviyo_source.stg_klaviyo__event"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_8881439048410324e034ca08f1ef95fa", "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": "dbt_test_dbt_test__audit", "fqn": ["klaviyo_source", "dbt_utils_unique_combination_of_columns_stg_klaviyo__event_event_id__source_relation"], "unique_id": "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__event_event_id__source_relation.3778c651d7", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "dbt_utils_unique_combination_o_8881439048410324e034ca08f1ef95fa.sql", "original_file_path": "models/stg_klaviyo.yml", "name": "dbt_utils_unique_combination_of_columns_stg_klaviyo__event_event_id__source_relation", "alias": "dbt_utils_unique_combination_o_8881439048410324e034ca08f1ef95fa", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_klaviyo__event"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo.yml/dbt_utils_unique_combination_o_8881439048410324e034ca08f1ef95fa.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_8881439048410324e034ca08f1ef95fa"}, "created_at": 1665703195.4696488, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n event_id, source_relation\n from `dbt-package-testing`.`dbt_test_stg_klaviyo`.`stg_klaviyo__event`\n group by event_id, source_relation\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_klaviyo__event"}, "test.klaviyo_source.not_null_stg_klaviyo__flow_flow_id.a00a897e42": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "flow_id", "model": "{{ get_where_subquery(ref('stg_klaviyo__flow')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.klaviyo_source.stg_klaviyo__flow"]}, "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": "dbt_test_dbt_test__audit", "fqn": ["klaviyo_source", "not_null_stg_klaviyo__flow_flow_id"], "unique_id": "test.klaviyo_source.not_null_stg_klaviyo__flow_flow_id.a00a897e42", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "not_null_stg_klaviyo__flow_flow_id.sql", "original_file_path": "models/stg_klaviyo.yml", "name": "not_null_stg_klaviyo__flow_flow_id", "alias": "not_null_stg_klaviyo__flow_flow_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_klaviyo__flow"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo.yml/not_null_stg_klaviyo__flow_flow_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1665703195.4723608, "compiled_sql": "\n \n \n\n\n\nselect flow_id\nfrom `dbt-package-testing`.`dbt_test_stg_klaviyo`.`stg_klaviyo__flow`\nwhere flow_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "flow_id", "file_key_name": "models.stg_klaviyo__flow"}, "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__flow_flow_id__source_relation.015215d481": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_007bf18d3b6d4b25aebcc986dc772270\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["flow_id", "source_relation"], "model": "{{ get_where_subquery(ref('stg_klaviyo__flow')) }}"}, "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.klaviyo_source.stg_klaviyo__flow"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_007bf18d3b6d4b25aebcc986dc772270", "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": "dbt_test_dbt_test__audit", "fqn": ["klaviyo_source", "dbt_utils_unique_combination_of_columns_stg_klaviyo__flow_flow_id__source_relation"], "unique_id": "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__flow_flow_id__source_relation.015215d481", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "dbt_utils_unique_combination_o_007bf18d3b6d4b25aebcc986dc772270.sql", "original_file_path": "models/stg_klaviyo.yml", "name": "dbt_utils_unique_combination_of_columns_stg_klaviyo__flow_flow_id__source_relation", "alias": "dbt_utils_unique_combination_o_007bf18d3b6d4b25aebcc986dc772270", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_klaviyo__flow"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo.yml/dbt_utils_unique_combination_o_007bf18d3b6d4b25aebcc986dc772270.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_007bf18d3b6d4b25aebcc986dc772270"}, "created_at": 1665703195.4733078, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n flow_id, source_relation\n from `dbt-package-testing`.`dbt_test_stg_klaviyo`.`stg_klaviyo__flow`\n group by flow_id, source_relation\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_klaviyo__flow"}, "test.klaviyo_source.not_null_stg_klaviyo__integration_integration_id.fe572c5f1b": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "integration_id", "model": "{{ get_where_subquery(ref('stg_klaviyo__integration')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.klaviyo_source.stg_klaviyo__integration"]}, "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": "dbt_test_dbt_test__audit", "fqn": ["klaviyo_source", "not_null_stg_klaviyo__integration_integration_id"], "unique_id": "test.klaviyo_source.not_null_stg_klaviyo__integration_integration_id.fe572c5f1b", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "not_null_stg_klaviyo__integration_integration_id.sql", "original_file_path": "models/stg_klaviyo.yml", "name": "not_null_stg_klaviyo__integration_integration_id", "alias": "not_null_stg_klaviyo__integration_integration_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_klaviyo__integration"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo.yml/not_null_stg_klaviyo__integration_integration_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1665703195.475887, "compiled_sql": "\n \n \n\n\n\nselect integration_id\nfrom `dbt-package-testing`.`dbt_test_stg_klaviyo`.`stg_klaviyo__integration`\nwhere integration_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "integration_id", "file_key_name": "models.stg_klaviyo__integration"}, "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__integration_integration_id__source_relation.be6158ad21": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_a7f288c54a3281da69034a0f95230596\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["integration_id", "source_relation"], "model": "{{ get_where_subquery(ref('stg_klaviyo__integration')) }}"}, "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.klaviyo_source.stg_klaviyo__integration"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_a7f288c54a3281da69034a0f95230596", "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": "dbt_test_dbt_test__audit", "fqn": ["klaviyo_source", "dbt_utils_unique_combination_of_columns_stg_klaviyo__integration_integration_id__source_relation"], "unique_id": "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__integration_integration_id__source_relation.be6158ad21", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "dbt_utils_unique_combination_o_a7f288c54a3281da69034a0f95230596.sql", "original_file_path": "models/stg_klaviyo.yml", "name": "dbt_utils_unique_combination_of_columns_stg_klaviyo__integration_integration_id__source_relation", "alias": "dbt_utils_unique_combination_o_a7f288c54a3281da69034a0f95230596", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_klaviyo__integration"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo.yml/dbt_utils_unique_combination_o_a7f288c54a3281da69034a0f95230596.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_a7f288c54a3281da69034a0f95230596"}, "created_at": 1665703195.4768388, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n integration_id, source_relation\n from `dbt-package-testing`.`dbt_test_stg_klaviyo`.`stg_klaviyo__integration`\n group by integration_id, source_relation\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_klaviyo__integration"}, "test.klaviyo_source.not_null_stg_klaviyo__person_person_id.bd77ffc8aa": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "person_id", "model": "{{ get_where_subquery(ref('stg_klaviyo__person')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.klaviyo_source.stg_klaviyo__person"]}, "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": "dbt_test_dbt_test__audit", "fqn": ["klaviyo_source", "not_null_stg_klaviyo__person_person_id"], "unique_id": "test.klaviyo_source.not_null_stg_klaviyo__person_person_id.bd77ffc8aa", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "not_null_stg_klaviyo__person_person_id.sql", "original_file_path": "models/stg_klaviyo.yml", "name": "not_null_stg_klaviyo__person_person_id", "alias": "not_null_stg_klaviyo__person_person_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_klaviyo__person"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo.yml/not_null_stg_klaviyo__person_person_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1665703195.479994, "compiled_sql": "\n \n \n\n\n\nselect person_id\nfrom `dbt-package-testing`.`dbt_test_stg_klaviyo`.`stg_klaviyo__person`\nwhere person_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "person_id", "file_key_name": "models.stg_klaviyo__person"}, "test.klaviyo_source.unique_stg_klaviyo__person_email.dc3a98b014": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}{{ config(severity=\"warn\") }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "email", "model": "{{ get_where_subquery(ref('stg_klaviyo__person')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.klaviyo_source.stg_klaviyo__person"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "WARN", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "dbt_test_dbt_test__audit", "fqn": ["klaviyo_source", "unique_stg_klaviyo__person_email"], "unique_id": "test.klaviyo_source.unique_stg_klaviyo__person_email.dc3a98b014", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "unique_stg_klaviyo__person_email.sql", "original_file_path": "models/stg_klaviyo.yml", "name": "unique_stg_klaviyo__person_email", "alias": "unique_stg_klaviyo__person_email", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_klaviyo__person"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo.yml/unique_stg_klaviyo__person_email.sql", "build_path": null, "deferred": false, "unrendered_config": {"severity": "WARN"}, "created_at": 1665703195.4824052, "compiled_sql": "\n \n \n\nwith dbt_test__target as (\n\n select email as unique_field\n from `dbt-package-testing`.`dbt_test_stg_klaviyo`.`stg_klaviyo__person`\n where email 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\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "email", "file_key_name": "models.stg_klaviyo__person"}, "test.klaviyo_source.not_null_stg_klaviyo__person_email.c7094cfe27": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "email", "model": "{{ get_where_subquery(ref('stg_klaviyo__person')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.klaviyo_source.stg_klaviyo__person"]}, "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": "dbt_test_dbt_test__audit", "fqn": ["klaviyo_source", "not_null_stg_klaviyo__person_email"], "unique_id": "test.klaviyo_source.not_null_stg_klaviyo__person_email.c7094cfe27", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "not_null_stg_klaviyo__person_email.sql", "original_file_path": "models/stg_klaviyo.yml", "name": "not_null_stg_klaviyo__person_email", "alias": "not_null_stg_klaviyo__person_email", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_klaviyo__person"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo.yml/not_null_stg_klaviyo__person_email.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1665703195.4841459, "compiled_sql": "\n \n \n\n\n\nselect email\nfrom `dbt-package-testing`.`dbt_test_stg_klaviyo`.`stg_klaviyo__person`\nwhere email is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "email", "file_key_name": "models.stg_klaviyo__person"}, "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__person_person_id__source_relation.33a4f9ca24": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_df656836e047bb69a86997735efb3161\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["person_id", "source_relation"], "model": "{{ get_where_subquery(ref('stg_klaviyo__person')) }}"}, "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.klaviyo_source.stg_klaviyo__person"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_df656836e047bb69a86997735efb3161", "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": "dbt_test_dbt_test__audit", "fqn": ["klaviyo_source", "dbt_utils_unique_combination_of_columns_stg_klaviyo__person_person_id__source_relation"], "unique_id": "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__person_person_id__source_relation.33a4f9ca24", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "dbt_utils_unique_combination_o_df656836e047bb69a86997735efb3161.sql", "original_file_path": "models/stg_klaviyo.yml", "name": "dbt_utils_unique_combination_of_columns_stg_klaviyo__person_person_id__source_relation", "alias": "dbt_utils_unique_combination_o_df656836e047bb69a86997735efb3161", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_klaviyo__person"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo.yml/dbt_utils_unique_combination_o_df656836e047bb69a86997735efb3161.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_df656836e047bb69a86997735efb3161"}, "created_at": 1665703195.485605, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n person_id, source_relation\n from `dbt-package-testing`.`dbt_test_stg_klaviyo`.`stg_klaviyo__person`\n group by person_id, source_relation\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_klaviyo__person"}, "test.klaviyo_source.not_null_stg_klaviyo__metric_metric_id.4759d62078": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "metric_id", "model": "{{ get_where_subquery(ref('stg_klaviyo__metric')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.klaviyo_source.stg_klaviyo__metric"]}, "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": "dbt_test_dbt_test__audit", "fqn": ["klaviyo_source", "not_null_stg_klaviyo__metric_metric_id"], "unique_id": "test.klaviyo_source.not_null_stg_klaviyo__metric_metric_id.4759d62078", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "not_null_stg_klaviyo__metric_metric_id.sql", "original_file_path": "models/stg_klaviyo.yml", "name": "not_null_stg_klaviyo__metric_metric_id", "alias": "not_null_stg_klaviyo__metric_metric_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_klaviyo__metric"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo.yml/not_null_stg_klaviyo__metric_metric_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1665703195.4892, "compiled_sql": "\n \n \n\n\n\nselect metric_id\nfrom `dbt-package-testing`.`dbt_test_stg_klaviyo`.`stg_klaviyo__metric`\nwhere metric_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "metric_id", "file_key_name": "models.stg_klaviyo__metric"}, "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__metric_metric_id__source_relation.e9f33c04e5": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_45cba7e3442f1bc3264a04c52efb4d58\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["metric_id", "source_relation"], "model": "{{ get_where_subquery(ref('stg_klaviyo__metric')) }}"}, "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.klaviyo_source.stg_klaviyo__metric"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_45cba7e3442f1bc3264a04c52efb4d58", "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": "dbt_test_dbt_test__audit", "fqn": ["klaviyo_source", "dbt_utils_unique_combination_of_columns_stg_klaviyo__metric_metric_id__source_relation"], "unique_id": "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__metric_metric_id__source_relation.e9f33c04e5", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "dbt_utils_unique_combination_o_45cba7e3442f1bc3264a04c52efb4d58.sql", "original_file_path": "models/stg_klaviyo.yml", "name": "dbt_utils_unique_combination_of_columns_stg_klaviyo__metric_metric_id__source_relation", "alias": "dbt_utils_unique_combination_o_45cba7e3442f1bc3264a04c52efb4d58", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_klaviyo__metric"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo_source/models/stg_klaviyo.yml/dbt_utils_unique_combination_o_45cba7e3442f1bc3264a04c52efb4d58.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_45cba7e3442f1bc3264a04c52efb4d58"}, "created_at": 1665703195.490368, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n metric_id, source_relation\n from `dbt-package-testing`.`dbt_test_stg_klaviyo`.`stg_klaviyo__metric`\n group by metric_id, source_relation\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_klaviyo__metric"}, "test.klaviyo.not_null_klaviyo__events_event_id.eada7340ba": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('klaviyo__events')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.klaviyo.klaviyo__events"]}, "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": "dbt_test_dbt_test__audit", "fqn": ["klaviyo", "not_null_klaviyo__events_event_id"], "unique_id": "test.klaviyo.not_null_klaviyo__events_event_id.eada7340ba", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "not_null_klaviyo__events_event_id.sql", "original_file_path": "models/klaviyo.yml", "name": "not_null_klaviyo__events_event_id", "alias": "not_null_klaviyo__events_event_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["klaviyo__events"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo/models/klaviyo.yml/not_null_klaviyo__events_event_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1665703195.525354, "compiled_sql": "\n \n \n\n\n\nselect event_id\nfrom `dbt-package-testing`.`dbt_test_klaviyo`.`klaviyo__events`\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_id", "file_key_name": "models.klaviyo__events"}, "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__events_event_id__source_relation.847dad4174": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_8b483e4115ab91fbb579be0d68288d98\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["event_id", "source_relation"], "model": "{{ get_where_subquery(ref('klaviyo__events')) }}"}, "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.klaviyo.klaviyo__events"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_8b483e4115ab91fbb579be0d68288d98", "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": "dbt_test_dbt_test__audit", "fqn": ["klaviyo", "dbt_utils_unique_combination_of_columns_klaviyo__events_event_id__source_relation"], "unique_id": "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__events_event_id__source_relation.847dad4174", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "dbt_utils_unique_combination_o_8b483e4115ab91fbb579be0d68288d98.sql", "original_file_path": "models/klaviyo.yml", "name": "dbt_utils_unique_combination_of_columns_klaviyo__events_event_id__source_relation", "alias": "dbt_utils_unique_combination_o_8b483e4115ab91fbb579be0d68288d98", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["klaviyo__events"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo/models/klaviyo.yml/dbt_utils_unique_combination_o_8b483e4115ab91fbb579be0d68288d98.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_8b483e4115ab91fbb579be0d68288d98"}, "created_at": 1665703195.5266309, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n event_id, source_relation\n from `dbt-package-testing`.`dbt_test_klaviyo`.`klaviyo__events`\n group by event_id, source_relation\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.klaviyo__events"}, "test.klaviyo.not_null_klaviyo__person_campaign_flow_person_id.e27d13b0f2": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "person_id", "model": "{{ get_where_subquery(ref('klaviyo__person_campaign_flow')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.klaviyo.klaviyo__person_campaign_flow"]}, "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": "dbt_test_dbt_test__audit", "fqn": ["klaviyo", "not_null_klaviyo__person_campaign_flow_person_id"], "unique_id": "test.klaviyo.not_null_klaviyo__person_campaign_flow_person_id.e27d13b0f2", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "not_null_klaviyo__person_campaign_flow_person_id.sql", "original_file_path": "models/klaviyo.yml", "name": "not_null_klaviyo__person_campaign_flow_person_id", "alias": "not_null_klaviyo__person_campaign_flow_person_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["klaviyo__person_campaign_flow"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo/models/klaviyo.yml/not_null_klaviyo__person_campaign_flow_person_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1665703195.5296068, "compiled_sql": "\n \n \n\n\n\nselect person_id\nfrom `dbt-package-testing`.`dbt_test_klaviyo`.`klaviyo__person_campaign_flow`\nwhere person_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "person_id", "file_key_name": "models.klaviyo__person_campaign_flow"}, "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__person_campaign_flow_person_id__last_touch_campaign_id__last_touch_flow_id__variation_id__source_relation.30e1824079": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_b833c7b8de2dbcac0bfcd913f29d49fd\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["person_id", "last_touch_campaign_id", "last_touch_flow_id", "variation_id", "source_relation"], "model": "{{ get_where_subquery(ref('klaviyo__person_campaign_flow')) }}"}, "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.klaviyo.klaviyo__person_campaign_flow"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_b833c7b8de2dbcac0bfcd913f29d49fd", "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": "dbt_test_dbt_test__audit", "fqn": ["klaviyo", "dbt_utils_unique_combination_of_columns_klaviyo__person_campaign_flow_person_id__last_touch_campaign_id__last_touch_flow_id__variation_id__source_relation"], "unique_id": "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__person_campaign_flow_person_id__last_touch_campaign_id__last_touch_flow_id__variation_id__source_relation.30e1824079", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "dbt_utils_unique_combination_o_b833c7b8de2dbcac0bfcd913f29d49fd.sql", "original_file_path": "models/klaviyo.yml", "name": "dbt_utils_unique_combination_of_columns_klaviyo__person_campaign_flow_person_id__last_touch_campaign_id__last_touch_flow_id__variation_id__source_relation", "alias": "dbt_utils_unique_combination_o_b833c7b8de2dbcac0bfcd913f29d49fd", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["klaviyo__person_campaign_flow"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo/models/klaviyo.yml/dbt_utils_unique_combination_o_b833c7b8de2dbcac0bfcd913f29d49fd.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_b833c7b8de2dbcac0bfcd913f29d49fd"}, "created_at": 1665703195.5306208, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n person_id, last_touch_campaign_id, last_touch_flow_id, variation_id, source_relation\n from `dbt-package-testing`.`dbt_test_klaviyo`.`klaviyo__person_campaign_flow`\n group by person_id, last_touch_campaign_id, last_touch_flow_id, variation_id, source_relation\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.klaviyo__person_campaign_flow"}, "test.klaviyo.not_null_klaviyo__campaigns_campaign_variation_key.c4588cdadc": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_variation_key", "model": "{{ get_where_subquery(ref('klaviyo__campaigns')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.klaviyo.klaviyo__campaigns"]}, "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": "dbt_test_dbt_test__audit", "fqn": ["klaviyo", "not_null_klaviyo__campaigns_campaign_variation_key"], "unique_id": "test.klaviyo.not_null_klaviyo__campaigns_campaign_variation_key.c4588cdadc", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "not_null_klaviyo__campaigns_campaign_variation_key.sql", "original_file_path": "models/klaviyo.yml", "name": "not_null_klaviyo__campaigns_campaign_variation_key", "alias": "not_null_klaviyo__campaigns_campaign_variation_key", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["klaviyo__campaigns"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo/models/klaviyo.yml/not_null_klaviyo__campaigns_campaign_variation_key.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1665703195.533937, "compiled_sql": "\n \n \n\n\n\nselect campaign_variation_key\nfrom `dbt-package-testing`.`dbt_test_klaviyo`.`klaviyo__campaigns`\nwhere campaign_variation_key is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "campaign_variation_key", "file_key_name": "models.klaviyo__campaigns"}, "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__campaigns_campaign_variation_key__source_relation.e5d14aee28": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_8c02a0c80dd7e19571d353539126fd64\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["campaign_variation_key", "source_relation"], "model": "{{ get_where_subquery(ref('klaviyo__campaigns')) }}"}, "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.klaviyo.klaviyo__campaigns"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_8c02a0c80dd7e19571d353539126fd64", "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": "dbt_test_dbt_test__audit", "fqn": ["klaviyo", "dbt_utils_unique_combination_of_columns_klaviyo__campaigns_campaign_variation_key__source_relation"], "unique_id": "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__campaigns_campaign_variation_key__source_relation.e5d14aee28", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "dbt_utils_unique_combination_o_8c02a0c80dd7e19571d353539126fd64.sql", "original_file_path": "models/klaviyo.yml", "name": "dbt_utils_unique_combination_of_columns_klaviyo__campaigns_campaign_variation_key__source_relation", "alias": "dbt_utils_unique_combination_o_8c02a0c80dd7e19571d353539126fd64", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["klaviyo__campaigns"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo/models/klaviyo.yml/dbt_utils_unique_combination_o_8c02a0c80dd7e19571d353539126fd64.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_8c02a0c80dd7e19571d353539126fd64"}, "created_at": 1665703195.535132, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n campaign_variation_key, source_relation\n from `dbt-package-testing`.`dbt_test_klaviyo`.`klaviyo__campaigns`\n group by campaign_variation_key, source_relation\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.klaviyo__campaigns"}, "test.klaviyo.not_null_klaviyo__flows_flow_variation_key.152c0d960b": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "flow_variation_key", "model": "{{ get_where_subquery(ref('klaviyo__flows')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.klaviyo.klaviyo__flows"]}, "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": "dbt_test_dbt_test__audit", "fqn": ["klaviyo", "not_null_klaviyo__flows_flow_variation_key"], "unique_id": "test.klaviyo.not_null_klaviyo__flows_flow_variation_key.152c0d960b", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "not_null_klaviyo__flows_flow_variation_key.sql", "original_file_path": "models/klaviyo.yml", "name": "not_null_klaviyo__flows_flow_variation_key", "alias": "not_null_klaviyo__flows_flow_variation_key", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["klaviyo__flows"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo/models/klaviyo.yml/not_null_klaviyo__flows_flow_variation_key.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1665703195.5379379, "compiled_sql": "\n \n \n\n\n\nselect flow_variation_key\nfrom `dbt-package-testing`.`dbt_test_klaviyo`.`klaviyo__flows`\nwhere flow_variation_key is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "flow_variation_key", "file_key_name": "models.klaviyo__flows"}, "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__flows_flow_variation_key__source_relation.925d4118dc": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_699ce797a4af34c0906f1e96e7e5186e\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["flow_variation_key", "source_relation"], "model": "{{ get_where_subquery(ref('klaviyo__flows')) }}"}, "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.klaviyo.klaviyo__flows"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_699ce797a4af34c0906f1e96e7e5186e", "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": "dbt_test_dbt_test__audit", "fqn": ["klaviyo", "dbt_utils_unique_combination_of_columns_klaviyo__flows_flow_variation_key__source_relation"], "unique_id": "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__flows_flow_variation_key__source_relation.925d4118dc", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "dbt_utils_unique_combination_o_699ce797a4af34c0906f1e96e7e5186e.sql", "original_file_path": "models/klaviyo.yml", "name": "dbt_utils_unique_combination_of_columns_klaviyo__flows_flow_variation_key__source_relation", "alias": "dbt_utils_unique_combination_o_699ce797a4af34c0906f1e96e7e5186e", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["klaviyo__flows"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo/models/klaviyo.yml/dbt_utils_unique_combination_o_699ce797a4af34c0906f1e96e7e5186e.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_699ce797a4af34c0906f1e96e7e5186e"}, "created_at": 1665703195.539296, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n flow_variation_key, source_relation\n from `dbt-package-testing`.`dbt_test_klaviyo`.`klaviyo__flows`\n group by flow_variation_key, source_relation\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.klaviyo__flows"}, "test.klaviyo.not_null_klaviyo__persons_person_id.624a41e75a": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "person_id", "model": "{{ get_where_subquery(ref('klaviyo__persons')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.klaviyo.klaviyo__persons"]}, "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": "dbt_test_dbt_test__audit", "fqn": ["klaviyo", "not_null_klaviyo__persons_person_id"], "unique_id": "test.klaviyo.not_null_klaviyo__persons_person_id.624a41e75a", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "not_null_klaviyo__persons_person_id.sql", "original_file_path": "models/klaviyo.yml", "name": "not_null_klaviyo__persons_person_id", "alias": "not_null_klaviyo__persons_person_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["klaviyo__persons"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo/models/klaviyo.yml/not_null_klaviyo__persons_person_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1665703195.542968, "compiled_sql": "\n \n \n\n\n\nselect person_id\nfrom `dbt-package-testing`.`dbt_test_klaviyo`.`klaviyo__persons`\nwhere person_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "person_id", "file_key_name": "models.klaviyo__persons"}, "test.klaviyo.unique_klaviyo__persons_email.a330194dd6": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}{{ config(severity=\"warn\") }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "email", "model": "{{ get_where_subquery(ref('klaviyo__persons')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.klaviyo.klaviyo__persons"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "WARN", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "dbt_test_dbt_test__audit", "fqn": ["klaviyo", "unique_klaviyo__persons_email"], "unique_id": "test.klaviyo.unique_klaviyo__persons_email.a330194dd6", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "unique_klaviyo__persons_email.sql", "original_file_path": "models/klaviyo.yml", "name": "unique_klaviyo__persons_email", "alias": "unique_klaviyo__persons_email", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["klaviyo__persons"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo/models/klaviyo.yml/unique_klaviyo__persons_email.sql", "build_path": null, "deferred": false, "unrendered_config": {"severity": "WARN"}, "created_at": 1665703195.544244, "compiled_sql": "\n \n \n\nwith dbt_test__target as (\n\n select email as unique_field\n from `dbt-package-testing`.`dbt_test_klaviyo`.`klaviyo__persons`\n where email 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\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "email", "file_key_name": "models.klaviyo__persons"}, "test.klaviyo.not_null_klaviyo__persons_email.072e38d07d": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "email", "model": "{{ get_where_subquery(ref('klaviyo__persons')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.klaviyo.klaviyo__persons"]}, "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": "dbt_test_dbt_test__audit", "fqn": ["klaviyo", "not_null_klaviyo__persons_email"], "unique_id": "test.klaviyo.not_null_klaviyo__persons_email.072e38d07d", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "not_null_klaviyo__persons_email.sql", "original_file_path": "models/klaviyo.yml", "name": "not_null_klaviyo__persons_email", "alias": "not_null_klaviyo__persons_email", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["klaviyo__persons"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo/models/klaviyo.yml/not_null_klaviyo__persons_email.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1665703195.545207, "compiled_sql": "\n \n \n\n\n\nselect email\nfrom `dbt-package-testing`.`dbt_test_klaviyo`.`klaviyo__persons`\nwhere email is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "email", "file_key_name": "models.klaviyo__persons"}, "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__persons_person_id__source_relation.b223d703b3": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_f8f3a9d3aa76b62bb804805c73d99329\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["person_id", "source_relation"], "model": "{{ get_where_subquery(ref('klaviyo__persons')) }}"}, "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.klaviyo.klaviyo__persons"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_f8f3a9d3aa76b62bb804805c73d99329", "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": "dbt_test_dbt_test__audit", "fqn": ["klaviyo", "dbt_utils_unique_combination_of_columns_klaviyo__persons_person_id__source_relation"], "unique_id": "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__persons_person_id__source_relation.b223d703b3", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "dbt_utils_unique_combination_o_f8f3a9d3aa76b62bb804805c73d99329.sql", "original_file_path": "models/klaviyo.yml", "name": "dbt_utils_unique_combination_of_columns_klaviyo__persons_person_id__source_relation", "alias": "dbt_utils_unique_combination_o_f8f3a9d3aa76b62bb804805c73d99329", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["klaviyo__persons"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo/models/klaviyo.yml/dbt_utils_unique_combination_o_f8f3a9d3aa76b62bb804805c73d99329.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_f8f3a9d3aa76b62bb804805c73d99329"}, "created_at": 1665703195.546377, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n person_id, source_relation\n from `dbt-package-testing`.`dbt_test_klaviyo`.`klaviyo__persons`\n group by person_id, source_relation\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.klaviyo__persons"}, "test.klaviyo.not_null_int_klaviyo__event_attribution_event_id.8d186152c4": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('int_klaviyo__event_attribution')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.klaviyo.int_klaviyo__event_attribution"]}, "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": "dbt_test_dbt_test__audit", "fqn": ["klaviyo", "intermediate", "not_null_int_klaviyo__event_attribution_event_id"], "unique_id": "test.klaviyo.not_null_int_klaviyo__event_attribution_event_id.8d186152c4", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "not_null_int_klaviyo__event_attribution_event_id.sql", "original_file_path": "models/intermediate/int_klaviyo.yml", "name": "not_null_int_klaviyo__event_attribution_event_id", "alias": "not_null_int_klaviyo__event_attribution_event_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["int_klaviyo__event_attribution"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo/models/intermediate/int_klaviyo.yml/not_null_int_klaviyo__event_attribution_event_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1665703195.557622, "compiled_sql": "\n \n \n\n\n\nselect event_id\nfrom `dbt-package-testing`.`dbt_test_int_klaviyo`.`int_klaviyo__event_attribution`\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "event_id", "file_key_name": "models.int_klaviyo__event_attribution"}, "test.klaviyo.dbt_utils_unique_combination_of_columns_int_klaviyo__event_attribution_event_id__source_relation.654b98ad2c": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_a0147e1bc143333a515d11c7f665da10\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["event_id", "source_relation"], "model": "{{ get_where_subquery(ref('int_klaviyo__event_attribution')) }}"}, "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.klaviyo.int_klaviyo__event_attribution"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_a0147e1bc143333a515d11c7f665da10", "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": "dbt_test_dbt_test__audit", "fqn": ["klaviyo", "intermediate", "dbt_utils_unique_combination_of_columns_int_klaviyo__event_attribution_event_id__source_relation"], "unique_id": "test.klaviyo.dbt_utils_unique_combination_of_columns_int_klaviyo__event_attribution_event_id__source_relation.654b98ad2c", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "dbt_utils_unique_combination_o_a0147e1bc143333a515d11c7f665da10.sql", "original_file_path": "models/intermediate/int_klaviyo.yml", "name": "dbt_utils_unique_combination_of_columns_int_klaviyo__event_attribution_event_id__source_relation", "alias": "dbt_utils_unique_combination_o_a0147e1bc143333a515d11c7f665da10", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["int_klaviyo__event_attribution"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo/models/intermediate/int_klaviyo.yml/dbt_utils_unique_combination_o_a0147e1bc143333a515d11c7f665da10.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_a0147e1bc143333a515d11c7f665da10"}, "created_at": 1665703195.5589252, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n event_id, source_relation\n from `dbt-package-testing`.`dbt_test_int_klaviyo`.`int_klaviyo__event_attribution`\n group by event_id, source_relation\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.int_klaviyo__event_attribution"}, "test.klaviyo.dbt_utils_unique_combination_of_columns_int_klaviyo__campaign_flow_metrics_variation_id__source_relation__last_touch_campaign_id__last_touch_flow_id.3ea05faa81": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_e4603c9c1d4c74e9c4571eb9a11c5a61\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["variation_id", "source_relation", "last_touch_campaign_id", "last_touch_flow_id"], "model": "{{ get_where_subquery(ref('int_klaviyo__campaign_flow_metrics')) }}"}, "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.klaviyo.int_klaviyo__campaign_flow_metrics"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_e4603c9c1d4c74e9c4571eb9a11c5a61", "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": "dbt_test_dbt_test__audit", "fqn": ["klaviyo", "intermediate", "dbt_utils_unique_combination_of_columns_int_klaviyo__campaign_flow_metrics_variation_id__source_relation__last_touch_campaign_id__last_touch_flow_id"], "unique_id": "test.klaviyo.dbt_utils_unique_combination_of_columns_int_klaviyo__campaign_flow_metrics_variation_id__source_relation__last_touch_campaign_id__last_touch_flow_id.3ea05faa81", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "dbt_utils_unique_combination_o_e4603c9c1d4c74e9c4571eb9a11c5a61.sql", "original_file_path": "models/intermediate/int_klaviyo.yml", "name": "dbt_utils_unique_combination_of_columns_int_klaviyo__campaign_flow_metrics_variation_id__source_relation__last_touch_campaign_id__last_touch_flow_id", "alias": "dbt_utils_unique_combination_o_e4603c9c1d4c74e9c4571eb9a11c5a61", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["int_klaviyo__campaign_flow_metrics"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo/models/intermediate/int_klaviyo.yml/dbt_utils_unique_combination_o_e4603c9c1d4c74e9c4571eb9a11c5a61.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_e4603c9c1d4c74e9c4571eb9a11c5a61"}, "created_at": 1665703195.561899, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n variation_id, source_relation, last_touch_campaign_id, last_touch_flow_id\n from `dbt-package-testing`.`dbt_test_int_klaviyo`.`int_klaviyo__campaign_flow_metrics`\n group by variation_id, source_relation, last_touch_campaign_id, last_touch_flow_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.int_klaviyo__campaign_flow_metrics"}, "test.klaviyo.not_null_int_klaviyo__person_metrics_person_id.2c0f4e5a67": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "person_id", "model": "{{ get_where_subquery(ref('int_klaviyo__person_metrics')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.klaviyo.int_klaviyo__person_metrics"]}, "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": "dbt_test_dbt_test__audit", "fqn": ["klaviyo", "intermediate", "not_null_int_klaviyo__person_metrics_person_id"], "unique_id": "test.klaviyo.not_null_int_klaviyo__person_metrics_person_id.2c0f4e5a67", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "not_null_int_klaviyo__person_metrics_person_id.sql", "original_file_path": "models/intermediate/int_klaviyo.yml", "name": "not_null_int_klaviyo__person_metrics_person_id", "alias": "not_null_int_klaviyo__person_metrics_person_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["int_klaviyo__person_metrics"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo/models/intermediate/int_klaviyo.yml/not_null_int_klaviyo__person_metrics_person_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1665703195.565355, "compiled_sql": "\n \n \n\n\n\nselect person_id\nfrom `dbt-package-testing`.`dbt_test_int_klaviyo`.`int_klaviyo__person_metrics`\nwhere person_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "person_id", "file_key_name": "models.int_klaviyo__person_metrics"}, "test.klaviyo.dbt_utils_unique_combination_of_columns_int_klaviyo__person_metrics_person_id__source_relation.4897d57f8b": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_44a55e0600e791676842b0edee32af5c\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["person_id", "source_relation"], "model": "{{ get_where_subquery(ref('int_klaviyo__person_metrics')) }}"}, "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.klaviyo.int_klaviyo__person_metrics"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_44a55e0600e791676842b0edee32af5c", "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": "dbt_test_dbt_test__audit", "fqn": ["klaviyo", "intermediate", "dbt_utils_unique_combination_of_columns_int_klaviyo__person_metrics_person_id__source_relation"], "unique_id": "test.klaviyo.dbt_utils_unique_combination_of_columns_int_klaviyo__person_metrics_person_id__source_relation.4897d57f8b", "package_name": "klaviyo", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo", "path": "dbt_utils_unique_combination_o_44a55e0600e791676842b0edee32af5c.sql", "original_file_path": "models/intermediate/int_klaviyo.yml", "name": "dbt_utils_unique_combination_of_columns_int_klaviyo__person_metrics_person_id__source_relation", "alias": "dbt_utils_unique_combination_o_44a55e0600e791676842b0edee32af5c", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["int_klaviyo__person_metrics"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/klaviyo/models/intermediate/int_klaviyo.yml/dbt_utils_unique_combination_o_44a55e0600e791676842b0edee32af5c.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_44a55e0600e791676842b0edee32af5c"}, "created_at": 1665703195.5665112, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n person_id, source_relation\n from `dbt-package-testing`.`dbt_test_int_klaviyo`.`int_klaviyo__person_metrics`\n group by person_id, source_relation\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.int_klaviyo__person_metrics"}, "test.shopify.unique_shopify__customer_cohorts_customer_cohort_id.c5e4855c7a": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "customer_cohort_id", "model": "{{ get_where_subquery(ref('shopify__customer_cohorts')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.shopify.shopify__customer_cohorts"]}, "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": "dbt_test_dbt_test__audit", "fqn": ["shopify", "unique_shopify__customer_cohorts_customer_cohort_id"], "unique_id": "test.shopify.unique_shopify__customer_cohorts_customer_cohort_id.c5e4855c7a", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify", "path": "unique_shopify__customer_cohorts_customer_cohort_id.sql", "original_file_path": "models/shopify.yml", "name": "unique_shopify__customer_cohorts_customer_cohort_id", "alias": "unique_shopify__customer_cohorts_customer_cohort_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["shopify__customer_cohorts"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify/models/shopify.yml/unique_shopify__customer_cohorts_customer_cohort_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1665703195.606169, "compiled_sql": "\n \n \n\nwith dbt_test__target as (\n\n select customer_cohort_id as unique_field\n from `dbt-package-testing`.`dbt_test_shopify`.`shopify__customer_cohorts`\n where customer_cohort_id 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\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "customer_cohort_id", "file_key_name": "models.shopify__customer_cohorts"}, "test.shopify.not_null_shopify__customer_cohorts_customer_cohort_id.88e9c30925": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "customer_cohort_id", "model": "{{ get_where_subquery(ref('shopify__customer_cohorts')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.shopify.shopify__customer_cohorts"]}, "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": "dbt_test_dbt_test__audit", "fqn": ["shopify", "not_null_shopify__customer_cohorts_customer_cohort_id"], "unique_id": "test.shopify.not_null_shopify__customer_cohorts_customer_cohort_id.88e9c30925", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify", "path": "not_null_shopify__customer_cohorts_customer_cohort_id.sql", "original_file_path": "models/shopify.yml", "name": "not_null_shopify__customer_cohorts_customer_cohort_id", "alias": "not_null_shopify__customer_cohorts_customer_cohort_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["shopify__customer_cohorts"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify/models/shopify.yml/not_null_shopify__customer_cohorts_customer_cohort_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1665703195.607311, "compiled_sql": "\n \n \n\n\n\nselect customer_cohort_id\nfrom `dbt-package-testing`.`dbt_test_shopify`.`shopify__customer_cohorts`\nwhere customer_cohort_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "customer_cohort_id", "file_key_name": "models.shopify__customer_cohorts"}, "test.shopify.dbt_utils_unique_combination_of_columns_shopify__orders_order_id__source_relation.b2d1eaf63d": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_0e30d4742af59bda60aa3c3f634a72ce\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["order_id", "source_relation"], "model": "{{ get_where_subquery(ref('shopify__orders')) }}"}, "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.shopify.shopify__orders"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_0e30d4742af59bda60aa3c3f634a72ce", "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": "dbt_test_dbt_test__audit", "fqn": ["shopify", "dbt_utils_unique_combination_of_columns_shopify__orders_order_id__source_relation"], "unique_id": "test.shopify.dbt_utils_unique_combination_of_columns_shopify__orders_order_id__source_relation.b2d1eaf63d", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify", "path": "dbt_utils_unique_combination_o_0e30d4742af59bda60aa3c3f634a72ce.sql", "original_file_path": "models/shopify.yml", "name": "dbt_utils_unique_combination_of_columns_shopify__orders_order_id__source_relation", "alias": "dbt_utils_unique_combination_o_0e30d4742af59bda60aa3c3f634a72ce", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["shopify__orders"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify/models/shopify.yml/dbt_utils_unique_combination_o_0e30d4742af59bda60aa3c3f634a72ce.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_0e30d4742af59bda60aa3c3f634a72ce"}, "created_at": 1665703195.60868, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n order_id, source_relation\n from `dbt-package-testing`.`dbt_test_shopify`.`shopify__orders`\n group by order_id, source_relation\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.shopify__orders"}, "test.shopify.dbt_utils_unique_combination_of_columns_shopify__customers_customer_id__source_relation.88d3656469": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_93b849a7493f07ea332b58b74fbb6696\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["customer_id", "source_relation"], "model": "{{ get_where_subquery(ref('shopify__customers')) }}"}, "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.shopify.shopify__customers"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_93b849a7493f07ea332b58b74fbb6696", "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": "dbt_test_dbt_test__audit", "fqn": ["shopify", "dbt_utils_unique_combination_of_columns_shopify__customers_customer_id__source_relation"], "unique_id": "test.shopify.dbt_utils_unique_combination_of_columns_shopify__customers_customer_id__source_relation.88d3656469", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify", "path": "dbt_utils_unique_combination_o_93b849a7493f07ea332b58b74fbb6696.sql", "original_file_path": "models/shopify.yml", "name": "dbt_utils_unique_combination_of_columns_shopify__customers_customer_id__source_relation", "alias": "dbt_utils_unique_combination_o_93b849a7493f07ea332b58b74fbb6696", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["shopify__customers"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify/models/shopify.yml/dbt_utils_unique_combination_o_93b849a7493f07ea332b58b74fbb6696.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_93b849a7493f07ea332b58b74fbb6696"}, "created_at": 1665703195.612108, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n customer_id, source_relation\n from `dbt-package-testing`.`dbt_test_shopify`.`shopify__customers`\n group by customer_id, source_relation\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.shopify__customers"}, "test.shopify.dbt_utils_unique_combination_of_columns_shopify__products_product_id__source_relation.f00b2fb95a": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_64adf669e5f645d81dbdf6d5d3a930fa\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["product_id", "source_relation"], "model": "{{ get_where_subquery(ref('shopify__products')) }}"}, "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.shopify.shopify__products"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_64adf669e5f645d81dbdf6d5d3a930fa", "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": "dbt_test_dbt_test__audit", "fqn": ["shopify", "dbt_utils_unique_combination_of_columns_shopify__products_product_id__source_relation"], "unique_id": "test.shopify.dbt_utils_unique_combination_of_columns_shopify__products_product_id__source_relation.f00b2fb95a", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify", "path": "dbt_utils_unique_combination_o_64adf669e5f645d81dbdf6d5d3a930fa.sql", "original_file_path": "models/shopify.yml", "name": "dbt_utils_unique_combination_of_columns_shopify__products_product_id__source_relation", "alias": "dbt_utils_unique_combination_o_64adf669e5f645d81dbdf6d5d3a930fa", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["shopify__products"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify/models/shopify.yml/dbt_utils_unique_combination_o_64adf669e5f645d81dbdf6d5d3a930fa.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_64adf669e5f645d81dbdf6d5d3a930fa"}, "created_at": 1665703195.615246, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n product_id, source_relation\n from `dbt-package-testing`.`dbt_test_shopify`.`shopify__products`\n group by product_id, source_relation\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.shopify__products"}, "test.shopify.dbt_utils_unique_combination_of_columns_shopify__order_lines_order_line_id__source_relation.2483d5ef95": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_0bd7a3e6d2ce7dc1c5c09d9f9d5f6b40\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["order_line_id", "source_relation"], "model": "{{ get_where_subquery(ref('shopify__order_lines')) }}"}, "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.shopify.shopify__order_lines"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_0bd7a3e6d2ce7dc1c5c09d9f9d5f6b40", "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": "dbt_test_dbt_test__audit", "fqn": ["shopify", "dbt_utils_unique_combination_of_columns_shopify__order_lines_order_line_id__source_relation"], "unique_id": "test.shopify.dbt_utils_unique_combination_of_columns_shopify__order_lines_order_line_id__source_relation.2483d5ef95", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify", "path": "dbt_utils_unique_combination_o_0bd7a3e6d2ce7dc1c5c09d9f9d5f6b40.sql", "original_file_path": "models/shopify.yml", "name": "dbt_utils_unique_combination_of_columns_shopify__order_lines_order_line_id__source_relation", "alias": "dbt_utils_unique_combination_o_0bd7a3e6d2ce7dc1c5c09d9f9d5f6b40", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["shopify__order_lines"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify/models/shopify.yml/dbt_utils_unique_combination_o_0bd7a3e6d2ce7dc1c5c09d9f9d5f6b40.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_0bd7a3e6d2ce7dc1c5c09d9f9d5f6b40"}, "created_at": 1665703195.6192682, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n order_line_id, source_relation\n from `dbt-package-testing`.`dbt_test_shopify`.`shopify__order_lines`\n group by order_line_id, source_relation\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.shopify__order_lines"}, "test.shopify.dbt_utils_unique_combination_of_columns_shopify__transactions_transaction_id__source_relation.7341b755c0": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_8e8f17b2e5241cc1e3a33f9fa479a3fb\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["transaction_id", "source_relation"], "model": "{{ get_where_subquery(ref('shopify__transactions')) }}"}, "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.shopify.shopify__transactions"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_8e8f17b2e5241cc1e3a33f9fa479a3fb", "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": "dbt_test_dbt_test__audit", "fqn": ["shopify", "dbt_utils_unique_combination_of_columns_shopify__transactions_transaction_id__source_relation"], "unique_id": "test.shopify.dbt_utils_unique_combination_of_columns_shopify__transactions_transaction_id__source_relation.7341b755c0", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify", "path": "dbt_utils_unique_combination_o_8e8f17b2e5241cc1e3a33f9fa479a3fb.sql", "original_file_path": "models/shopify.yml", "name": "dbt_utils_unique_combination_of_columns_shopify__transactions_transaction_id__source_relation", "alias": "dbt_utils_unique_combination_o_8e8f17b2e5241cc1e3a33f9fa479a3fb", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["shopify__transactions"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify/models/shopify.yml/dbt_utils_unique_combination_o_8e8f17b2e5241cc1e3a33f9fa479a3fb.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_8e8f17b2e5241cc1e3a33f9fa479a3fb"}, "created_at": 1665703195.622826, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n transaction_id, source_relation\n from `dbt-package-testing`.`dbt_test_shopify`.`shopify__transactions`\n group by transaction_id, source_relation\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.shopify__transactions"}, "test.shopify.dbt_utils_unique_combination_of_columns_shopify__customers__order_aggregates_customer_id__source_relation.5a5e85c8a9": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_4d1af0d9338b2b5b246e23c580e294e3\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["customer_id", "source_relation"], "model": "{{ get_where_subquery(ref('shopify__customers__order_aggregates')) }}"}, "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.shopify.shopify__customers__order_aggregates"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_4d1af0d9338b2b5b246e23c580e294e3", "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": "dbt_test_dbt_test__audit", "fqn": ["shopify", "intermediate", "dbt_utils_unique_combination_of_columns_shopify__customers__order_aggregates_customer_id__source_relation"], "unique_id": "test.shopify.dbt_utils_unique_combination_of_columns_shopify__customers__order_aggregates_customer_id__source_relation.5a5e85c8a9", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify", "path": "dbt_utils_unique_combination_o_4d1af0d9338b2b5b246e23c580e294e3.sql", "original_file_path": "models/intermediate/intermediate.yml", "name": "dbt_utils_unique_combination_of_columns_shopify__customers__order_aggregates_customer_id__source_relation", "alias": "dbt_utils_unique_combination_o_4d1af0d9338b2b5b246e23c580e294e3", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["shopify__customers__order_aggregates"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify/models/intermediate/intermediate.yml/dbt_utils_unique_combination_o_4d1af0d9338b2b5b246e23c580e294e3.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_4d1af0d9338b2b5b246e23c580e294e3"}, "created_at": 1665703195.6264, "compiled_sql": "\n\n\n\n\n\nwith __dbt__cte__shopify__customers__order_aggregates as (\nwith orders as (\n\n select *\n from `dbt-package-testing`.`dbt_test_stg_shopify`.`stg_shopify__order`\n\n), transactions as (\n\n select *\n from `dbt-package-testing`.`dbt_test_shopify`.`shopify__transactions`\n where lower(status) = 'success'\n\n), aggregated as (\n\n select\n orders.customer_id,\n orders.source_relation,\n min(orders.created_timestamp) as first_order_timestamp,\n max(orders.created_timestamp) as most_recent_order_timestamp,\n avg(case when lower(transactions.kind) in ('sale','capture') then transactions.currency_exchange_calculated_amount end) as average_order_value,\n sum(case when lower(transactions.kind) in ('sale','capture') then transactions.currency_exchange_calculated_amount end) as lifetime_total_spent,\n sum(case when lower(transactions.kind) in ('refund') then transactions.currency_exchange_calculated_amount end) as lifetime_total_refunded,\n count(distinct orders.order_id) as lifetime_count_orders\n from orders\n left join transactions\n using (order_id, source_relation)\n where customer_id is not null\n group by 1,2\n\n)\n\nselect *\nfrom aggregated\n),validation_errors as (\n\n select\n customer_id, source_relation\n from __dbt__cte__shopify__customers__order_aggregates\n group by customer_id, source_relation\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.shopify.shopify__customers__order_aggregates", "sql": " __dbt__cte__shopify__customers__order_aggregates as (\nwith orders as (\n\n select *\n from `dbt-package-testing`.`dbt_test_stg_shopify`.`stg_shopify__order`\n\n), transactions as (\n\n select *\n from `dbt-package-testing`.`dbt_test_shopify`.`shopify__transactions`\n where lower(status) = 'success'\n\n), aggregated as (\n\n select\n orders.customer_id,\n orders.source_relation,\n min(orders.created_timestamp) as first_order_timestamp,\n max(orders.created_timestamp) as most_recent_order_timestamp,\n avg(case when lower(transactions.kind) in ('sale','capture') then transactions.currency_exchange_calculated_amount end) as average_order_value,\n sum(case when lower(transactions.kind) in ('sale','capture') then transactions.currency_exchange_calculated_amount end) as lifetime_total_spent,\n sum(case when lower(transactions.kind) in ('refund') then transactions.currency_exchange_calculated_amount end) as lifetime_total_refunded,\n count(distinct orders.order_id) as lifetime_count_orders\n from orders\n left join transactions\n using (order_id, source_relation)\n where customer_id is not null\n group by 1,2\n\n)\n\nselect *\nfrom aggregated\n)"}], "relation_name": null, "column_name": null, "file_key_name": "models.shopify__customers__order_aggregates"}, "test.shopify.dbt_utils_unique_combination_of_columns_shopify__orders__order_line_aggregates_order_id__source_relation.09d921d473": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_3ae1e43ee344b59ccef000bf524f1f04\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["order_id", "source_relation"], "model": "{{ get_where_subquery(ref('shopify__orders__order_line_aggregates')) }}"}, "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.shopify.shopify__orders__order_line_aggregates"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_3ae1e43ee344b59ccef000bf524f1f04", "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": "dbt_test_dbt_test__audit", "fqn": ["shopify", "intermediate", "dbt_utils_unique_combination_of_columns_shopify__orders__order_line_aggregates_order_id__source_relation"], "unique_id": "test.shopify.dbt_utils_unique_combination_of_columns_shopify__orders__order_line_aggregates_order_id__source_relation.09d921d473", "package_name": "shopify", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify", "path": "dbt_utils_unique_combination_o_3ae1e43ee344b59ccef000bf524f1f04.sql", "original_file_path": "models/intermediate/intermediate.yml", "name": "dbt_utils_unique_combination_of_columns_shopify__orders__order_line_aggregates_order_id__source_relation", "alias": "dbt_utils_unique_combination_o_3ae1e43ee344b59ccef000bf524f1f04", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["shopify__orders__order_line_aggregates"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify/models/intermediate/intermediate.yml/dbt_utils_unique_combination_o_3ae1e43ee344b59ccef000bf524f1f04.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_3ae1e43ee344b59ccef000bf524f1f04"}, "created_at": 1665703195.629317, "compiled_sql": "\n\n\n\n\n\nwith __dbt__cte__shopify__orders__order_line_aggregates as (\nwith order_line as (\n\n select *\n from `dbt-package-testing`.`dbt_test_stg_shopify`.`stg_shopify__order_line`\n\n), aggregated as (\n\n select \n order_id,\n source_relation,\n count(*) as line_item_count\n from order_line\n group by 1,2\n\n)\n\nselect *\nfrom aggregated\n),validation_errors as (\n\n select\n order_id, source_relation\n from __dbt__cte__shopify__orders__order_line_aggregates\n group by order_id, source_relation\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.shopify.shopify__orders__order_line_aggregates", "sql": " __dbt__cte__shopify__orders__order_line_aggregates as (\nwith order_line as (\n\n select *\n from `dbt-package-testing`.`dbt_test_stg_shopify`.`stg_shopify__order_line`\n\n), aggregated as (\n\n select \n order_id,\n source_relation,\n count(*) as line_item_count\n from order_line\n group by 1,2\n\n)\n\nselect *\nfrom aggregated\n)"}], "relation_name": null, "column_name": null, "file_key_name": "models.shopify__orders__order_line_aggregates"}, "test.shopify_holistic_reporting.dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__customer_enhanced_email__klaviyo_source_relation__shopify_source_relation.2ea9394109": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_6d96dafa6cfb9bf7095ffd278a75adbc\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["email", "klaviyo_source_relation", "shopify_source_relation"], "model": "{{ get_where_subquery(ref('shopify_holistic_reporting__customer_enhanced')) }}"}, "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.shopify_holistic_reporting.shopify_holistic_reporting__customer_enhanced"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_6d96dafa6cfb9bf7095ffd278a75adbc", "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": "dbt_test_dbt_test__audit", "fqn": ["shopify_holistic_reporting", "dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__customer_enhanced_email__klaviyo_source_relation__shopify_source_relation"], "unique_id": "test.shopify_holistic_reporting.dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__customer_enhanced_email__klaviyo_source_relation__shopify_source_relation.2ea9394109", "package_name": "shopify_holistic_reporting", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_holistic_reporting", "path": "dbt_utils_unique_combination_o_6d96dafa6cfb9bf7095ffd278a75adbc.sql", "original_file_path": "models/shopify_holistic_reporting.yml", "name": "dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__customer_enhanced_email__klaviyo_source_relation__shopify_source_relation", "alias": "dbt_utils_unique_combination_o_6d96dafa6cfb9bf7095ffd278a75adbc", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["shopify_holistic_reporting__customer_enhanced"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_holistic_reporting/models/shopify_holistic_reporting.yml/dbt_utils_unique_combination_o_6d96dafa6cfb9bf7095ffd278a75adbc.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_6d96dafa6cfb9bf7095ffd278a75adbc"}, "created_at": 1665703195.6601799, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n email, klaviyo_source_relation, shopify_source_relation\n from `dbt-package-testing`.`dbt_test_shopify_holistic`.`shopify_holistic_reporting__customer_enhanced`\n group by email, klaviyo_source_relation, shopify_source_relation\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.shopify_holistic_reporting__customer_enhanced"}, "test.shopify_holistic_reporting.dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__daily_customer_metrics_date_day__email__klaviyo_source_relation__shopify_source_relation__campaign_id__flow_id__variation_id.0489c190fd": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_4b14da03db00d67d51bb9e9f7e8b766f\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["date_day", "email", "klaviyo_source_relation", "shopify_source_relation", "campaign_id", "flow_id", "variation_id"], "model": "{{ get_where_subquery(ref('shopify_holistic_reporting__daily_customer_metrics')) }}"}, "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.shopify_holistic_reporting.shopify_holistic_reporting__daily_customer_metrics"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_4b14da03db00d67d51bb9e9f7e8b766f", "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": "dbt_test_dbt_test__audit", "fqn": ["shopify_holistic_reporting", "dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__daily_customer_metrics_date_day__email__klaviyo_source_relation__shopify_source_relation__campaign_id__flow_id__variation_id"], "unique_id": "test.shopify_holistic_reporting.dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__daily_customer_metrics_date_day__email__klaviyo_source_relation__shopify_source_relation__campaign_id__flow_id__variation_id.0489c190fd", "package_name": "shopify_holistic_reporting", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_holistic_reporting", "path": "dbt_utils_unique_combination_o_4b14da03db00d67d51bb9e9f7e8b766f.sql", "original_file_path": "models/shopify_holistic_reporting.yml", "name": "dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__daily_customer_metrics_date_day__email__klaviyo_source_relation__shopify_source_relation__campaign_id__flow_id__variation_id", "alias": "dbt_utils_unique_combination_o_4b14da03db00d67d51bb9e9f7e8b766f", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["shopify_holistic_reporting__daily_customer_metrics"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_holistic_reporting/models/shopify_holistic_reporting.yml/dbt_utils_unique_combination_o_4b14da03db00d67d51bb9e9f7e8b766f.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_4b14da03db00d67d51bb9e9f7e8b766f"}, "created_at": 1665703195.6637282, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n date_day, email, klaviyo_source_relation, shopify_source_relation, campaign_id, flow_id, variation_id\n from `dbt-package-testing`.`dbt_test_shopify_holistic`.`shopify_holistic_reporting__daily_customer_metrics`\n group by date_day, email, klaviyo_source_relation, shopify_source_relation, campaign_id, flow_id, variation_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.shopify_holistic_reporting__daily_customer_metrics"}, "test.shopify_holistic_reporting.dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__orders_attribution_order_id__shopify_source_relation.0eb46743bb": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_ed10bd87338124f135be382dd44f7c6a\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["order_id", "shopify_source_relation"], "model": "{{ get_where_subquery(ref('shopify_holistic_reporting__orders_attribution')) }}"}, "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.shopify_holistic_reporting.shopify_holistic_reporting__orders_attribution"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_ed10bd87338124f135be382dd44f7c6a", "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": "dbt_test_dbt_test__audit", "fqn": ["shopify_holistic_reporting", "dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__orders_attribution_order_id__shopify_source_relation"], "unique_id": "test.shopify_holistic_reporting.dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__orders_attribution_order_id__shopify_source_relation.0eb46743bb", "package_name": "shopify_holistic_reporting", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_holistic_reporting", "path": "dbt_utils_unique_combination_o_ed10bd87338124f135be382dd44f7c6a.sql", "original_file_path": "models/shopify_holistic_reporting.yml", "name": "dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__orders_attribution_order_id__shopify_source_relation", "alias": "dbt_utils_unique_combination_o_ed10bd87338124f135be382dd44f7c6a", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["shopify_holistic_reporting__orders_attribution"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/shopify_holistic_reporting/models/shopify_holistic_reporting.yml/dbt_utils_unique_combination_o_ed10bd87338124f135be382dd44f7c6a.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_ed10bd87338124f135be382dd44f7c6a"}, "created_at": 1665703195.6671948, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n order_id, shopify_source_relation\n from `dbt-package-testing`.`dbt_test_shopify_holistic`.`shopify_holistic_reporting__orders_attribution`\n group by order_id, shopify_source_relation\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.shopify_holistic_reporting__orders_attribution"}}, "sources": {"source.shopify_source.shopify.order": {"fqn": ["shopify_source", "shopify", "order"], "database": "dbt-package-testing", "schema": "shopify", "unique_id": "source.shopify_source.shopify.order", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "models/src_shopify.yml", "original_file_path": "models/src_shopify.yml", "name": "order", "source_name": "shopify", "source_description": "", "loader": "", "identifier": "order", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": true, "column": null}, "loaded_at_field": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents an order in Shopify.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "app_id": {"name": "app_id", "description": "The ID of the app that created the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_address_1": {"name": "billing_address_address_1", "description": "The street address of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_address_2": {"name": "billing_address_address_2", "description": "An optional additional field for the street address of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_city": {"name": "billing_address_city", "description": "The city, town, or village of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_company": {"name": "billing_address_company", "description": "The company of the person associated with the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_country": {"name": "billing_address_country", "description": "The name of the country of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_country_code": {"name": "billing_address_country_code", "description": "The two-letter code (ISO 3166-1 format) for the country of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_first_name": {"name": "billing_address_first_name", "description": "The first name of the person associated with the payment method.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_last_name": {"name": "billing_address_last_name", "description": "The last name of the person associated with the payment method.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_latitude": {"name": "billing_address_latitude", "description": "The latitude of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_longitude": {"name": "billing_address_longitude", "description": "The longitude of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_name": {"name": "billing_address_name", "description": "The full name of the person associated with the payment method.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_phone": {"name": "billing_address_phone", "description": "The phone number at the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_province": {"name": "billing_address_province", "description": "The name of the region (province, state, prefecture, \u2026) of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_province_code": {"name": "billing_address_province_code", "description": "The two-letter abbreviation of the region of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "billing_address_zip": {"name": "billing_address_zip", "description": "The postal code (zip, postcode, Eircode, \u2026) of the billing address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "browser_ip": {"name": "browser_ip", "description": "The IP address of the browser used by the customer when they placed the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "buyer_accepts_marketing": {"name": "buyer_accepts_marketing", "description": "Whether the customer consented to receive email updates from the shop.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "cancel_reason": {"name": "cancel_reason", "description": "The reason why the order was canceled.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "cancelled_at": {"name": "cancelled_at", "description": "The date and time when the order was canceled.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "cart_token": {"name": "cart_token", "description": "The ID of the cart that's associated with the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "closed_at": {"name": "closed_at", "description": "The date and time when the order was closed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "The autogenerated date and time when the order was created in Shopify.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "The three-letter code for the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "customer_id": {"name": "customer_id", "description": "The ID of the order's customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email": {"name": "email", "description": "The customer's email address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "financial_status": {"name": "financial_status", "description": "The status of payments associated with the order. Can only be set when the order is created", "meta": {}, "data_type": null, "quote": null, "tags": []}, "fulfillment_status": {"name": "fulfillment_status", "description": "The order's status in terms of fulfilled line items.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "id": {"name": "id", "description": "The ID of the order, used for API purposes. This is different from the order_number property, which is the ID used by the shop owner and customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "landing_site_base_url": {"name": "landing_site_base_url", "description": "The URL for the page where the buyer landed when they entered the shop.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "location_id": {"name": "location_id", "description": "The ID of the physical location where the order was processed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "name": {"name": "name", "description": "The order name, generated by combining the order_number property with the order prefix and suffix that are set in the merchant's general settings.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "note": {"name": "note", "description": "An optional note that a shop owner can attach to the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "number": {"name": "number", "description": "The order's position in the shop's count of orders. Numbers are sequential and start at 1.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_number": {"name": "order_number", "description": "The order 's position in the shop's count of orders starting at 1001. Order numbers are sequential and start at 1001.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "processed_at": {"name": "processed_at", "description": "The date and time when an order was processed. This value is the date that appears on your orders and that's used in the analytic reports.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "processing_method": {"name": "processing_method", "description": "How the payment was processed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "referring_site": {"name": "referring_site", "description": "The website where the customer clicked a link to the shop.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_address_1": {"name": "shipping_address_address_1", "description": "The street address of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_address_2": {"name": "shipping_address_address_2", "description": "An optional additional field for the street address of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_city": {"name": "shipping_address_city", "description": "The city, town, or village of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_company": {"name": "shipping_address_company", "description": "The company of the person associated with the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_country": {"name": "shipping_address_country", "description": "The name of the country of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_country_code": {"name": "shipping_address_country_code", "description": "The two-letter code (ISO 3166-1 format) for the country of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_first_name": {"name": "shipping_address_first_name", "description": "The first name of the person associated with the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_last_name": {"name": "shipping_address_last_name", "description": "The last name of the person associated with the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_latitude": {"name": "shipping_address_latitude", "description": "The latitude of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_longitude": {"name": "shipping_address_longitude", "description": "The longitude of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_name": {"name": "shipping_address_name", "description": "The full name of the person associated with the payment method.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_phone": {"name": "shipping_address_phone", "description": "The phone number at the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_province": {"name": "shipping_address_province", "description": "The name of the region (province, state, prefecture, \u2026) of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_province_code": {"name": "shipping_address_province_code", "description": "The two-letter abbreviation of the region of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "shipping_address_zip": {"name": "shipping_address_zip", "description": "The postal code (zip, postcode, Eircode, \u2026) of the shipping address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_name": {"name": "source_name", "description": "Where the order originated. Can be set only during order creation, and is not writeable afterwards.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "subtotal_price": {"name": "subtotal_price", "description": "The price of the order in the shop currency after discounts but before shipping, taxes, and tips.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taxes_included": {"name": "taxes_included", "description": "Whether taxes are included in the order subtotal.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "test": {"name": "test", "description": "Whether this is a test order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "token": {"name": "token", "description": "A unique token for the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_discounts": {"name": "total_discounts", "description": "The total discounts applied to the price of the order in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_line_items_price": {"name": "total_line_items_price", "description": "The sum of all line item prices in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_price": {"name": "total_price", "description": "The sum of all line item prices, discounts, shipping, taxes, and tips in the shop currency. Must be positive.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_tax": {"name": "total_tax", "description": "The sum of all the taxes applied to the order in th shop currency. Must be positive).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_weight": {"name": "total_weight", "description": "The sum of all line item weights in grams.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_at": {"name": "updated_at", "description": "The date and time (ISO 8601 format) when the order was last modified.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "user_id": {"name": "user_id", "description": "The ID of the user logged into Shopify POS who processed the order, if applicable.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`dbt-package-testing`.`shopify`.`order`", "created_at": 1665703195.6831942}, "source.shopify_source.shopify.customer": {"fqn": ["shopify_source", "shopify", "customer"], "database": "dbt-package-testing", "schema": "shopify", "unique_id": "source.shopify_source.shopify.customer", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "models/src_shopify.yml", "original_file_path": "models/src_shopify.yml", "name": "customer", "source_name": "shopify", "source_description": "", "loader": "", "identifier": "customer", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a customer in Shopify.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "accepts_marketing": {"name": "accepts_marketing", "description": "Whether the customer has consented to receive marketing material via email.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "The date and time when the customer was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "default_address_id": {"name": "default_address_id", "description": "The default address for the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email": {"name": "email", "description": "The unique email address of the customer. Attempting to assign the same email address to multiple customers returns an error.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_name": {"name": "first_name", "description": "The customer's first name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "id": {"name": "id", "description": "A unique identifier for the customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_name": {"name": "last_name", "description": "The customer's last name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "orders_count": {"name": "orders_count", "description": "The number of orders associated with this customer.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "phone": {"name": "phone", "description": "The unique phone number (E.164 format) for this customer. Attempting to assign the same phone number to multiple customers returns an error.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "state": {"name": "state", "description": "The state of the customer's account with a shop.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tax_exempt": {"name": "tax_exempt", "description": "Whether the customer is exempt from paying taxes on their order. If true, then taxes won't be applied to an order at checkout. If false, then taxes will be applied at checkout.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_spent": {"name": "total_spent", "description": "The total amount of money that the customer has spent across their order history.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_at": {"name": "updated_at", "description": "The date and time when the customer information was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "verified_email": {"name": "verified_email", "description": "Whether the customer has verified their email address.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`dbt-package-testing`.`shopify`.`customer`", "created_at": 1665703195.6833532}, "source.shopify_source.shopify.order_line": {"fqn": ["shopify_source", "shopify", "order_line"], "database": "dbt-package-testing", "schema": "shopify", "unique_id": "source.shopify_source.shopify.order_line", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "models/src_shopify.yml", "original_file_path": "models/src_shopify.yml", "name": "order_line", "source_name": "shopify", "source_description": "", "loader": "", "identifier": "order_line", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a line item for an order in Shopify.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "fulfillable_quantity": {"name": "fulfillable_quantity", "description": "The amount available to fulfill, calculated as follows: quantity - max(refunded_quantity, fulfilled_quantity) - pending_fulfilled_quantity - open_fulfilled_quantity", "meta": {}, "data_type": null, "quote": null, "tags": []}, "fulfillment_service": {"name": "fulfillment_service", "description": "The service provider that's fulfilling the item.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "fulfillment_status": {"name": "fulfillment_status", "description": "How far along an order is in terms line items fulfilled.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "gift_card": {"name": "gift_card", "description": "Whether the item is a gift card. If true, then the item is not taxed or considered for shipping charges.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "grams": {"name": "grams", "description": "The weight of the item in grams.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "id": {"name": "id", "description": "The ID of the line item.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "name": {"name": "name", "description": "The name of the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_id": {"name": "order_id", "description": "The ID of the related order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "price": {"name": "price", "description": "The price of the item before discounts have been applied in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "product_id": {"name": "product_id", "description": "The ID of the product that the line item belongs to. Can be null if the original product associated with the order is deleted at a later date.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "quantity": {"name": "quantity", "description": "The number of items that were purchased.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "requires_shipping": {"name": "requires_shipping", "description": "Whether the item requires shipping.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "sku": {"name": "sku", "description": "The item's SKU (stock keeping unit).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taxable": {"name": "taxable", "description": "Whether the item was taxable.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "title": {"name": "title", "description": "The title of the product.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_discount": {"name": "total_discount", "description": "The total amount of the discount allocated to the line item in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "variant_id": {"name": "variant_id", "description": "The ID of the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "vendor": {"name": "vendor", "description": "The name of the item's supplier.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`dbt-package-testing`.`shopify`.`order_line`", "created_at": 1665703195.6834471}, "source.shopify_source.shopify.order_line_refund": {"fqn": ["shopify_source", "shopify", "order_line_refund"], "database": "dbt-package-testing", "schema": "shopify", "unique_id": "source.shopify_source.shopify.order_line_refund", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "models/src_shopify.yml", "original_file_path": "models/src_shopify.yml", "name": "order_line_refund", "source_name": "shopify", "source_description": "", "loader": "", "identifier": "order_line_refund", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a line item refund in Shopify.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "id": {"name": "id", "description": "The unique identifier of the line item in the refund.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "location_id": {"name": "location_id", "description": "TThe unique identifier of the location where the items will be restockedBD", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_line_id": {"name": "order_line_id", "description": "The ID of the related line item in the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "quantity": {"name": "quantity", "description": "The quantity of the associated line item that was returned.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refund_id": {"name": "refund_id", "description": "The ID of the related refund.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "restock_type": {"name": "restock_type", "description": "How this refund line item affects inventory levels.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "subtotal": {"name": "subtotal", "description": "Subtotal amount of the order line refund", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_tax": {"name": "total_tax", "description": "The total tax applied to the refund.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`dbt-package-testing`.`shopify`.`order_line_refund`", "created_at": 1665703195.68352}, "source.shopify_source.shopify.product": {"fqn": ["shopify_source", "shopify", "product"], "database": "dbt-package-testing", "schema": "shopify", "unique_id": "source.shopify_source.shopify.product", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "models/src_shopify.yml", "original_file_path": "models/src_shopify.yml", "name": "product", "source_name": "shopify", "source_description": "", "loader": "", "identifier": "product", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a product in Shopify.", "columns": {"_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Whether the record has been deleted in the source system.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "The date and time when the product was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "handle": {"name": "handle", "description": "A unique human-friendly string for the product. Automatically generated from the product's title.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "id": {"name": "id", "description": "An unsigned 64-bit integer that's used as a unique identifier for the product. Each id is unique across the Shopify system. No two products will have the same id, even if they're from different shops.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "product_type": {"name": "product_type", "description": "A categorization for the product used for filtering and searching products.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "published_at": {"name": "published_at", "description": "The date and time (ISO 8601 format) when the product was published. Can be set to null to unpublish the product from the Online Store channel.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "published_scope": {"name": "published_scope", "description": "Whether the product is published to the Point of Sale channel.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "title": {"name": "title", "description": "The name of the product.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_at": {"name": "updated_at", "description": "The date and time when the product was last modified.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "vendor": {"name": "vendor", "description": "The name of the product's vendor.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`dbt-package-testing`.`shopify`.`product`", "created_at": 1665703195.683593}, "source.shopify_source.shopify.product_variant": {"fqn": ["shopify_source", "shopify", "product_variant"], "database": "dbt-package-testing", "schema": "shopify", "unique_id": "source.shopify_source.shopify.product_variant", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "models/src_shopify.yml", "original_file_path": "models/src_shopify.yml", "name": "product_variant", "source_name": "shopify", "source_description": "", "loader": "", "identifier": "product_variant", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a product variant in Shopify", "columns": {"barcode": {"name": "barcode", "description": "The barcode, UPC, or ISBN number for the product.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "compare_at_price": {"name": "compare_at_price", "description": "The original price of the item before an adjustment or a sale.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "The date and time (ISO 8601 format) when the product variant was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "fulfillment_service": {"name": "fulfillment_service", "description": "The fulfillment service associated with the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "grams": {"name": "grams", "description": "The weight of the product variant in grams.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "id": {"name": "id", "description": "The unique numeric identifier for the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "image_id": {"name": "image_id", "description": "The unique numeric identifier for a product's image. The image must be associated to the same product as the variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "inventory_item_id": {"name": "inventory_item_id", "description": "The unique identifier for the inventory item, which is used in the Inventory API to query for inventory information.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "inventory_management": {"name": "inventory_management", "description": "The fulfillment service that tracks the number of items in stock for the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "inventory_policy": {"name": "inventory_policy", "description": "Whether customers are allowed to place an order for the product variant when it's out of stock.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "inventory_quantity": {"name": "inventory_quantity", "description": "An aggregate of inventory across all locations. To adjust inventory at a specific location, use the InventoryLevel resource.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "old_inventory_quantity": {"name": "old_inventory_quantity", "description": "This property is deprecated. Use the InventoryLevel resource instead.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "option_1": {"name": "option_1", "description": "The custom properties that a shop owner uses to define product variants. You can define three options for a product variant: option1, option2, option3.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "option_2": {"name": "option_2", "description": "The custom properties that a shop owner uses to define product variants. You can define three options for a product variant: option1, option2, option3.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "option_3": {"name": "option_3", "description": "The custom properties that a shop owner uses to define product variants. You can define three options for a product variant: option1, option2, option3.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "position": {"name": "position", "description": "The order of the product variant in the list of product variants. The first position in the list is 1. The position of variants is indicated by the order in which they are listed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "price": {"name": "price", "description": "The price of the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "product_id": {"name": "product_id", "description": "The unique numeric identifier for the product.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "requires_shipping": {"name": "requires_shipping", "description": "This property is deprecated. Use the `requires_shipping` property on the InventoryItem resource instead.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "sku": {"name": "sku", "description": "A unique identifier for the product variant in the shop. Required in order to connect to a FulfillmentService.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taxable": {"name": "taxable", "description": "Whether a tax is charged when the product variant is sold.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tax_code": {"name": "tax_code", "description": "This parameter applies only to the stores that have the Avalara AvaTax app installed. Specifies the Avalara tax code for the product variant.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "title": {"name": "title", "description": "The title of the product variant. The title field is a concatenation of the option1, option2, and option3 fields. You can only update title indirectly using the option fields.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated_at": {"name": "updated_at", "description": "The date and time when the product variant was last modified. Gets returned in ISO 8601 format.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "weight": {"name": "weight", "description": "The weight of the product variant in the unit system specified with weight_unit.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "weight_unit": {"name": "weight_unit", "description": "The unit of measurement that applies to the product variant's weight. If you don't specify a value for weight_unit, then the shop's default unit of measurement is applied. Valid values: g, kg, oz, and lb.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_shipping_price_set": {"name": "total_shipping_price_set", "description": "The total shipping price set for the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "index": {"name": "index", "description": "The index associated with the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "pre_tax_price": {"name": "pre_tax_price", "description": "The total pre tax price of the order.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`dbt-package-testing`.`shopify`.`product_variant`", "created_at": 1665703195.683691}, "source.shopify_source.shopify.transaction": {"fqn": ["shopify_source", "shopify", "transaction"], "database": "dbt-package-testing", "schema": "shopify", "unique_id": "source.shopify_source.shopify.transaction", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "models/src_shopify.yml", "original_file_path": "models/src_shopify.yml", "name": "transaction", "source_name": "shopify", "source_description": "", "loader": "", "identifier": "transaction", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a transaction in Shopify.", "columns": {"transaction_id": {"name": "transaction_id", "description": "The ID for the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_id": {"name": "order_id", "description": "The ID for the order that the transaction is associated with.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refund_id": {"name": "refund_id", "description": "The ID associated with a refund in the refund table.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "amount": {"name": "amount", "description": "The amount of money included in the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "authorization": {"name": "authorization", "description": "The authorization code associated with the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_timestamp": {"name": "created_timestamp", "description": "The date and time when the transaction was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "processed_timestamp": {"name": "processed_timestamp", "description": "The date and time when a transaction was processed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "device_id": {"name": "device_id", "description": "The ID for the device.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "gateway": {"name": "gateway", "description": "The name of the gateway the transaction was issued through.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "source_name": {"name": "source_name", "description": "The origin of the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "message": {"name": "message", "description": "A string generated by the payment provider with additional information about why the transaction succeeded or failed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "The three-letter code (ISO 4217 format) for the currency used for the payment.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "location_id": {"name": "location_id", "description": "The ID of the physical location where the transaction was processed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "parent_id": {"name": "parent_id", "description": "The ID of an associated transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payment_avs_result_code": {"name": "payment_avs_result_code", "description": "The response code from the address verification system.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payment_credit_card_bin": {"name": "payment_credit_card_bin", "description": "The issuer identification number (IIN), formerly known as bank identification number (BIN) of the customer's credit card.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payment_cvv_result_code": {"name": "payment_cvv_result_code", "description": "The response code from the credit card company indicating whether the customer entered the card security code, or card verification value, correctly.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payment_credit_card_number": {"name": "payment_credit_card_number", "description": "The customer's credit card number, with most of the leading digits redacted.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payment_credit_card_company": {"name": "payment_credit_card_company", "description": "The name of the company that issued the customer's credit card.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "kind": {"name": "kind", "description": "The transaction's type.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "receipt": {"name": "receipt", "description": "A transaction receipt attached to the transaction by the gateway.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency_exchange_id": {"name": "currency_exchange_id", "description": "The ID of the adjustment.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency_exchange_adjustment": {"name": "currency_exchange_adjustment", "description": "The difference between the amounts on the associated transaction and the parent transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency_exchange_original_amount": {"name": "currency_exchange_original_amount", "description": "The amount of the parent transaction in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency_exchange_final_amount": {"name": "currency_exchange_final_amount", "description": "The amount of the associated transaction in the shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency_exchange_currency": {"name": "currency_exchange_currency", "description": "The shop currency.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "error_code": {"name": "error_code", "description": "A standardized error code, independent of the payment provider.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status": {"name": "status", "description": "The status of the transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "test": {"name": "test", "description": "Whether the transaction is a test transaction.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "user_id": {"name": "user_id", "description": "The ID for the user who was logged into the Shopify POS device when the order was processed, if applicable.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`dbt-package-testing`.`shopify`.`transaction`", "created_at": 1665703195.683786}, "source.shopify_source.shopify.refund": {"fqn": ["shopify_source", "shopify", "refund"], "database": "dbt-package-testing", "schema": "shopify", "unique_id": "source.shopify_source.shopify.refund", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "models/src_shopify.yml", "original_file_path": "models/src_shopify.yml", "name": "refund", "source_name": "shopify", "source_description": "", "loader": "", "identifier": "refund", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a refund within Shopify.", "columns": {"id": {"name": "id", "description": "The unique numeric identifier for the refund.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created_at": {"name": "created_at", "description": "Timestamp of the date when the refund was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "processed_at": {"name": "processed_at", "description": "Timestamp of the date when the refund was processed.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "note": {"name": "note", "description": "User generated note attached to the refund.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "restock": {"name": "restock", "description": "Boolean indicating if the refund is a result of a restock.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "user_id": {"name": "user_id", "description": "Reference to the user id which generated the refund.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_duties_set": {"name": "total_duties_set", "description": "Record representing total duties set for the refund.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_id": {"name": "order_id", "description": "Reference to the order which the refund is associated.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`dbt-package-testing`.`shopify`.`refund`", "created_at": 1665703195.6838531}, "source.shopify_source.shopify.order_adjustment": {"fqn": ["shopify_source", "shopify", "order_adjustment"], "database": "dbt-package-testing", "schema": "shopify", "unique_id": "source.shopify_source.shopify.order_adjustment", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "models/src_shopify.yml", "original_file_path": "models/src_shopify.yml", "name": "order_adjustment", "source_name": "shopify", "source_description": "", "loader": "", "identifier": "order_adjustment", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents and adjustment to and order within Shopify.", "columns": {"id": {"name": "id", "description": "The unique numeric identifier for the order adjustment.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "order_id": {"name": "order_id", "description": "Reference to the order which the adjustment is associated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "refund_id": {"name": "refund_id", "description": "Reference to the refund which the adjustment is associated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "amount": {"name": "amount", "description": "Amount of the adjustment.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tax_amount": {"name": "tax_amount", "description": "Tax amount applied to the order adjustment.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "kind": {"name": "kind", "description": "The kind of order adjustment (eg. refund, restock, etc.).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "reason": {"name": "reason", "description": "The reason for the order adjustment.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "amount_set": {"name": "amount_set", "description": "Amount set towards the order adjustment", "meta": {}, "data_type": null, "quote": null, "tags": []}, "tax_amount_set": {"name": "tax_amount_set", "description": "Tax amount set towards the order adjustment.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time when a record was last updated by Fivetran.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`dbt-package-testing`.`shopify`.`order_adjustment`", "created_at": 1665703195.68392}, "source.klaviyo_source.klaviyo.campaign": {"fqn": ["klaviyo_source", "klaviyo", "campaign"], "database": "dbt-package-testing", "schema": "klaviyo", "unique_id": "source.klaviyo_source.klaviyo.campaign", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "models/src_klaviyo.yml", "original_file_path": "models/src_klaviyo.yml", "name": "campaign", "source_name": "klaviyo", "source_description": "", "loader": "fivetran", "identifier": "campaign", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 72, "period": "hour"}, "error_after": {"count": 96, "period": "hour"}, "filter": null}, "external": null, "description": "Table capturing email campaigns in Klaviyo. \n", "columns": {"_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean that is true if the campaign has been soft-deleted.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_type": {"name": "campaign_type", "description": "Type of campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created": {"name": "created", "description": "Timestamp of when the campaign was created, in UTC.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email_template_id": {"name": "email_template_id", "description": "Foreign key referencing the ID of the `email_template` object that will be the content of this campaign. Note the Email Template is copied when creating this campaign, so future changes to that Email Template will not alter the content of this campaign.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "from_email": {"name": "from_email", "description": "The email address your email will be sent from and will be used in the reply-to header.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "from_name": {"name": "from_name", "description": "The name or label associated with the email address you're sending from.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "id": {"name": "id", "description": "Unique ID of the campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_segmented": {"name": "is_segmented", "description": "Boolean that is true if the campaign is directed at a Klaviyo segment (not a list).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "name": {"name": "name", "description": "A name for this campaign. If not specified, this will default to the subject of the campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "send_time": {"name": "send_time", "description": "Timestamp of when the campaign is scheduled to be sent in the future, if [\"smart send time\"](https://help.klaviyo.com/hc/en-us/articles/360029794371-Smart-Send-Time-in-Klaviyo#how-to-utilize-smart-send-time3) is used. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "sent_at": {"name": "sent_at", "description": "Timestamp of when the campaign was first sent out to users.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status": {"name": "status", "description": "Current status of the campaign. Either \"draft\", \"scheduled\", \"sent\", or \"cancelled\".", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status_id": {"name": "status_id", "description": "Corresponding ID to the current status.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status_label": {"name": "status_label", "description": "The label of the status as it appears in the UI (should be the same as `status`).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "subject": {"name": "subject", "description": "The subject line of the campaign's email.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated": {"name": "updated", "description": "Timestamp of when the campaign was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`dbt-package-testing`.`klaviyo`.`campaign`", "created_at": 1665703195.684056}, "source.klaviyo_source.klaviyo.event": {"fqn": ["klaviyo_source", "klaviyo", "event"], "database": "dbt-package-testing", "schema": "klaviyo", "unique_id": "source.klaviyo_source.klaviyo.event", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "models/src_klaviyo.yml", "original_file_path": "models/src_klaviyo.yml", "name": "event", "source_name": "klaviyo", "source_description": "", "loader": "fivetran", "identifier": "event", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 72, "period": "hour"}, "error_after": {"count": 96, "period": "hour"}, "filter": null}, "external": null, "description": "Table of events (and metrics) triggered in Klaviyo or via its integrations. Custom columns can be passed through to downstream models via the `klaviyo__event_pass_through_columns` variable (see README for details).\n", "columns": {"_variation": {"name": "_variation", "description": "Unique ID of the attributed flow or campaign variation group. This does not map onto another table. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Foreign key referencing the CAMPAIGN that the event is attributed to.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "datetime": {"name": "datetime", "description": "Timestamp of when the event was recorded in Klaviyo. Should be the same/nominally off from `timestamp`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "timestamp": {"name": "timestamp", "description": "Timestamp of when the event was triggered. Should be the same/nominally off from `datetime`.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_id": {"name": "flow_id", "description": "Foreign key referencing the FLOW that the event is attributed to.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "flow_message_id": {"name": "flow_message_id", "description": "Unique ID of the FLOW_MESSAGE that the event is attributed to. This does not map onto another table.\n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "id": {"name": "id", "description": "Unique ID of the event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "metric_id": {"name": "metric_id", "description": "Foreign key referencing the metric being captured.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "person_id": {"name": "person_id", "description": "Foreign key referencing the PERSON who triggered the event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "type": {"name": "type", "description": "Type of event that was triggered. This is the same as the METRIC name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "uuid": {"name": "uuid", "description": "Universally Unique Identifier of the event.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "property_value": {"name": "property_value", "description": "Numeric value associated with the event (ie the dollars associated with a purchase).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean that is true if the campaign has been soft-deleted.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`dbt-package-testing`.`klaviyo`.`event`", "created_at": 1665703195.684135}, "source.klaviyo_source.klaviyo.flow": {"fqn": ["klaviyo_source", "klaviyo", "flow"], "database": "dbt-package-testing", "schema": "klaviyo", "unique_id": "source.klaviyo_source.klaviyo.flow", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "models/src_klaviyo.yml", "original_file_path": "models/src_klaviyo.yml", "name": "flow", "source_name": "klaviyo", "source_description": "", "loader": "fivetran", "identifier": "flow", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 72, "period": "hour"}, "error_after": {"count": 96, "period": "hour"}, "filter": null}, "external": null, "description": "Table of automated, triggered flow sequences in Klaviyo.", "columns": {"created": {"name": "created", "description": "Timestamp of when the flow was first created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "id": {"name": "id", "description": "Unique ID of the flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "name": {"name": "name", "description": "Name of the flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status": {"name": "status", "description": "Current status of the flow. Either 'manual', 'live', or 'draft'. Read more [here](https://help.klaviyo.com/hc/en-us/articles/115002774932-Getting-Started-with-Flows#the-flow-action-status9).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "trigger": {"name": "trigger", "description": "JSON of metric, segment, list, and/or date-property filters that will trigger this flow. These are applied to the **event level**.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated": {"name": "updated", "description": "Timestamp of when the flow was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "customer_filter": {"name": "customer_filter", "description": "JSON of flow filters placed on the **person level** that will trigger this flow.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean that is true if the campaign has been soft-deleted.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`dbt-package-testing`.`klaviyo`.`flow`", "created_at": 1665703195.684204}, "source.klaviyo_source.klaviyo.integration": {"fqn": ["klaviyo_source", "klaviyo", "integration"], "database": "dbt-package-testing", "schema": "klaviyo", "unique_id": "source.klaviyo_source.klaviyo.integration", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "models/src_klaviyo.yml", "original_file_path": "models/src_klaviyo.yml", "name": "integration", "source_name": "klaviyo", "source_description": "", "loader": "fivetran", "identifier": "integration", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 72, "period": "hour"}, "error_after": {"count": 96, "period": "hour"}, "filter": null}, "external": null, "description": "Table storing third-party platforms integrated into Klaviyo.", "columns": {"category": {"name": "category", "description": "Use-case category of the integrated platform.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "id": {"name": "id", "description": "Unique ID of the integration.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "name": {"name": "name", "description": "Name of the integrated platform.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean that is true if the campaign has been soft-deleted.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`dbt-package-testing`.`klaviyo`.`integration`", "created_at": 1665703195.684267}, "source.klaviyo_source.klaviyo.person": {"fqn": ["klaviyo_source", "klaviyo", "person"], "database": "dbt-package-testing", "schema": "klaviyo", "unique_id": "source.klaviyo_source.klaviyo.person", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "models/src_klaviyo.yml", "original_file_path": "models/src_klaviyo.yml", "name": "person", "source_name": "klaviyo", "source_description": "", "loader": "fivetran", "identifier": "person", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 72, "period": "hour"}, "error_after": {"count": 96, "period": "hour"}, "filter": null}, "external": null, "description": "Table storing the profiles of all people/users interacted with. Custom columns can be passed through to downstream models via the `klaviyo__person_pass_through_columns` variable (see README for details).\n", "columns": {"id": {"name": "id", "description": "Unique ID of the user if you use your own unique identifier. Otherwise, Klaviyo recommends using the email as the primary key. \n", "meta": {}, "data_type": null, "quote": null, "tags": []}, "address_1": {"name": "address_1", "description": "First line of the person's address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "address_2": {"name": "address_2", "description": "Second line of the person's address.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "city": {"name": "city", "description": "City they live in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "country": {"name": "country", "description": "Country they live in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "zip": {"name": "zip", "description": "Postal code where they live.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "created": {"name": "created", "description": "Timestamp of when the person's profile was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "email": {"name": "email", "description": "The email address and the unique identifier for a profile.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "first_name": {"name": "first_name", "description": "Person's first name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "last_name": {"name": "last_name", "description": "Person's surname.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "latitude": {"name": "latitude", "description": "Latitude of the person's location.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "longitude": {"name": "longitude", "description": "Longitude of the person's location.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization": {"name": "organization", "description": "Business organization they belong to.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "phone_number": {"name": "phone_number", "description": "Associated phone number.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "region": {"name": "region", "description": "Region or state they live in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "timezone": {"name": "timezone", "description": "Timezone they are situated in.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "title": {"name": "title", "description": "Title at their business or organization.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated": {"name": "updated", "description": "Timestamp of when the person profile was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean that is true if the campaign has been soft-deleted.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`dbt-package-testing`.`klaviyo`.`person`", "created_at": 1665703195.6843479}, "source.klaviyo_source.klaviyo.metric": {"fqn": ["klaviyo_source", "klaviyo", "metric"], "database": "dbt-package-testing", "schema": "klaviyo", "unique_id": "source.klaviyo_source.klaviyo.metric", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "models/src_klaviyo.yml", "original_file_path": "models/src_klaviyo.yml", "name": "metric", "source_name": "klaviyo", "source_description": "", "loader": "fivetran", "identifier": "metric", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 72, "period": "hour"}, "error_after": {"count": 96, "period": "hour"}, "filter": null}, "external": null, "description": "Table of tracked metrics across integrations in Klaviyo.", "columns": {"created": {"name": "created", "description": "Timestamp of when the metric was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "id": {"name": "id", "description": "Unique ID of the metric being tracked.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "integration_id": {"name": "integration_id", "description": "Foreign key referencing the INTEGRATION that the metric is being pulled from.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "name": {"name": "name", "description": "Name of the metric (same as `EVENT.type`)", "meta": {}, "data_type": null, "quote": null, "tags": []}, "updated": {"name": "updated", "description": "Timestamp of when the metric was last updated.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean that is true if the campaign has been soft-deleted.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "`dbt-package-testing`.`klaviyo`.`metric`", "created_at": 1665703195.684414}}, "macros": {"macro.dbt_bigquery.date_sharded_table": {"unique_id": "macro.dbt_bigquery.date_sharded_table", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665703194.1827369}, "macro.dbt_bigquery.grant_access_to": {"unique_id": "macro.dbt_bigquery.grant_access_to", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665703194.182975}, "macro.dbt_bigquery.get_partitions_metadata": {"unique_id": "macro.dbt_bigquery.get_partitions_metadata", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665703194.183273}, "macro.dbt_bigquery.bigquery__get_catalog": {"unique_id": "macro.dbt_bigquery.bigquery__get_catalog", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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_utils.replace", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.18668}, "macro.dbt_bigquery.partition_by": {"unique_id": "macro.dbt_bigquery.partition_by", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665703194.1918871}, "macro.dbt_bigquery.cluster_by": {"unique_id": "macro.dbt_bigquery.cluster_by", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665703194.1922581}, "macro.dbt_bigquery.bigquery_options": {"unique_id": "macro.dbt_bigquery.bigquery_options", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665703194.192609}, "macro.dbt_bigquery.bigquery_table_options": {"unique_id": "macro.dbt_bigquery.bigquery_table_options", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665703194.192864}, "macro.dbt_bigquery.bigquery__create_table_as": {"unique_id": "macro.dbt_bigquery.bigquery__create_table_as", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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, 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 {{ sql }}\n );\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"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.193482}, "macro.dbt_bigquery.bigquery_view_options": {"unique_id": "macro.dbt_bigquery.bigquery_view_options", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665703194.193713}, "macro.dbt_bigquery.bigquery__create_view_as": {"unique_id": "macro.dbt_bigquery.bigquery__create_view_as", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665703194.1940212}, "macro.dbt_bigquery.bigquery__create_schema": {"unique_id": "macro.dbt_bigquery.bigquery__create_schema", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery__create_schema", "macro_sql": "{% macro bigquery__create_schema(relation) -%}\n {{ adapter.create_schema(relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.194147}, "macro.dbt_bigquery.bigquery__drop_schema": {"unique_id": "macro.dbt_bigquery.bigquery__drop_schema", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665703194.194269}, "macro.dbt_bigquery.bigquery__drop_relation": {"unique_id": "macro.dbt_bigquery.bigquery__drop_relation", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665703194.194465}, "macro.dbt_bigquery.bigquery__get_columns_in_relation": {"unique_id": "macro.dbt_bigquery.bigquery__get_columns_in_relation", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665703194.194609}, "macro.dbt_bigquery.bigquery__list_relations_without_caching": {"unique_id": "macro.dbt_bigquery.bigquery__list_relations_without_caching", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665703194.194747}, "macro.dbt_bigquery.bigquery__current_timestamp": {"unique_id": "macro.dbt_bigquery.bigquery__current_timestamp", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.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": 1665703194.194825}, "macro.dbt_bigquery.bigquery__snapshot_string_as_time": {"unique_id": "macro.dbt_bigquery.bigquery__snapshot_string_as_time", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.195012}, "macro.dbt_bigquery.bigquery__list_schemas": {"unique_id": "macro.dbt_bigquery.bigquery__list_schemas", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665703194.1952481}, "macro.dbt_bigquery.bigquery__check_schema_exists": {"unique_id": "macro.dbt_bigquery.bigquery__check_schema_exists", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665703194.195425}, "macro.dbt_bigquery.bigquery__persist_docs": {"unique_id": "macro.dbt_bigquery.bigquery__persist_docs", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665703194.195704}, "macro.dbt_bigquery.bigquery__alter_column_comment": {"unique_id": "macro.dbt_bigquery.bigquery__alter_column_comment", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665703194.195859}, "macro.dbt_bigquery.bigquery__rename_relation": {"unique_id": "macro.dbt_bigquery.bigquery__rename_relation", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665703194.196009}, "macro.dbt_bigquery.bigquery__alter_relation_add_columns": {"unique_id": "macro.dbt_bigquery.bigquery__alter_relation_add_columns", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665703194.196397}, "macro.dbt_bigquery.bigquery__alter_relation_drop_columns": {"unique_id": "macro.dbt_bigquery.bigquery__alter_relation_drop_columns", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665703194.196766}, "macro.dbt_bigquery.bigquery__alter_column_type": {"unique_id": "macro.dbt_bigquery.bigquery__alter_column_type", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665703194.197412}, "macro.dbt_bigquery.bigquery__test_unique": {"unique_id": "macro.dbt_bigquery.bigquery__test_unique", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665703194.197574}, "macro.dbt_bigquery.bigquery__upload_file": {"unique_id": "macro.dbt_bigquery.bigquery__upload_file", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665703194.197848}, "macro.dbt_bigquery.bigquery__create_csv_table": {"unique_id": "macro.dbt_bigquery.bigquery__create_csv_table", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665703194.1982179}, "macro.dbt_bigquery.bigquery__reset_csv_table": {"unique_id": "macro.dbt_bigquery.bigquery__reset_csv_table", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665703194.19837}, "macro.dbt_bigquery.bigquery__load_csv_rows": {"unique_id": "macro.dbt_bigquery.bigquery__load_csv_rows", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665703194.198967}, "macro.dbt_bigquery.bigquery__handle_existing_table": {"unique_id": "macro.dbt_bigquery.bigquery__handle_existing_table", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665703194.1995578}, "macro.dbt_bigquery.materialization_view_bigquery": {"unique_id": "macro.dbt_bigquery.materialization_view_bigquery", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665703194.200207}, "macro.dbt_bigquery.materialization_table_bigquery": {"unique_id": "macro.dbt_bigquery.materialization_table_bigquery", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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' -%}\n\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 {% call statement('main') -%}\n {{ create_table_as(False, target_relation, sql) }}\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}, "patch_path": null, "arguments": [], "created_at": 1665703194.202324}, "macro.dbt_bigquery.materialization_copy_bigquery": {"unique_id": "macro.dbt_bigquery.materialization_copy_bigquery", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665703194.203553}, "macro.dbt_bigquery.declare_dbt_max_partition": {"unique_id": "macro.dbt_bigquery.declare_dbt_max_partition", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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, sql) %}\n\n {% if '_dbt_max_partition' in 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}, "patch_path": null, "arguments": [], "created_at": 1665703194.2054179}, "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": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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\", default=\"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}, "patch_path": null, "arguments": [], "created_at": 1665703194.205856}, "macro.dbt_bigquery.bq_insert_overwrite": {"unique_id": "macro.dbt_bigquery.bq_insert_overwrite", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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 {{ 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, sql) }}\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 {#\n TODO: include_sql_header is a hack; consider a better approach that includes\n the sql_header at the materialization-level instead\n #}\n -- 3. run the merge statement\n {{ get_insert_overwrite_merge_sql(target_relation, source_sql, dest_columns, [predicate], include_sql_header=false) }};\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}, "patch_path": null, "arguments": [], "created_at": 1665703194.207083}, "macro.dbt_bigquery.bq_generate_incremental_build_sql": {"unique_id": "macro.dbt_bigquery.bq_generate_incremental_build_sql", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665703194.2079282}, "macro.dbt_bigquery.materialization_incremental_bigquery": {"unique_id": "macro.dbt_bigquery.materialization_incremental_bigquery", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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' -%}\n\n {%- set unique_key = config.get('unique_key') -%}\n {%- set full_refresh_mode = (should_full_refresh()) -%}\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 {% set build_sql = create_table_as(False, target_relation, sql) %}\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 {% set build_sql = create_table_as(False, target_relation, sql) %}\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 {% set build_sql = create_table_as(False, target_relation, sql) %}\n\n {% else %}\n {% set tmp_relation_exists = false %}\n {% if on_schema_change != 'ignore' %} {# Check first, since otherwise we may not build a temp table #}\n {% do run_query(\n declare_dbt_max_partition(this, partition_by, sql) + create_table_as(True, tmp_relation, sql)\n ) %}\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 {% 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, sql, unique_key, partition_by, partitions, dest_columns, tmp_relation_exists\n ) %}\n\n {% endif %}\n\n {%- call statement('main') -%}\n {{ build_sql }}\n {% endcall %}\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.create_table_as", "macro.dbt.run_query", "macro.dbt_bigquery.declare_dbt_max_partition", "macro.dbt.process_schema_changes", "macro.dbt_bigquery.bq_generate_incremental_build_sql", "macro.dbt.statement", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.2107031}, "macro.dbt_bigquery.bigquery__snapshot_hash_arguments": {"unique_id": "macro.dbt_bigquery.bigquery__snapshot_hash_arguments", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665703194.211148}, "macro.dbt_bigquery.bigquery__create_columns": {"unique_id": "macro.dbt_bigquery.bigquery__create_columns", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665703194.2113018}, "macro.dbt_bigquery.bigquery__post_snapshot": {"unique_id": "macro.dbt_bigquery.bigquery__post_snapshot", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665703194.2114298}, "macro.dbt_bigquery.bigquery__except": {"unique_id": "macro.dbt_bigquery.bigquery__except", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665703194.211589}, "macro.dbt_bigquery.bigquery__dateadd": {"unique_id": "macro.dbt_bigquery.bigquery__dateadd", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665703194.211863}, "macro.dbt_bigquery.bigquery__intersect": {"unique_id": "macro.dbt_bigquery.bigquery__intersect", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665703194.212018}, "macro.dbt_bigquery.bigquery__escape_single_quotes": {"unique_id": "macro.dbt_bigquery.bigquery__escape_single_quotes", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665703194.2122638}, "macro.dbt_bigquery.bigquery__right": {"unique_id": "macro.dbt_bigquery.bigquery__right", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665703194.212542}, "macro.dbt_bigquery.bigquery__listagg": {"unique_id": "macro.dbt_bigquery.bigquery__listagg", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665703194.212967}, "macro.dbt_bigquery.bigquery__datediff": {"unique_id": "macro.dbt_bigquery.bigquery__datediff", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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_utils.datediff"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.213501}, "macro.dbt_bigquery.bigquery__safe_cast": {"unique_id": "macro.dbt_bigquery.bigquery__safe_cast", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665703194.213723}, "macro.dbt_bigquery.bigquery__hash": {"unique_id": "macro.dbt_bigquery.bigquery__hash", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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_utils.default__hash"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.213946}, "macro.dbt_bigquery.bigquery__position": {"unique_id": "macro.dbt_bigquery.bigquery__position", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665703194.2141771}, "macro.dbt_bigquery.bigquery__bool_or": {"unique_id": "macro.dbt_bigquery.bigquery__bool_or", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665703194.214359}, "macro.dbt_bigquery.bigquery__split_part": {"unique_id": "macro.dbt_bigquery.bigquery__split_part", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665703194.21496}, "macro.dbt_bigquery.bigquery__date_trunc": {"unique_id": "macro.dbt_bigquery.bigquery__date_trunc", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665703194.2151968}, "macro.dbt_bigquery.bigquery__get_show_grant_sql": {"unique_id": "macro.dbt_bigquery.bigquery__get_show_grant_sql", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665703194.215884}, "macro.dbt_bigquery.bigquery__get_grant_sql": {"unique_id": "macro.dbt_bigquery.bigquery__get_grant_sql", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665703194.216206}, "macro.dbt_bigquery.bigquery__get_revoke_sql": {"unique_id": "macro.dbt_bigquery.bigquery__get_revoke_sql", "package_name": "dbt_bigquery", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/libexec/lib/python3.9/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}, "patch_path": null, "arguments": [], "created_at": 1665703194.2164512}, "macro.dbt.run_hooks": {"unique_id": "macro.dbt.run_hooks", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.217677}, "macro.dbt.make_hook_config": {"unique_id": "macro.dbt.make_hook_config", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.2179}, "macro.dbt.before_begin": {"unique_id": "macro.dbt.before_begin", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.21805}, "macro.dbt.in_transaction": {"unique_id": "macro.dbt.in_transaction", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.2181911}, "macro.dbt.after_commit": {"unique_id": "macro.dbt.after_commit", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.218328}, "macro.dbt.set_sql_header": {"unique_id": "macro.dbt.set_sql_header", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.218783}, "macro.dbt.should_full_refresh": {"unique_id": "macro.dbt.should_full_refresh", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.219079}, "macro.dbt.should_store_failures": {"unique_id": "macro.dbt.should_store_failures", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.2193768}, "macro.dbt.snapshot_merge_sql": {"unique_id": "macro.dbt.snapshot_merge_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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.default__snapshot_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.21985}, "macro.dbt.default__snapshot_merge_sql": {"unique_id": "macro.dbt.default__snapshot_merge_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.2201211}, "macro.dbt.strategy_dispatch": {"unique_id": "macro.dbt.strategy_dispatch", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.223378}, "macro.dbt.snapshot_hash_arguments": {"unique_id": "macro.dbt.snapshot_hash_arguments", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__snapshot_hash_arguments"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.2235441}, "macro.dbt.default__snapshot_hash_arguments": {"unique_id": "macro.dbt.default__snapshot_hash_arguments", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.223754}, "macro.dbt.snapshot_get_time": {"unique_id": "macro.dbt.snapshot_get_time", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_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.default__snapshot_get_time"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.223896}, "macro.dbt.default__snapshot_get_time": {"unique_id": "macro.dbt.default__snapshot_get_time", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_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": 1665703194.2239912}, "macro.dbt.snapshot_timestamp_strategy": {"unique_id": "macro.dbt.snapshot_timestamp_strategy", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.224758}, "macro.dbt.snapshot_string_as_time": {"unique_id": "macro.dbt.snapshot_string_as_time", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__snapshot_string_as_time"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.224919}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.2250829}, "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-bigquery/1.2.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_sql']) -%}\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_sql'] }}) 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}, "patch_path": null, "arguments": [], "created_at": 1665703194.2264378}, "macro.dbt.snapshot_check_strategy": {"unique_id": "macro.dbt.snapshot_check_strategy", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.227711}, "macro.dbt.create_columns": {"unique_id": "macro.dbt.create_columns", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__create_columns"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.2312908}, "macro.dbt.default__create_columns": {"unique_id": "macro.dbt.default__create_columns", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.2315679}, "macro.dbt.post_snapshot": {"unique_id": "macro.dbt.post_snapshot", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__post_snapshot"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.231733}, "macro.dbt.default__post_snapshot": {"unique_id": "macro.dbt.default__post_snapshot", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.23182}, "macro.dbt.get_true_sql": {"unique_id": "macro.dbt.get_true_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.231961}, "macro.dbt.default__get_true_sql": {"unique_id": "macro.dbt.default__get_true_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.232078}, "macro.dbt.snapshot_staging_table": {"unique_id": "macro.dbt.snapshot_staging_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.232276}, "macro.dbt.default__snapshot_staging_table": {"unique_id": "macro.dbt.default__snapshot_staging_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.2331169}, "macro.dbt.build_snapshot_table": {"unique_id": "macro.dbt.build_snapshot_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.233301}, "macro.dbt.default__build_snapshot_table": {"unique_id": "macro.dbt.default__build_snapshot_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.233545}, "macro.dbt.build_snapshot_staging_table": {"unique_id": "macro.dbt.build_snapshot_staging_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.233968}, "macro.dbt.materialization_snapshot_default": {"unique_id": "macro.dbt.materialization_snapshot_default", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_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 {% 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}, "patch_path": null, "arguments": [], "created_at": 1665703194.2397099}, "macro.dbt.materialization_test_default": {"unique_id": "macro.dbt.materialization_test_default", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.241743}, "macro.dbt.get_test_sql": {"unique_id": "macro.dbt.get_test_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.242235}, "macro.dbt.default__get_test_sql": {"unique_id": "macro.dbt.default__get_test_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.2425358}, "macro.dbt.get_where_subquery": {"unique_id": "macro.dbt.get_where_subquery", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.2429461}, "macro.dbt.default__get_where_subquery": {"unique_id": "macro.dbt.default__get_where_subquery", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.2433212}, "macro.dbt.get_quoted_csv": {"unique_id": "macro.dbt.get_quoted_csv", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.244137}, "macro.dbt.diff_columns": {"unique_id": "macro.dbt.diff_columns", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.244673}, "macro.dbt.diff_column_data_types": {"unique_id": "macro.dbt.diff_column_data_types", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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 %}\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": 1665703194.245274}, "macro.dbt.get_merge_sql": {"unique_id": "macro.dbt.get_merge_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.250026}, "macro.dbt.default__get_merge_sql": {"unique_id": "macro.dbt.default__get_merge_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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 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 {% 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"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.251492}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.251792}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.252522}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.25278}, "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-bigquery/1.2.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 {%- 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": 1665703194.253391}, "macro.dbt.is_incremental": {"unique_id": "macro.dbt.is_incremental", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.254069}, "macro.dbt.materialization_incremental_default": {"unique_id": "macro.dbt.materialization_incremental_default", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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 {% set build_sql = get_delete_insert_merge_sql(target_relation, temp_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 {% 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.get_delete_insert_merge_sql", "macro.dbt.statement", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs", "macro.dbt.create_indexes"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.2583601}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.262663}, "macro.dbt.check_for_schema_changes": {"unique_id": "macro.dbt.check_for_schema_changes", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.2638562}, "macro.dbt.sync_column_schemas": {"unique_id": "macro.dbt.sync_column_schemas", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.26502}, "macro.dbt.process_schema_changes": {"unique_id": "macro.dbt.process_schema_changes", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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 {% 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": 1665703194.265729}, "macro.dbt.materialization_table_default": {"unique_id": "macro.dbt.materialization_table_default", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.2682052}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.268669}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.2688482}, "macro.dbt.create_table_as": {"unique_id": "macro.dbt.create_table_as", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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, sql) -%}\n {{ adapter.dispatch('create_table_as', 'dbt')(temporary, relation, sql) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__create_table_as"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.2690492}, "macro.dbt.default__create_table_as": {"unique_id": "macro.dbt.default__create_table_as", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.269456}, "macro.dbt.materialization_view_default": {"unique_id": "macro.dbt.materialization_view_default", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.2719328}, "macro.dbt.handle_existing_table": {"unique_id": "macro.dbt.handle_existing_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__handle_existing_table"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.2722828}, "macro.dbt.default__handle_existing_table": {"unique_id": "macro.dbt.default__handle_existing_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.272504}, "macro.dbt.create_or_replace_view": {"unique_id": "macro.dbt.create_or_replace_view", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.2739992}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.274397}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.274559}, "macro.dbt.create_view_as": {"unique_id": "macro.dbt.create_view_as", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__create_view_as"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.274741}, "macro.dbt.default__create_view_as": {"unique_id": "macro.dbt.default__create_view_as", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.274997}, "macro.dbt.materialization_seed_default": {"unique_id": "macro.dbt.materialization_seed_default", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.278173}, "macro.dbt.create_csv_table": {"unique_id": "macro.dbt.create_csv_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__create_csv_table"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.2825458}, "macro.dbt.default__create_csv_table": {"unique_id": "macro.dbt.default__create_csv_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.283432}, "macro.dbt.reset_csv_table": {"unique_id": "macro.dbt.reset_csv_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__reset_csv_table"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.28366}, "macro.dbt.default__reset_csv_table": {"unique_id": "macro.dbt.default__reset_csv_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.2841332}, "macro.dbt.get_csv_sql": {"unique_id": "macro.dbt.get_csv_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.284322}, "macro.dbt.default__get_csv_sql": {"unique_id": "macro.dbt.default__get_csv_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.284449}, "macro.dbt.get_binding_char": {"unique_id": "macro.dbt.get_binding_char", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.2845829}, "macro.dbt.default__get_binding_char": {"unique_id": "macro.dbt.default__get_binding_char", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.2846909}, "macro.dbt.get_batch_size": {"unique_id": "macro.dbt.get_batch_size", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.284845}, "macro.dbt.default__get_batch_size": {"unique_id": "macro.dbt.default__get_batch_size", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.2849548}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.285429}, "macro.dbt.load_csv_rows": {"unique_id": "macro.dbt.load_csv_rows", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__load_csv_rows"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.285608}, "macro.dbt.default__load_csv_rows": {"unique_id": "macro.dbt.default__load_csv_rows", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.286857}, "macro.dbt.generate_alias_name": {"unique_id": "macro.dbt.generate_alias_name", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.287293}, "macro.dbt.default__generate_alias_name": {"unique_id": "macro.dbt.default__generate_alias_name", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.2875168}, "macro.dbt.generate_schema_name": {"unique_id": "macro.dbt.generate_schema_name", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.288065}, "macro.dbt.default__generate_schema_name": {"unique_id": "macro.dbt.default__generate_schema_name", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.2883189}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.288595}, "macro.dbt.generate_database_name": {"unique_id": "macro.dbt.generate_database_name", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.289032}, "macro.dbt.default__generate_database_name": {"unique_id": "macro.dbt.default__generate_database_name", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.28928}, "macro.dbt.default__test_relationships": {"unique_id": "macro.dbt.default__test_relationships", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.289679}, "macro.dbt.default__test_not_null": {"unique_id": "macro.dbt.default__test_not_null", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.2900312}, "macro.dbt.default__test_unique": {"unique_id": "macro.dbt.default__test_unique", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.290324}, "macro.dbt.default__test_accepted_values": {"unique_id": "macro.dbt.default__test_accepted_values", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.2909179}, "macro.dbt.statement": {"unique_id": "macro.dbt.statement", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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": "{% 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": 1665703194.292018}, "macro.dbt.noop_statement": {"unique_id": "macro.dbt.noop_statement", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.292586}, "macro.dbt.run_query": {"unique_id": "macro.dbt.run_query", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.292874}, "macro.dbt.convert_datetime": {"unique_id": "macro.dbt.convert_datetime", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.294558}, "macro.dbt.dates_in_range": {"unique_id": "macro.dbt.dates_in_range", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.295786}, "macro.dbt.partition_range": {"unique_id": "macro.dbt.partition_range", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.296523}, "macro.dbt.py_current_timestring": {"unique_id": "macro.dbt.py_current_timestring", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.2967548}, "macro.dbt.except": {"unique_id": "macro.dbt.except", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.bigquery__except"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.2970428}, "macro.dbt.default__except": {"unique_id": "macro.dbt.default__except", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.2971148}, "macro.dbt.replace": {"unique_id": "macro.dbt.replace", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.default__replace"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.297484}, "macro.dbt.default__replace": {"unique_id": "macro.dbt.default__replace", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.297642}, "macro.dbt.concat": {"unique_id": "macro.dbt.concat", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.default__concat"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.297935}, "macro.dbt.default__concat": {"unique_id": "macro.dbt.default__concat", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.2980568}, "macro.dbt.length": {"unique_id": "macro.dbt.length", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.default__length"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.298351}, "macro.dbt.default__length": {"unique_id": "macro.dbt.default__length", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.298453}, "macro.dbt.dateadd": {"unique_id": "macro.dbt.dateadd", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.bigquery__dateadd"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.298832}, "macro.dbt.default__dateadd": {"unique_id": "macro.dbt.default__dateadd", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.298995}, "macro.dbt.intersect": {"unique_id": "macro.dbt.intersect", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.bigquery__intersect"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.299267}, "macro.dbt.default__intersect": {"unique_id": "macro.dbt.default__intersect", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.299341}, "macro.dbt.escape_single_quotes": {"unique_id": "macro.dbt.escape_single_quotes", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.bigquery__escape_single_quotes"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.299649}, "macro.dbt.default__escape_single_quotes": {"unique_id": "macro.dbt.default__escape_single_quotes", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.299786}, "macro.dbt.right": {"unique_id": "macro.dbt.right", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.bigquery__right"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.300123}, "macro.dbt.default__right": {"unique_id": "macro.dbt.default__right", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.3002582}, "macro.dbt.listagg": {"unique_id": "macro.dbt.listagg", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.bigquery__listagg"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.300898}, "macro.dbt.default__listagg": {"unique_id": "macro.dbt.default__listagg", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.301354}, "macro.dbt.datediff": {"unique_id": "macro.dbt.datediff", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.bigquery__datediff"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.301731}, "macro.dbt.default__datediff": {"unique_id": "macro.dbt.default__datediff", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.301887}, "macro.dbt.safe_cast": {"unique_id": "macro.dbt.safe_cast", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.bigquery__safe_cast"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.302224}, "macro.dbt.default__safe_cast": {"unique_id": "macro.dbt.default__safe_cast", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.302357}, "macro.dbt.hash": {"unique_id": "macro.dbt.hash", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.bigquery__hash"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.302658}, "macro.dbt.default__hash": {"unique_id": "macro.dbt.default__hash", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.302817}, "macro.dbt.cast_bool_to_text": {"unique_id": "macro.dbt.cast_bool_to_text", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.default__cast_bool_to_text"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.303108}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.303263}, "macro.dbt.any_value": {"unique_id": "macro.dbt.any_value", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.default__any_value"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.3035562}, "macro.dbt.default__any_value": {"unique_id": "macro.dbt.default__any_value", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.303659}, "macro.dbt.position": {"unique_id": "macro.dbt.position", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.bigquery__position"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.3039901}, "macro.dbt.default__position": {"unique_id": "macro.dbt.default__position", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.3041248}, "macro.dbt.string_literal": {"unique_id": "macro.dbt.string_literal", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.default__string_literal"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.3044171}, "macro.dbt.default__string_literal": {"unique_id": "macro.dbt.default__string_literal", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.304516}, "macro.dbt.type_string": {"unique_id": "macro.dbt.type_string", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.default__type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.3053708}, "macro.dbt.default__type_string": {"unique_id": "macro.dbt.default__type_string", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.305519}, "macro.dbt.type_timestamp": {"unique_id": "macro.dbt.type_timestamp", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.default__type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.305679}, "macro.dbt.default__type_timestamp": {"unique_id": "macro.dbt.default__type_timestamp", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.30583}, "macro.dbt.type_float": {"unique_id": "macro.dbt.type_float", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.default__type_float"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.3061771}, "macro.dbt.default__type_float": {"unique_id": "macro.dbt.default__type_float", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.306327}, "macro.dbt.type_numeric": {"unique_id": "macro.dbt.type_numeric", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.default__type_numeric"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.306485}, "macro.dbt.default__type_numeric": {"unique_id": "macro.dbt.default__type_numeric", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.306657}, "macro.dbt.type_bigint": {"unique_id": "macro.dbt.type_bigint", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.default__type_bigint"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.306814}, "macro.dbt.default__type_bigint": {"unique_id": "macro.dbt.default__type_bigint", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.3069608}, "macro.dbt.type_int": {"unique_id": "macro.dbt.type_int", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.default__type_int"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.3071191}, "macro.dbt.default__type_int": {"unique_id": "macro.dbt.default__type_int", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.307261}, "macro.dbt.bool_or": {"unique_id": "macro.dbt.bool_or", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.bigquery__bool_or"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.30756}, "macro.dbt.default__bool_or": {"unique_id": "macro.dbt.default__bool_or", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.30766}, "macro.dbt.last_day": {"unique_id": "macro.dbt.last_day", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.default__last_day"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.308036}, "macro.dbt.default_last_day": {"unique_id": "macro.dbt.default_last_day", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.dateadd", "macro.dbt_utils.date_trunc"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.3082979}, "macro.dbt.default__last_day": {"unique_id": "macro.dbt.default__last_day", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.default_last_day"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.308437}, "macro.dbt.split_part": {"unique_id": "macro.dbt.split_part", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.bigquery__split_part"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.308983}, "macro.dbt.default__split_part": {"unique_id": "macro.dbt.default__split_part", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.3091462}, "macro.dbt._split_part_negative": {"unique_id": "macro.dbt._split_part_negative", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.309364}, "macro.dbt.date_trunc": {"unique_id": "macro.dbt.date_trunc", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.bigquery__date_trunc"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.309685}, "macro.dbt.default__date_trunc": {"unique_id": "macro.dbt.default__date_trunc", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.30981}, "macro.dbt.create_schema": {"unique_id": "macro.dbt.create_schema", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__create_schema"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.3102138}, "macro.dbt.default__create_schema": {"unique_id": "macro.dbt.default__create_schema", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.3103921}, "macro.dbt.drop_schema": {"unique_id": "macro.dbt.drop_schema", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__drop_schema"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.310553}, "macro.dbt.default__drop_schema": {"unique_id": "macro.dbt.default__drop_schema", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.310804}, "macro.dbt.get_create_index_sql": {"unique_id": "macro.dbt.get_create_index_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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.default__get_create_index_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.31128}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.311411}, "macro.dbt.create_indexes": {"unique_id": "macro.dbt.create_indexes", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.3115652}, "macro.dbt.default__create_indexes": {"unique_id": "macro.dbt.default__create_indexes", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.311954}, "macro.dbt.make_intermediate_relation": {"unique_id": "macro.dbt.make_intermediate_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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.default__make_intermediate_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.3149598}, "macro.dbt.default__make_intermediate_relation": {"unique_id": "macro.dbt.default__make_intermediate_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.315142}, "macro.dbt.make_temp_relation": {"unique_id": "macro.dbt.make_temp_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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.default__make_temp_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.3153658}, "macro.dbt.default__make_temp_relation": {"unique_id": "macro.dbt.default__make_temp_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.315653}, "macro.dbt.make_backup_relation": {"unique_id": "macro.dbt.make_backup_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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.default__make_backup_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.315897}, "macro.dbt.default__make_backup_relation": {"unique_id": "macro.dbt.default__make_backup_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.316216}, "macro.dbt.drop_relation": {"unique_id": "macro.dbt.drop_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__drop_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.3164}, "macro.dbt.default__drop_relation": {"unique_id": "macro.dbt.default__drop_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.3166149}, "macro.dbt.truncate_relation": {"unique_id": "macro.dbt.truncate_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.3167958}, "macro.dbt.default__truncate_relation": {"unique_id": "macro.dbt.default__truncate_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.3169532}, "macro.dbt.rename_relation": {"unique_id": "macro.dbt.rename_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__rename_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.317153}, "macro.dbt.default__rename_relation": {"unique_id": "macro.dbt.default__rename_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.317431}, "macro.dbt.get_or_create_relation": {"unique_id": "macro.dbt.get_or_create_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.317676}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.318291}, "macro.dbt.load_cached_relation": {"unique_id": "macro.dbt.load_cached_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.318523}, "macro.dbt.load_relation": {"unique_id": "macro.dbt.load_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.318665}, "macro.dbt.drop_relation_if_exists": {"unique_id": "macro.dbt.drop_relation_if_exists", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.3188531}, "macro.dbt.current_timestamp": {"unique_id": "macro.dbt.current_timestamp", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.0/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_utils.bigquery__current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.319384}, "macro.dbt.default__current_timestamp": {"unique_id": "macro.dbt.default__current_timestamp", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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__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": 1665703194.319527}, "macro.dbt.collect_freshness": {"unique_id": "macro.dbt.collect_freshness", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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.fivetran_utils.default__collect_freshness"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.3197482}, "macro.dbt.default__collect_freshness": {"unique_id": "macro.dbt.default__collect_freshness", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.320158}, "macro.dbt.copy_grants": {"unique_id": "macro.dbt.copy_grants", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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.default__copy_grants"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.321756}, "macro.dbt.default__copy_grants": {"unique_id": "macro.dbt.default__copy_grants", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.321868}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.32203}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.32214}, "macro.dbt.should_revoke": {"unique_id": "macro.dbt.should_revoke", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.322479}, "macro.dbt.get_show_grant_sql": {"unique_id": "macro.dbt.get_show_grant_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__get_show_grant_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.3226628}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.3227599}, "macro.dbt.get_grant_sql": {"unique_id": "macro.dbt.get_grant_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__get_grant_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.3229818}, "macro.dbt.default__get_grant_sql": {"unique_id": "macro.dbt.default__get_grant_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.323166}, "macro.dbt.get_revoke_sql": {"unique_id": "macro.dbt.get_revoke_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__get_revoke_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.323392}, "macro.dbt.default__get_revoke_sql": {"unique_id": "macro.dbt.default__get_revoke_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.3235729}, "macro.dbt.get_dcl_statement_list": {"unique_id": "macro.dbt.get_dcl_statement_list", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.3238049}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.32455}, "macro.dbt.call_dcl_statements": {"unique_id": "macro.dbt.call_dcl_statements", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.324739}, "macro.dbt.default__call_dcl_statements": {"unique_id": "macro.dbt.default__call_dcl_statements", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.324972}, "macro.dbt.apply_grants": {"unique_id": "macro.dbt.apply_grants", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.3251991}, "macro.dbt.default__apply_grants": {"unique_id": "macro.dbt.default__apply_grants", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.3263118}, "macro.dbt.alter_column_comment": {"unique_id": "macro.dbt.alter_column_comment", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__alter_column_comment"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.327012}, "macro.dbt.default__alter_column_comment": {"unique_id": "macro.dbt.default__alter_column_comment", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.327175}, "macro.dbt.alter_relation_comment": {"unique_id": "macro.dbt.alter_relation_comment", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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.default__alter_relation_comment"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.327376}, "macro.dbt.default__alter_relation_comment": {"unique_id": "macro.dbt.default__alter_relation_comment", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.32754}, "macro.dbt.persist_docs": {"unique_id": "macro.dbt.persist_docs", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.327807}, "macro.dbt.default__persist_docs": {"unique_id": "macro.dbt.default__persist_docs", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.3282828}, "macro.dbt.get_catalog": {"unique_id": "macro.dbt.get_catalog", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__get_catalog"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.3296719}, "macro.dbt.default__get_catalog": {"unique_id": "macro.dbt.default__get_catalog", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.329925}, "macro.dbt.information_schema_name": {"unique_id": "macro.dbt.information_schema_name", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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.default__information_schema_name"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.3301098}, "macro.dbt.default__information_schema_name": {"unique_id": "macro.dbt.default__information_schema_name", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.3302689}, "macro.dbt.list_schemas": {"unique_id": "macro.dbt.list_schemas", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__list_schemas"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.3304489}, "macro.dbt.default__list_schemas": {"unique_id": "macro.dbt.default__list_schemas", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.330705}, "macro.dbt.check_schema_exists": {"unique_id": "macro.dbt.check_schema_exists", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__check_schema_exists"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.3309078}, "macro.dbt.default__check_schema_exists": {"unique_id": "macro.dbt.default__check_schema_exists", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_utils.replace", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.331198}, "macro.dbt.list_relations_without_caching": {"unique_id": "macro.dbt.list_relations_without_caching", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__list_relations_without_caching"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.331382}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.3315341}, "macro.dbt.get_columns_in_relation": {"unique_id": "macro.dbt.get_columns_in_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__get_columns_in_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.333138}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.333369}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.3336818}, "macro.dbt.get_columns_in_query": {"unique_id": "macro.dbt.get_columns_in_query", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.3338618}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.334194}, "macro.dbt.alter_column_type": {"unique_id": "macro.dbt.alter_column_type", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__alter_column_type"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.334433}, "macro.dbt.default__alter_column_type": {"unique_id": "macro.dbt.default__alter_column_type", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.33503}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.3352818}, "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-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.33605}, "macro.dbt.test_unique": {"unique_id": "macro.dbt.test_unique", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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_bigquery.bigquery__test_unique"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.3365939}, "macro.dbt.test_not_null": {"unique_id": "macro.dbt.test_not_null", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.336822}, "macro.dbt.test_accepted_values": {"unique_id": "macro.dbt.test_accepted_values", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.3371022}, "macro.dbt.test_relationships": {"unique_id": "macro.dbt.test_relationships", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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}, "patch_path": null, "arguments": [], "created_at": 1665703194.3373702}, "macro.shopify_source.get_order_columns": {"unique_id": "macro.shopify_source.get_order_columns", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "macros/staging_columns.sql", "original_file_path": "macros/staging_columns.sql", "name": "get_order_columns", "macro_sql": "{% macro get_order_columns() %}\n\n{% set columns = [\n {\"name\": \"id\", \"datatype\": dbt_utils.type_numeric(), \"alias\": \"order_id\"},\n {\"name\": \"processed_at\", \"datatype\": dbt_utils.type_timestamp(), \"alias\": \"processed_timestamp\"},\n {\"name\": \"updated_at\", \"datatype\": dbt_utils.type_timestamp(), \"alias\": \"updated_timestamp\"},\n {\"name\": \"user_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"total_discounts\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"total_line_items_price\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"total_price\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"total_tax\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"source_name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"subtotal_price\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"taxes_included\", \"datatype\": \"boolean\", \"alias\": \"has_taxes_included\"},\n {\"name\": \"total_weight\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"landing_site_base_url\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"location_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"note\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"number\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"order_number\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"cancel_reason\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"cancelled_at\", \"datatype\": dbt_utils.type_timestamp(), \"alias\": \"cancelled_timestamp\"},\n {\"name\": \"cart_token\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"checkout_token\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"closed_at\", \"datatype\": dbt_utils.type_timestamp(), \"alias\": \"closed_timestamp\"},\n {\"name\": \"created_at\", \"datatype\": dbt_utils.type_timestamp(), \"alias\": \"created_timestamp\"},\n {\"name\": \"currency\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"customer_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"email\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"financial_status\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"fulfillment_status\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"processing_method\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"referring_site\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"billing_address_address_1\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"billing_address_address_2\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"billing_address_city\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"billing_address_company\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"billing_address_country\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"billing_address_country_code\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"billing_address_first_name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"billing_address_last_name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"billing_address_latitude\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"billing_address_longitude\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"billing_address_name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"billing_address_phone\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"billing_address_province\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"billing_address_province_code\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"billing_address_zip\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"browser_ip\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"buyer_accepts_marketing\", \"datatype\": \"boolean\", \"alias\": \"has_buyer_accepted_marketing\"},\n {\"name\": \"total_shipping_price_set\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"shipping_address_address_1\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"shipping_address_address_2\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"shipping_address_city\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"shipping_address_company\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"shipping_address_country\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"shipping_address_country_code\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"shipping_address_first_name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"shipping_address_last_name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"shipping_address_latitude\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"shipping_address_longitude\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"shipping_address_name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"shipping_address_phone\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"shipping_address_province\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"shipping_address_province_code\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"shipping_address_zip\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"test\", \"datatype\": \"boolean\", \"alias\": \"is_test_order\"},\n {\"name\": \"token\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_numeric", "macro.dbt_utils.type_timestamp", "macro.dbt_utils.type_float", "macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.3523068}, "macro.shopify_source.get_customer_columns": {"unique_id": "macro.shopify_source.get_customer_columns", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "macros/staging_columns.sql", "original_file_path": "macros/staging_columns.sql", "name": "get_customer_columns", "macro_sql": "{% macro get_customer_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"accepts_marketing\", \"datatype\": \"boolean\", \"alias\": \"has_accepted_marketing\"},\n {\"name\": \"created_at\", \"datatype\": dbt_utils.type_timestamp(), \"alias\": \"created_timestamp\"},\n {\"name\": \"default_address_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"email\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"first_name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"id\", \"datatype\": dbt_utils.type_numeric(), \"alias\": \"customer_id\"},\n {\"name\": \"last_name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"orders_count\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"phone\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"state\", \"datatype\": dbt_utils.type_string(), \"alias\": \"account_state\"},\n {\"name\": \"tax_exempt\", \"datatype\": \"boolean\", \"alias\": \"is_tax_exempt\"},\n {\"name\": \"total_spent\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"updated_at\", \"datatype\": dbt_utils.type_timestamp(), \"alias\": \"updated_timestamp\"},\n {\"name\": \"verified_email\", \"datatype\": \"boolean\", \"alias\": \"is_verified_email\"}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_timestamp", "macro.dbt_utils.type_numeric", "macro.dbt_utils.type_string", "macro.dbt_utils.type_float"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.353895}, "macro.shopify_source.get_order_line_refund_columns": {"unique_id": "macro.shopify_source.get_order_line_refund_columns", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "macros/staging_columns.sql", "original_file_path": "macros/staging_columns.sql", "name": "get_order_line_refund_columns", "macro_sql": "{% macro get_order_line_refund_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt_utils.type_numeric(), \"alias\": \"order_line_refund_id\"},\n {\"name\": \"location_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"order_line_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"subtotal\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"total_tax\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"quantity\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"refund_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"restock_type\", \"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_numeric", "macro.dbt_utils.type_float", "macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.354839}, "macro.shopify_source.get_order_line_columns": {"unique_id": "macro.shopify_source.get_order_line_columns", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "macros/staging_columns.sql", "original_file_path": "macros/staging_columns.sql", "name": "get_order_line_columns", "macro_sql": "{% macro get_order_line_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"fulfillable_quantity\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"fulfillment_service\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"fulfillment_status\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"gift_card\", \"datatype\": \"boolean\", \"alias\": \"is_gift_card\"},\n {\"name\": \"grams\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"id\", \"datatype\": dbt_utils.type_numeric(), \"alias\": \"order_line_id\"},\n {\"name\": \"index\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"order_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"pre_tax_price\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"price\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"product_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"property_charge_interval_frequency\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"property_for_shipping_jan_3_rd_2020\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"property_shipping_interval_frequency\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"property_shipping_interval_unit_type\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"property_subscription_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"quantity\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"requires_shipping\", \"datatype\": \"boolean\", \"alias\": \"is_requiring_shipping\"},\n {\"name\": \"sku\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"taxable\", \"datatype\": \"boolean\", \"alias\": \"is_taxable\"},\n {\"name\": \"title\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"total_discount\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"variant_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"vendor\", \"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_numeric", "macro.dbt_utils.type_string", "macro.dbt_utils.type_float"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.357194}, "macro.shopify_source.get_product_columns": {"unique_id": "macro.shopify_source.get_product_columns", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "macros/staging_columns.sql", "original_file_path": "macros/staging_columns.sql", "name": "get_product_columns", "macro_sql": "{% macro get_product_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"created_at\", \"datatype\": dbt_utils.type_timestamp(), \"alias\": \"created_timestamp\"},\n {\"name\": \"handle\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"id\", \"datatype\": dbt_utils.type_numeric(), \"alias\": \"product_id\"},\n {\"name\": \"product_type\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"published_at\", \"datatype\": dbt_utils.type_timestamp(), \"alias\": \"published_timestamp\"},\n {\"name\": \"published_scope\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"title\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"updated_at\", \"datatype\": dbt_utils.type_timestamp(), \"alias\": \"updated_timestamp\"},\n {\"name\": \"vendor\", \"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_numeric"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.358371}, "macro.shopify_source.get_product_variant_columns": {"unique_id": "macro.shopify_source.get_product_variant_columns", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "macros/staging_columns.sql", "original_file_path": "macros/staging_columns.sql", "name": "get_product_variant_columns", "macro_sql": "{% macro get_product_variant_columns() %}\n\n{% set columns = [\n {\"name\": \"id\", \"datatype\": dbt_utils.type_numeric(), \"alias\": \"variant_id\"},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"created_at\", \"datatype\": dbt_utils.type_timestamp(), \"alias\": \"created_timestamp\"},\n {\"name\": \"updated_at\", \"datatype\": dbt_utils.type_timestamp(), \"alias\": \"updated_timestamp\"},\n {\"name\": \"product_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"inventory_item_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"image_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"title\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"price\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"sku\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"position\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"inventory_policy\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"compare_at_price\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"fulfillment_service\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"inventory_management\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"taxable\", \"datatype\": \"boolean\", \"alias\": \"is_taxable\"},\n {\"name\": \"barcode\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"grams\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"inventory_quantity\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"weight\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"weight_unit\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"option_1\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"option_2\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"option_3\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"tax_code\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"old_inventory_quantity\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"requires_shipping\", \"datatype\": \"boolean\", \"alias\": \"is_requiring_shipping\"}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_numeric", "macro.dbt_utils.type_timestamp", "macro.dbt_utils.type_string", "macro.dbt_utils.type_float"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.360842}, "macro.shopify_source.get_transaction_columns": {"unique_id": "macro.shopify_source.get_transaction_columns", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "macros/staging_columns.sql", "original_file_path": "macros/staging_columns.sql", "name": "get_transaction_columns", "macro_sql": "{% macro get_transaction_columns() %}\n\n{% set columns = [\n {\"name\": \"id\", \"datatype\": dbt_utils.type_numeric(), \"alias\": \"transaction_id\"},\n {\"name\": \"order_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"refund_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"amount\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"created_at\", \"datatype\": dbt_utils.type_timestamp(), \"alias\": \"created_timestamp\"},\n {\"name\": \"processed_at\", \"datatype\": dbt_utils.type_timestamp(), \"alias\": \"processed_timestamp\"},\n {\"name\": \"device_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"gateway\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"source_name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"message\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"currency\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"location_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"parent_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"payment_avs_result_code\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"payment_credit_card_bin\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"payment_cvv_result_code\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"payment_credit_card_number\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"payment_credit_card_company\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"kind\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"receipt\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"currency_exchange_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"currency_exchange_adjustment\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"currency_exchange_original_amount\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"currency_exchange_final_amount\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"currency_exchange_currency\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"error_code\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"status\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"test\", \"datatype\": \"boolean\"},\n {\"name\": \"user_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()}\n] %}\n\n{% if target.type in ('redshift','postgres') %}\n {{ columns.append({\"name\": \"authorization\", \"datatype\": dbt_utils.type_string(), \"quote\": True, \"alias\": \"authorization\"}) }}\n{% else %}\n {\"name\": \"authorization\", \"datatype\": dbt_utils.type_string()}\n{% endif %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_numeric", "macro.dbt_utils.type_timestamp", "macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.363887}, "macro.shopify_source.get_refund_columns": {"unique_id": "macro.shopify_source.get_refund_columns", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "macros/staging_columns.sql", "original_file_path": "macros/staging_columns.sql", "name": "get_refund_columns", "macro_sql": "{% macro get_refund_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"created_at\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt_utils.type_numeric(), \"alias\": \"refund_id\"},\n {\"name\": \"note\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"order_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"processed_at\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"restock\", \"datatype\": \"boolean\"},\n {\"name\": \"user_id\", \"datatype\": dbt_utils.type_numeric()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_timestamp", "macro.dbt_utils.type_numeric", "macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.3647249}, "macro.shopify_source.get_order_adjustment_columns": {"unique_id": "macro.shopify_source.get_order_adjustment_columns", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "macros/staging_columns.sql", "original_file_path": "macros/staging_columns.sql", "name": "get_order_adjustment_columns", "macro_sql": "{% macro get_order_adjustment_columns() %}\n\n{% set columns = [\n {\"name\": \"id\", \"datatype\": dbt_utils.type_numeric(), \"alias\": \"order_adjustment_id\"},\n {\"name\": \"order_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"refund_id\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"amount\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"tax_amount\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"kind\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"reason\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_numeric", "macro.dbt_utils.type_float", "macro.dbt_utils.type_string", "macro.dbt_utils.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.3655748}, "macro.dbt_utils.except": {"unique_id": "macro.dbt_utils.except", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__except"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.3658938}, "macro.dbt_utils.default__except": {"unique_id": "macro.dbt_utils.default__except", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.365966}, "macro.dbt_utils.bigquery__except": {"unique_id": "macro.dbt_utils.bigquery__except", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.366035}, "macro.dbt_utils.replace": {"unique_id": "macro.dbt_utils.replace", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.366416}, "macro.dbt_utils.default__replace": {"unique_id": "macro.dbt_utils.default__replace", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.3665879}, "macro.dbt_utils.concat": {"unique_id": "macro.dbt_utils.concat", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.3669288}, "macro.dbt_utils.default__concat": {"unique_id": "macro.dbt_utils.default__concat", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.3670468}, "macro.dbt_utils.type_string": {"unique_id": "macro.dbt_utils.type_string", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.default__type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.367736}, "macro.dbt_utils.default__type_string": {"unique_id": "macro.dbt_utils.default__type_string", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.36781}, "macro.dbt_utils.redshift__type_string": {"unique_id": "macro.dbt_utils.redshift__type_string", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.367885}, "macro.dbt_utils.postgres__type_string": {"unique_id": "macro.dbt_utils.postgres__type_string", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.3679512}, "macro.dbt_utils.snowflake__type_string": {"unique_id": "macro.dbt_utils.snowflake__type_string", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.36802}, "macro.dbt_utils.type_timestamp": {"unique_id": "macro.dbt_utils.type_timestamp", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.default__type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.368172}, "macro.dbt_utils.default__type_timestamp": {"unique_id": "macro.dbt_utils.default__type_timestamp", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.368245}, "macro.dbt_utils.postgres__type_timestamp": {"unique_id": "macro.dbt_utils.postgres__type_timestamp", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.368313}, "macro.dbt_utils.snowflake__type_timestamp": {"unique_id": "macro.dbt_utils.snowflake__type_timestamp", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.3683789}, "macro.dbt_utils.type_float": {"unique_id": "macro.dbt_utils.type_float", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__type_float"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.368532}, "macro.dbt_utils.default__type_float": {"unique_id": "macro.dbt_utils.default__type_float", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.368602}, "macro.dbt_utils.bigquery__type_float": {"unique_id": "macro.dbt_utils.bigquery__type_float", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.368669}, "macro.dbt_utils.type_numeric": {"unique_id": "macro.dbt_utils.type_numeric", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__type_numeric"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.368889}, "macro.dbt_utils.default__type_numeric": {"unique_id": "macro.dbt_utils.default__type_numeric", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.368959}, "macro.dbt_utils.bigquery__type_numeric": {"unique_id": "macro.dbt_utils.bigquery__type_numeric", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.369023}, "macro.dbt_utils.type_bigint": {"unique_id": "macro.dbt_utils.type_bigint", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__type_bigint"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.369185}, "macro.dbt_utils.default__type_bigint": {"unique_id": "macro.dbt_utils.default__type_bigint", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.3692522}, "macro.dbt_utils.bigquery__type_bigint": {"unique_id": "macro.dbt_utils.bigquery__type_bigint", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.36932}, "macro.dbt_utils.type_int": {"unique_id": "macro.dbt_utils.type_int", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__type_int"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.369473}, "macro.dbt_utils.default__type_int": {"unique_id": "macro.dbt_utils.default__type_int", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.369542}, "macro.dbt_utils.bigquery__type_int": {"unique_id": "macro.dbt_utils.bigquery__type_int", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.36961}, "macro.dbt_utils._is_relation": {"unique_id": "macro.dbt_utils._is_relation", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.3701131}, "macro.dbt_utils.cast_array_to_string": {"unique_id": "macro.dbt_utils.cast_array_to_string", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__cast_array_to_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.3705559}, "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/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.370689}, "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/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.37098}, "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/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.371121}, "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/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.371223}, "macro.dbt_utils.length": {"unique_id": "macro.dbt_utils.length", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.3715682}, "macro.dbt_utils.default__length": {"unique_id": "macro.dbt_utils.default__length", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.3716748}, "macro.dbt_utils.redshift__length": {"unique_id": "macro.dbt_utils.redshift__length", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.371778}, "macro.dbt_utils.dateadd": {"unique_id": "macro.dbt_utils.dateadd", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__dateadd"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.372384}, "macro.dbt_utils.default__dateadd": {"unique_id": "macro.dbt_utils.default__dateadd", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.372541}, "macro.dbt_utils.bigquery__dateadd": {"unique_id": "macro.dbt_utils.bigquery__dateadd", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.372695}, "macro.dbt_utils.postgres__dateadd": {"unique_id": "macro.dbt_utils.postgres__dateadd", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.372848}, "macro.dbt_utils.redshift__dateadd": {"unique_id": "macro.dbt_utils.redshift__dateadd", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.373107}, "macro.dbt_utils.intersect": {"unique_id": "macro.dbt_utils.intersect", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__intersect"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.3734038}, "macro.dbt_utils.default__intersect": {"unique_id": "macro.dbt_utils.default__intersect", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.3734741}, "macro.dbt_utils.bigquery__intersect": {"unique_id": "macro.dbt_utils.bigquery__intersect", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.373545}, "macro.dbt_utils.escape_single_quotes": {"unique_id": "macro.dbt_utils.escape_single_quotes", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__escape_single_quotes"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.373921}, "macro.dbt_utils.default__escape_single_quotes": {"unique_id": "macro.dbt_utils.default__escape_single_quotes", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.374059}, "macro.dbt_utils.snowflake__escape_single_quotes": {"unique_id": "macro.dbt_utils.snowflake__escape_single_quotes", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.374193}, "macro.dbt_utils.bigquery__escape_single_quotes": {"unique_id": "macro.dbt_utils.bigquery__escape_single_quotes", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.374326}, "macro.dbt_utils.right": {"unique_id": "macro.dbt_utils.right", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__right"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.374889}, "macro.dbt_utils.default__right": {"unique_id": "macro.dbt_utils.default__right", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.3750222}, "macro.dbt_utils.bigquery__right": {"unique_id": "macro.dbt_utils.bigquery__right", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.3751738}, "macro.dbt_utils.snowflake__right": {"unique_id": "macro.dbt_utils.snowflake__right", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.3753211}, "macro.dbt_utils.listagg": {"unique_id": "macro.dbt_utils.listagg", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__listagg"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.377493}, "macro.dbt_utils.default__listagg": {"unique_id": "macro.dbt_utils.default__listagg", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.377887}, "macro.dbt_utils.bigquery__listagg": {"unique_id": "macro.dbt_utils.bigquery__listagg", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.378159}, "macro.dbt_utils.postgres__listagg": {"unique_id": "macro.dbt_utils.postgres__listagg", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.3785331}, "macro.dbt_utils.redshift__listagg": {"unique_id": "macro.dbt_utils.redshift__listagg", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.379511}, "macro.dbt_utils.datediff": {"unique_id": "macro.dbt_utils.datediff", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__datediff"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.3820632}, "macro.dbt_utils.default__datediff": {"unique_id": "macro.dbt_utils.default__datediff", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.382231}, "macro.dbt_utils.bigquery__datediff": {"unique_id": "macro.dbt_utils.bigquery__datediff", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.3823822}, "macro.dbt_utils.postgres__datediff": {"unique_id": "macro.dbt_utils.postgres__datediff", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.384059}, "macro.dbt_utils.redshift__datediff": {"unique_id": "macro.dbt_utils.redshift__datediff", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.3842611}, "macro.dbt_utils.safe_cast": {"unique_id": "macro.dbt_utils.safe_cast", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__safe_cast"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.3846872}, "macro.dbt_utils.default__safe_cast": {"unique_id": "macro.dbt_utils.default__safe_cast", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.384824}, "macro.dbt_utils.snowflake__safe_cast": {"unique_id": "macro.dbt_utils.snowflake__safe_cast", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.3849459}, "macro.dbt_utils.bigquery__safe_cast": {"unique_id": "macro.dbt_utils.bigquery__safe_cast", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.385065}, "macro.dbt_utils.hash": {"unique_id": "macro.dbt_utils.hash", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__hash"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.385395}, "macro.dbt_utils.default__hash": {"unique_id": "macro.dbt_utils.default__hash", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.3855329}, "macro.dbt_utils.bigquery__hash": {"unique_id": "macro.dbt_utils.bigquery__hash", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.385663}, "macro.dbt_utils.cast_bool_to_text": {"unique_id": "macro.dbt_utils.cast_bool_to_text", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.386009}, "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/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.386143}, "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/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.386264}, "macro.dbt_utils.identifier": {"unique_id": "macro.dbt_utils.identifier", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__identifier"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.386764}, "macro.dbt_utils.default__identifier": {"unique_id": "macro.dbt_utils.default__identifier", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.386867}, "macro.dbt_utils.bigquery__identifier": {"unique_id": "macro.dbt_utils.bigquery__identifier", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.386962}, "macro.dbt_utils.any_value": {"unique_id": "macro.dbt_utils.any_value", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.default__any_value"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.387307}, "macro.dbt_utils.default__any_value": {"unique_id": "macro.dbt_utils.default__any_value", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.387604}, "macro.dbt_utils.postgres__any_value": {"unique_id": "macro.dbt_utils.postgres__any_value", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.3877099}, "macro.dbt_utils.position": {"unique_id": "macro.dbt_utils.position", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__position"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.3881118}, "macro.dbt_utils.default__position": {"unique_id": "macro.dbt_utils.default__position", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.388245}, "macro.dbt_utils.bigquery__position": {"unique_id": "macro.dbt_utils.bigquery__position", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.388374}, "macro.dbt_utils.string_literal": {"unique_id": "macro.dbt_utils.string_literal", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.388682}, "macro.dbt_utils.default__string_literal": {"unique_id": "macro.dbt_utils.default__string_literal", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.3887832}, "macro.dbt_utils.current_timestamp": {"unique_id": "macro.dbt_utils.current_timestamp", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.389363}, "macro.dbt_utils.default__current_timestamp": {"unique_id": "macro.dbt_utils.default__current_timestamp", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.389471}, "macro.dbt_utils.redshift__current_timestamp": {"unique_id": "macro.dbt_utils.redshift__current_timestamp", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.389544}, "macro.dbt_utils.bigquery__current_timestamp": {"unique_id": "macro.dbt_utils.bigquery__current_timestamp", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.38961}, "macro.dbt_utils.current_timestamp_in_utc": {"unique_id": "macro.dbt_utils.current_timestamp_in_utc", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.default__current_timestamp_in_utc"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.389764}, "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/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.389868}, "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/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.390008}, "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/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.3901172}, "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/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.390244}, "macro.dbt_utils.width_bucket": {"unique_id": "macro.dbt_utils.width_bucket", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.391637}, "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/dbt_shopify_holistic_reporting/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": 1665703194.39217}, "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/dbt_shopify_holistic_reporting/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": 1665703194.392718}, "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/dbt_shopify_holistic_reporting/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": 1665703194.3929129}, "macro.dbt_utils.array_concat": {"unique_id": "macro.dbt_utils.array_concat", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__array_concat"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.3933702}, "macro.dbt_utils.default__array_concat": {"unique_id": "macro.dbt_utils.default__array_concat", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.393506}, "macro.dbt_utils.bigquery__array_concat": {"unique_id": "macro.dbt_utils.bigquery__array_concat", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.393631}, "macro.dbt_utils.redshift__array_concat": {"unique_id": "macro.dbt_utils.redshift__array_concat", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.3937569}, "macro.dbt_utils.bool_or": {"unique_id": "macro.dbt_utils.bool_or", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__bool_or"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.394136}, "macro.dbt_utils.default__bool_or": {"unique_id": "macro.dbt_utils.default__bool_or", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.394239}, "macro.dbt_utils.snowflake__bool_or": {"unique_id": "macro.dbt_utils.snowflake__bool_or", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.394335}, "macro.dbt_utils.bigquery__bool_or": {"unique_id": "macro.dbt_utils.bigquery__bool_or", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.39443}, "macro.dbt_utils.last_day": {"unique_id": "macro.dbt_utils.last_day", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.default__last_day"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.395009}, "macro.dbt_utils.default_last_day": {"unique_id": "macro.dbt_utils.default_last_day", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.3952699}, "macro.dbt_utils.default__last_day": {"unique_id": "macro.dbt_utils.default__last_day", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.3954182}, "macro.dbt_utils.postgres__last_day": {"unique_id": "macro.dbt_utils.postgres__last_day", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.395809}, "macro.dbt_utils.redshift__last_day": {"unique_id": "macro.dbt_utils.redshift__last_day", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.395978}, "macro.dbt_utils.split_part": {"unique_id": "macro.dbt_utils.split_part", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__split_part"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.397417}, "macro.dbt_utils.default__split_part": {"unique_id": "macro.dbt_utils.default__split_part", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.397579}, "macro.dbt_utils._split_part_negative": {"unique_id": "macro.dbt_utils._split_part_negative", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.397797}, "macro.dbt_utils.postgres__split_part": {"unique_id": "macro.dbt_utils.postgres__split_part", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.3981252}, "macro.dbt_utils.redshift__split_part": {"unique_id": "macro.dbt_utils.redshift__split_part", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.3985128}, "macro.dbt_utils.bigquery__split_part": {"unique_id": "macro.dbt_utils.bigquery__split_part", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.3988638}, "macro.dbt_utils.date_trunc": {"unique_id": "macro.dbt_utils.date_trunc", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__date_trunc"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.399245}, "macro.dbt_utils.default__date_trunc": {"unique_id": "macro.dbt_utils.default__date_trunc", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.399373}, "macro.dbt_utils.bigquery__date_trunc": {"unique_id": "macro.dbt_utils.bigquery__date_trunc", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.3995001}, "macro.dbt_utils.array_construct": {"unique_id": "macro.dbt_utils.array_construct", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__array_construct"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.400038}, "macro.dbt_utils.default__array_construct": {"unique_id": "macro.dbt_utils.default__array_construct", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.400272}, "macro.dbt_utils.snowflake__array_construct": {"unique_id": "macro.dbt_utils.snowflake__array_construct", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.4004118}, "macro.dbt_utils.redshift__array_construct": {"unique_id": "macro.dbt_utils.redshift__array_construct", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.400546}, "macro.dbt_utils.bigquery__array_construct": {"unique_id": "macro.dbt_utils.bigquery__array_construct", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.4006789}, "macro.dbt_utils._is_ephemeral": {"unique_id": "macro.dbt_utils._is_ephemeral", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.401553}, "macro.dbt_utils.array_append": {"unique_id": "macro.dbt_utils.array_append", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__array_append"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.401969}, "macro.dbt_utils.default__array_append": {"unique_id": "macro.dbt_utils.default__array_append", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.402101}, "macro.dbt_utils.bigquery__array_append": {"unique_id": "macro.dbt_utils.bigquery__array_append", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.402285}, "macro.dbt_utils.redshift__array_append": {"unique_id": "macro.dbt_utils.redshift__array_append", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.402465}, "macro.dbt_utils.get_period_boundaries": {"unique_id": "macro.dbt_utils.get_period_boundaries", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.408045}, "macro.dbt_utils.default__get_period_boundaries": {"unique_id": "macro.dbt_utils.default__get_period_boundaries", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.408569}, "macro.dbt_utils.get_period_sql": {"unique_id": "macro.dbt_utils.get_period_sql", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.408889}, "macro.dbt_utils.default__get_period_sql": {"unique_id": "macro.dbt_utils.default__get_period_sql", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.409469}, "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/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.414468}, "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/dbt_shopify_holistic_reporting/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": 1665703194.414932}, "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/dbt_shopify_holistic_reporting/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": 1665703194.415416}, "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/dbt_shopify_holistic_reporting/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": 1665703194.415942}, "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/dbt_shopify_holistic_reporting/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": 1665703194.416585}, "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/dbt_shopify_holistic_reporting/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": 1665703194.416963}, "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/dbt_shopify_holistic_reporting/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": 1665703194.417282}, "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/dbt_shopify_holistic_reporting/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": 1665703194.417849}, "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/dbt_shopify_holistic_reporting/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": 1665703194.418072}, "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/dbt_shopify_holistic_reporting/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": 1665703194.418505}, "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/dbt_shopify_holistic_reporting/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": 1665703194.418798}, "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/dbt_shopify_holistic_reporting/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": 1665703194.419478}, "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/dbt_shopify_holistic_reporting/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": 1665703194.4198132}, "macro.dbt_utils.test_recency": {"unique_id": "macro.dbt_utils.test_recency", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.420259}, "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/dbt_shopify_holistic_reporting/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": 1665703194.4205801}, "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/dbt_shopify_holistic_reporting/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": 1665703194.420943}, "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/dbt_shopify_holistic_reporting/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": 1665703194.421119}, "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/dbt_shopify_holistic_reporting/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": 1665703194.421751}, "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/dbt_shopify_holistic_reporting/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": 1665703194.4222982}, "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/dbt_shopify_holistic_reporting/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": 1665703194.422872}, "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/dbt_shopify_holistic_reporting/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": 1665703194.42325}, "macro.dbt_utils.test_unique_where": {"unique_id": "macro.dbt_utils.test_unique_where", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.423706}, "macro.dbt_utils.default__test_unique_where": {"unique_id": "macro.dbt_utils.default__test_unique_where", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.423871}, "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/dbt_shopify_holistic_reporting/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": 1665703194.4242392}, "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/dbt_shopify_holistic_reporting/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": 1665703194.4244092}, "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/dbt_shopify_holistic_reporting/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": 1665703194.4250429}, "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/dbt_shopify_holistic_reporting/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": 1665703194.42567}, "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/dbt_shopify_holistic_reporting/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": 1665703194.426255}, "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/dbt_shopify_holistic_reporting/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": 1665703194.426592}, "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/dbt_shopify_holistic_reporting/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": 1665703194.427094}, "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/dbt_shopify_holistic_reporting/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": 1665703194.4273741}, "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/dbt_shopify_holistic_reporting/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": 1665703194.427833}, "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/dbt_shopify_holistic_reporting/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": 1665703194.428344}, "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/dbt_shopify_holistic_reporting/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": 1665703194.429021}, "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/dbt_shopify_holistic_reporting/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": 1665703194.429683}, "macro.dbt_utils.test_not_null_where": {"unique_id": "macro.dbt_utils.test_not_null_where", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.4301372}, "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/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.430311}, "macro.dbt_utils.test_equality": {"unique_id": "macro.dbt_utils.test_equality", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.431083}, "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/dbt_shopify_holistic_reporting/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": 1665703194.43195}, "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/dbt_shopify_holistic_reporting/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": 1665703194.434898}, "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/dbt_shopify_holistic_reporting/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": 1665703194.436384}, "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/dbt_shopify_holistic_reporting/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": 1665703194.4367082}, "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/dbt_shopify_holistic_reporting/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": 1665703194.4368708}, "macro.dbt_utils.pretty_time": {"unique_id": "macro.dbt_utils.pretty_time", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.437191}, "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/dbt_shopify_holistic_reporting/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": 1665703194.437387}, "macro.dbt_utils.log_info": {"unique_id": "macro.dbt_utils.log_info", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.4376872}, "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/dbt_shopify_holistic_reporting/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": 1665703194.4378529}, "macro.dbt_utils.slugify": {"unique_id": "macro.dbt_utils.slugify", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.438365}, "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/dbt_shopify_holistic_reporting/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": 1665703194.439072}, "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/dbt_shopify_holistic_reporting/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": 1665703194.4396532}, "macro.dbt_utils.date_spine": {"unique_id": "macro.dbt_utils.date_spine", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.43988}, "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/dbt_shopify_holistic_reporting/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": 1665703194.440233}, "macro.dbt_utils.nullcheck_table": {"unique_id": "macro.dbt_utils.nullcheck_table", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.4405918}, "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/dbt_shopify_holistic_reporting/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": 1665703194.441}, "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/dbt_shopify_holistic_reporting/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": 1665703194.441688}, "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/dbt_shopify_holistic_reporting/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": 1665703194.442518}, "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/dbt_shopify_holistic_reporting/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": 1665703194.443336}, "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/dbt_shopify_holistic_reporting/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": 1665703194.4437451}, "macro.dbt_utils.generate_series": {"unique_id": "macro.dbt_utils.generate_series", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.4439309}, "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/dbt_shopify_holistic_reporting/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": 1665703194.444435}, "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/dbt_shopify_holistic_reporting/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": 1665703194.4451258}, "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/dbt_shopify_holistic_reporting/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": 1665703194.445963}, "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/dbt_shopify_holistic_reporting/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": 1665703194.446408}, "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/dbt_shopify_holistic_reporting/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": 1665703194.4466932}, "macro.dbt_utils.star": {"unique_id": "macro.dbt_utils.star", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.447395}, "macro.dbt_utils.default__star": {"unique_id": "macro.dbt_utils.default__star", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.44836}, "macro.dbt_utils.unpivot": {"unique_id": "macro.dbt_utils.unpivot", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.4500391}, "macro.dbt_utils.default__unpivot": {"unique_id": "macro.dbt_utils.default__unpivot", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.452071}, "macro.dbt_utils.union_relations": {"unique_id": "macro.dbt_utils.union_relations", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.454528}, "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/dbt_shopify_holistic_reporting/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": 1665703194.457504}, "macro.dbt_utils.group_by": {"unique_id": "macro.dbt_utils.group_by", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.457849}, "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/dbt_shopify_holistic_reporting/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": 1665703194.4581041}, "macro.dbt_utils.deduplicate": {"unique_id": "macro.dbt_utils.deduplicate", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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.bigquery__deduplicate"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.460495}, "macro.dbt_utils.default__deduplicate": {"unique_id": "macro.dbt_utils.default__deduplicate", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.460709}, "macro.dbt_utils.redshift__deduplicate": {"unique_id": "macro.dbt_utils.redshift__deduplicate", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.460905}, "macro.dbt_utils.postgres__deduplicate": {"unique_id": "macro.dbt_utils.postgres__deduplicate", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.4610949}, "macro.dbt_utils.snowflake__deduplicate": {"unique_id": "macro.dbt_utils.snowflake__deduplicate", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.4612532}, "macro.dbt_utils.bigquery__deduplicate": {"unique_id": "macro.dbt_utils.bigquery__deduplicate", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.461418}, "macro.dbt_utils.surrogate_key": {"unique_id": "macro.dbt_utils.surrogate_key", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.462037}, "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/dbt_shopify_holistic_reporting/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": 1665703194.462972}, "macro.dbt_utils.safe_add": {"unique_id": "macro.dbt_utils.safe_add", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.4633942}, "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/dbt_shopify_holistic_reporting/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": 1665703194.4636831}, "macro.dbt_utils.nullcheck": {"unique_id": "macro.dbt_utils.nullcheck", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.464082}, "macro.dbt_utils.default__nullcheck": {"unique_id": "macro.dbt_utils.default__nullcheck", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.4644108}, "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/dbt_shopify_holistic_reporting/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}, "patch_path": null, "arguments": [], "created_at": 1665703194.465877}, "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/dbt_shopify_holistic_reporting/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": 1665703194.466153}, "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/dbt_shopify_holistic_reporting/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": 1665703194.466919}, "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/dbt_shopify_holistic_reporting/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": 1665703194.467415}, "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/dbt_shopify_holistic_reporting/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": 1665703194.468519}, "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/dbt_shopify_holistic_reporting/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": 1665703194.469992}, "macro.dbt_utils.pivot": {"unique_id": "macro.dbt_utils.pivot", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.471061}, "macro.dbt_utils.default__pivot": {"unique_id": "macro.dbt_utils.default__pivot", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.4718862}, "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/dbt_shopify_holistic_reporting/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": 1665703194.472388}, "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/dbt_shopify_holistic_reporting/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": 1665703194.4731038}, "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/dbt_shopify_holistic_reporting/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": 1665703194.4735308}, "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/dbt_shopify_holistic_reporting/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": 1665703194.474112}, "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/dbt_shopify_holistic_reporting/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.bigquery__get_table_types_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.474617}, "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/dbt_shopify_holistic_reporting/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": 1665703194.4747}, "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/dbt_shopify_holistic_reporting/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": 1665703194.474786}, "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/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.4748642}, "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/dbt_shopify_holistic_reporting/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": 1665703194.475879}, "macro.dbt_utils.haversine_distance": {"unique_id": "macro.dbt_utils.haversine_distance", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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}, "patch_path": null, "arguments": [], "created_at": 1665703194.476164}, "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/dbt_shopify_holistic_reporting/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": 1665703194.476748}, "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/dbt_shopify_holistic_reporting/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": 1665703194.477598}, "macro.klaviyo_source.get_campaign_columns": {"unique_id": "macro.klaviyo_source.get_campaign_columns", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "macros/get_campaign_columns.sql", "original_file_path": "macros/get_campaign_columns.sql", "name": "get_campaign_columns", "macro_sql": "{% macro get_campaign_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"campaign_type\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"created\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"email_template_id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"from_email\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"from_name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"is_segmented\", \"datatype\": \"boolean\"},\n {\"name\": \"name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"send_time\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"sent_at\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"status\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"status_id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"status_label\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"subject\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"updated\", \"datatype\": dbt_utils.type_timestamp()}\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"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.4795048}, "macro.klaviyo_source.get_metric_columns": {"unique_id": "macro.klaviyo_source.get_metric_columns", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "macros/get_metric_columns.sql", "original_file_path": "macros/get_metric_columns.sql", "name": "get_metric_columns", "macro_sql": "{% macro get_metric_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"created\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"integration_id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"updated\", \"datatype\": dbt_utils.type_timestamp()}\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"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.480439}, "macro.klaviyo_source.get_flow_columns": {"unique_id": "macro.klaviyo_source.get_flow_columns", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "macros/get_flow_columns.sql", "original_file_path": "macros/get_flow_columns.sql", "name": "get_flow_columns", "macro_sql": "{% macro get_flow_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"created\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"status\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"trigger\", \"datatype\": dbt_utils.type_string(), \"quote\": True},\n {\"name\": \"updated\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"customer_filter\", \"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"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.4815638}, "macro.klaviyo_source.get_integration_columns": {"unique_id": "macro.klaviyo_source.get_integration_columns", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "macros/get_integration_columns.sql", "original_file_path": "macros/get_integration_columns.sql", "name": "get_integration_columns", "macro_sql": "{% macro get_integration_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"category\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"name\", \"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"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.48228}, "macro.klaviyo_source.get_person_columns": {"unique_id": "macro.klaviyo_source.get_person_columns", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "macros/get_person_columns.sql", "original_file_path": "macros/get_person_columns.sql", "name": "get_person_columns", "macro_sql": "{% macro get_person_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"address_1\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"address_2\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"city\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"country\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"created\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"email\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"first_name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"last_name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"latitude\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"longitude\", \"datatype\": dbt_utils.type_float()},\n {\"name\": \"organization\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"phone_number\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"region\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"timezone\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"title\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"updated\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"zip\", \"datatype\": dbt_utils.type_string()}\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('klaviyo__person_pass_through_columns')) }}\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_float", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.484575}, "macro.klaviyo_source.get_event_columns": {"unique_id": "macro.klaviyo_source.get_event_columns", "package_name": "klaviyo_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/klaviyo_source", "path": "macros/get_event_columns.sql", "original_file_path": "macros/get_event_columns.sql", "name": "get_event_columns", "macro_sql": "{% macro get_event_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"_variation\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"campaign_id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"datetime\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"flow_id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"flow_message_id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"metric_id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"person_id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"timestamp\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"type\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"uuid\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"property_value\", \"datatype\": dbt_utils.type_string()}\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('klaviyo__event_pass_through_columns')) }}\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.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1665703194.4862661}, "macro.spark_utils.get_tables": {"unique_id": "macro.spark_utils.get_tables", "package_name": "spark_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.4909928}, "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/dbt_shopify_holistic_reporting/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": 1665703194.491683}, "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/dbt_shopify_holistic_reporting/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": 1665703194.4925609}, "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/dbt_shopify_holistic_reporting/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": 1665703194.493459}, "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/dbt_shopify_holistic_reporting/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": 1665703194.4941828}, "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/dbt_shopify_holistic_reporting/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": 1665703194.4950771}, "macro.spark_utils.spark__concat": {"unique_id": "macro.spark_utils.spark__concat", "package_name": "spark_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.4953191}, "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/dbt_shopify_holistic_reporting/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": 1665703194.495477}, "macro.spark_utils.spark__dateadd": {"unique_id": "macro.spark_utils.spark__dateadd", "package_name": "spark_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.498207}, "macro.spark_utils.spark__datediff": {"unique_id": "macro.spark_utils.spark__datediff", "package_name": "spark_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.505155}, "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/dbt_shopify_holistic_reporting/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": 1665703194.5053492}, "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/dbt_shopify_holistic_reporting/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": 1665703194.5054212}, "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/dbt_shopify_holistic_reporting/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": 1665703194.506022}, "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/dbt_shopify_holistic_reporting/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": 1665703194.507555}, "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/dbt_shopify_holistic_reporting/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": 1665703194.507891}, "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/dbt_shopify_holistic_reporting/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": 1665703194.508161}, "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/dbt_shopify_holistic_reporting/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": 1665703194.5084312}, "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/dbt_shopify_holistic_reporting/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": 1665703194.508804}, "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/dbt_shopify_holistic_reporting/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": 1665703194.509005}, "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/dbt_shopify_holistic_reporting/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": 1665703194.5092669}, "macro.fivetran_utils.enabled_vars": {"unique_id": "macro.fivetran_utils.enabled_vars", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.50971}, "macro.fivetran_utils.percentile": {"unique_id": "macro.fivetran_utils.percentile", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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}, "patch_path": null, "arguments": [], "created_at": 1665703194.5106182}, "macro.fivetran_utils.default__percentile": {"unique_id": "macro.fivetran_utils.default__percentile", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.510785}, "macro.fivetran_utils.redshift__percentile": {"unique_id": "macro.fivetran_utils.redshift__percentile", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.510943}, "macro.fivetran_utils.bigquery__percentile": {"unique_id": "macro.fivetran_utils.bigquery__percentile", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.5110981}, "macro.fivetran_utils.postgres__percentile": {"unique_id": "macro.fivetran_utils.postgres__percentile", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.51124}, "macro.fivetran_utils.spark__percentile": {"unique_id": "macro.fivetran_utils.spark__percentile", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.5113971}, "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/dbt_shopify_holistic_reporting/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": 1665703194.511869}, "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/dbt_shopify_holistic_reporting/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": 1665703194.512618}, "macro.fivetran_utils.json_parse": {"unique_id": "macro.fivetran_utils.json_parse", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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}, "patch_path": null, "arguments": [], "created_at": 1665703194.5136771}, "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/dbt_shopify_holistic_reporting/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": 1665703194.513931}, "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/dbt_shopify_holistic_reporting/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": 1665703194.5141811}, "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/dbt_shopify_holistic_reporting/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": 1665703194.5144162}, "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/dbt_shopify_holistic_reporting/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": 1665703194.5146508}, "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/dbt_shopify_holistic_reporting/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": 1665703194.514911}, "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/dbt_shopify_holistic_reporting/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": 1665703194.515171}, "macro.fivetran_utils.max_bool": {"unique_id": "macro.fivetran_utils.max_bool", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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}, "patch_path": null, "arguments": [], "created_at": 1665703194.515531}, "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/dbt_shopify_holistic_reporting/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": 1665703194.51563}, "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/dbt_shopify_holistic_reporting/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": 1665703194.515732}, "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/dbt_shopify_holistic_reporting/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": 1665703194.515831}, "macro.fivetran_utils.calculated_fields": {"unique_id": "macro.fivetran_utils.calculated_fields", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.516244}, "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/dbt_shopify_holistic_reporting/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": 1665703194.516862}, "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/dbt_shopify_holistic_reporting/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": 1665703194.517525}, "macro.fivetran_utils.string_agg": {"unique_id": "macro.fivetran_utils.string_agg", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.5180318}, "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/dbt_shopify_holistic_reporting/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": 1665703194.518162}, "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/dbt_shopify_holistic_reporting/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": 1665703194.518292}, "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/dbt_shopify_holistic_reporting/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": 1665703194.518417}, "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/dbt_shopify_holistic_reporting/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": 1665703194.518545}, "macro.fivetran_utils.timestamp_diff": {"unique_id": "macro.fivetran_utils.timestamp_diff", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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}, "patch_path": null, "arguments": [], "created_at": 1665703194.5212722}, "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/dbt_shopify_holistic_reporting/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": 1665703194.521434}, "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/dbt_shopify_holistic_reporting/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": 1665703194.521596}, "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/dbt_shopify_holistic_reporting/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": 1665703194.521751}, "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/dbt_shopify_holistic_reporting/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": 1665703194.523437}, "macro.fivetran_utils.try_cast": {"unique_id": "macro.fivetran_utils.try_cast", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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}, "patch_path": null, "arguments": [], "created_at": 1665703194.5242748}, "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/dbt_shopify_holistic_reporting/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": 1665703194.524408}, "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/dbt_shopify_holistic_reporting/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": 1665703194.524674}, "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/dbt_shopify_holistic_reporting/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": 1665703194.5249548}, "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/dbt_shopify_holistic_reporting/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": 1665703194.525084}, "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/dbt_shopify_holistic_reporting/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": 1665703194.525207}, "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/dbt_shopify_holistic_reporting/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": 1665703194.5253272}, "macro.fivetran_utils.source_relation": {"unique_id": "macro.fivetran_utils.source_relation", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.525841}, "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/dbt_shopify_holistic_reporting/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": 1665703194.526408}, "macro.fivetran_utils.first_value": {"unique_id": "macro.fivetran_utils.first_value", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.526929}, "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/dbt_shopify_holistic_reporting/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": 1665703194.5271318}, "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/dbt_shopify_holistic_reporting/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": 1665703194.5273511}, "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/dbt_shopify_holistic_reporting/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": 1665703194.527661}, "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/dbt_shopify_holistic_reporting/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": 1665703194.528595}, "macro.fivetran_utils.union_relations": {"unique_id": "macro.fivetran_utils.union_relations", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.532423}, "macro.fivetran_utils.union_tables": {"unique_id": "macro.fivetran_utils.union_tables", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.532777}, "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/dbt_shopify_holistic_reporting/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": 1665703194.533201}, "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/dbt_shopify_holistic_reporting/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": 1665703194.534733}, "macro.fivetran_utils.quote_column": {"unique_id": "macro.fivetran_utils.quote_column", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.535272}, "macro.fivetran_utils.json_extract": {"unique_id": "macro.fivetran_utils.json_extract", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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}, "patch_path": null, "arguments": [], "created_at": 1665703194.535852}, "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/dbt_shopify_holistic_reporting/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": 1665703194.5360022}, "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/dbt_shopify_holistic_reporting/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": 1665703194.536151}, "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/dbt_shopify_holistic_reporting/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": 1665703194.536318}, "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/dbt_shopify_holistic_reporting/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": 1665703194.536469}, "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/dbt_shopify_holistic_reporting/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": 1665703194.5366158}, "macro.fivetran_utils.collect_freshness": {"unique_id": "macro.fivetran_utils.collect_freshness", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.537326}, "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/dbt_shopify_holistic_reporting/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": 1665703194.538292}, "macro.fivetran_utils.timestamp_add": {"unique_id": "macro.fivetran_utils.timestamp_add", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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}, "patch_path": null, "arguments": [], "created_at": 1665703194.538989}, "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/dbt_shopify_holistic_reporting/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": 1665703194.53915}, "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/dbt_shopify_holistic_reporting/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": 1665703194.539306}, "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/dbt_shopify_holistic_reporting/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": 1665703194.539469}, "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/dbt_shopify_holistic_reporting/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": 1665703194.5396202}, "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/dbt_shopify_holistic_reporting/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": 1665703194.539787}, "macro.fivetran_utils.ceiling": {"unique_id": "macro.fivetran_utils.ceiling", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.540084}, "macro.fivetran_utils.default__ceiling": {"unique_id": "macro.fivetran_utils.default__ceiling", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.5402439}, "macro.fivetran_utils.snowflake__ceiling": {"unique_id": "macro.fivetran_utils.snowflake__ceiling", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.540343}, "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/dbt_shopify_holistic_reporting/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": 1665703194.541009}, "macro.fivetran_utils.union_data": {"unique_id": "macro.fivetran_utils.union_data", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.542203}, "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/dbt_shopify_holistic_reporting/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": 1665703194.5439181}, "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/dbt_shopify_holistic_reporting/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": 1665703194.545324}, "macro.fivetran_utils.array_agg": {"unique_id": "macro.fivetran_utils.array_agg", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/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": 1665703194.545632}, "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/dbt_shopify_holistic_reporting/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": 1665703194.5457332}, "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/dbt_shopify_holistic_reporting/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": 1665703194.545829}, "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/dbt_shopify_holistic_reporting/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": 1665703194.546262}, "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/dbt_shopify_holistic_reporting/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": 1665703194.546696}}, "docs": {"dbt.__overview__": {"unique_id": "dbt.__overview__", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-bigquery/1.2.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"}, "shopify_source._fivetran_synced": {"unique_id": "shopify_source._fivetran_synced", "package_name": "shopify_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests/dbt_packages/shopify_source", "path": "docs.md", "original_file_path": "models/docs.md", "name": "_fivetran_synced", "block_contents": "The time when a record was last updated by Fivetran."}}, "exposures": {}, "metrics": {}, "selectors": {}, "disabled": {"seed.shopify_holistic_reporting_integration_tests.flow_snowflake": [{"raw_sql": "", "resource_type": "seed", "depends_on": {"macros": [], "nodes": []}, "config": {"enabled": false, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "seed", "persist_docs": {}, "quoting": {}, "column_types": {"_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "dbt_test", "fqn": ["shopify_holistic_reporting_integration_tests", "flow_snowflake"], "unique_id": "seed.shopify_holistic_reporting_integration_tests.flow_snowflake", "package_name": "shopify_holistic_reporting_integration_tests", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/dbt_shopify_holistic_reporting/integration_tests", "path": "flow_snowflake.csv", "original_file_path": "seeds/flow_snowflake.csv", "name": "flow_snowflake", "alias": "flow_snowflake", "checksum": {"name": "sha256", "checksum": "6bdc1fd92ee1a5bd818f2c9dc35cb33e0b4549d4d0b325569e0518843ce02711"}, "tags": [], "refs": [], "sources": [], "metrics": [], "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 in ('redshift', 'postgres') else false }}", "column_types": {"_fivetran_synced": "timestamp"}, "enabled": "{{ true if target.type == 'snowflake' else false }}"}, "created_at": 1665703194.814602, "config_call_dict": {}}]}, "parent_map": {"seed.shopify_holistic_reporting_integration_tests.shopify_order_data": [], "seed.shopify_holistic_reporting_integration_tests.shopify_order_line_refund_data": [], "seed.shopify_holistic_reporting_integration_tests.shopify_order_adjustment_data": [], "seed.shopify_holistic_reporting_integration_tests.shopify_product_variant_data": [], "seed.shopify_holistic_reporting_integration_tests.shopify_refund_data": [], "seed.shopify_holistic_reporting_integration_tests.shopify_transaction_data": [], "seed.shopify_holistic_reporting_integration_tests.flow": [], "seed.shopify_holistic_reporting_integration_tests.shopify_product_data": [], "seed.shopify_holistic_reporting_integration_tests.integration": [], "seed.shopify_holistic_reporting_integration_tests.metric": [], "seed.shopify_holistic_reporting_integration_tests.person": [], "seed.shopify_holistic_reporting_integration_tests.event": [], "seed.shopify_holistic_reporting_integration_tests.shopify_customer_data": [], "seed.shopify_holistic_reporting_integration_tests.shopify_order_line_data": [], "seed.shopify_holistic_reporting_integration_tests.campaign": [], "model.shopify_source.stg_shopify__order_line": ["model.shopify_source.stg_shopify__order_line_tmp", "model.shopify_source.stg_shopify__order_line_tmp"], "model.shopify_source.stg_shopify__refund": ["model.shopify_source.stg_shopify__refund_tmp", "model.shopify_source.stg_shopify__refund_tmp"], "model.shopify_source.stg_shopify__product": ["model.shopify_source.stg_shopify__product_tmp", "model.shopify_source.stg_shopify__product_tmp"], "model.shopify_source.stg_shopify__product_variant": ["model.shopify_source.stg_shopify__product_variant_tmp", "model.shopify_source.stg_shopify__product_variant_tmp"], "model.shopify_source.stg_shopify__order": ["model.shopify_source.stg_shopify__order_tmp", "model.shopify_source.stg_shopify__order_tmp"], "model.shopify_source.stg_shopify__transaction": ["model.shopify_source.stg_shopify__transaction_tmp", "model.shopify_source.stg_shopify__transaction_tmp"], "model.shopify_source.stg_shopify__order_adjustment": ["model.shopify_source.stg_shopify__order_adjustment_tmp", "model.shopify_source.stg_shopify__order_adjustment_tmp"], "model.shopify_source.stg_shopify__customer": ["model.shopify_source.stg_shopify__customer_tmp", "model.shopify_source.stg_shopify__customer_tmp"], "model.shopify_source.stg_shopify__order_line_refund": ["model.shopify_source.stg_shopify__order_line_refund_tmp", "model.shopify_source.stg_shopify__order_line_refund_tmp"], "model.shopify_source.stg_shopify__customer_tmp": ["seed.shopify_holistic_reporting_integration_tests.shopify_customer_data"], "model.shopify_source.stg_shopify__order_line_tmp": ["seed.shopify_holistic_reporting_integration_tests.shopify_order_line_data"], "model.shopify_source.stg_shopify__refund_tmp": ["seed.shopify_holistic_reporting_integration_tests.shopify_refund_data"], "model.shopify_source.stg_shopify__product_tmp": ["seed.shopify_holistic_reporting_integration_tests.shopify_product_data"], "model.shopify_source.stg_shopify__order_adjustment_tmp": ["seed.shopify_holistic_reporting_integration_tests.shopify_order_adjustment_data"], "model.shopify_source.stg_shopify__order_line_refund_tmp": ["seed.shopify_holistic_reporting_integration_tests.shopify_order_line_refund_data"], "model.shopify_source.stg_shopify__transaction_tmp": ["seed.shopify_holistic_reporting_integration_tests.shopify_transaction_data"], "model.shopify_source.stg_shopify__product_variant_tmp": ["seed.shopify_holistic_reporting_integration_tests.shopify_product_variant_data"], "model.shopify_source.stg_shopify__order_tmp": ["seed.shopify_holistic_reporting_integration_tests.shopify_order_data"], "model.klaviyo_source.stg_klaviyo__person": ["model.klaviyo_source.stg_klaviyo__person_tmp", "model.klaviyo_source.stg_klaviyo__person_tmp"], "model.klaviyo_source.stg_klaviyo__campaign": ["model.klaviyo_source.stg_klaviyo__campaign_tmp", "model.klaviyo_source.stg_klaviyo__campaign_tmp"], "model.klaviyo_source.stg_klaviyo__metric": ["model.klaviyo_source.stg_klaviyo__metric_tmp", "model.klaviyo_source.stg_klaviyo__metric_tmp"], "model.klaviyo_source.stg_klaviyo__integration": ["model.klaviyo_source.stg_klaviyo__integration_tmp", "model.klaviyo_source.stg_klaviyo__integration_tmp"], "model.klaviyo_source.stg_klaviyo__flow": ["model.klaviyo_source.stg_klaviyo__flow_tmp", "model.klaviyo_source.stg_klaviyo__flow_tmp"], "model.klaviyo_source.stg_klaviyo__event": ["model.klaviyo_source.stg_klaviyo__event_tmp", "model.klaviyo_source.stg_klaviyo__event_tmp"], "model.klaviyo_source.stg_klaviyo__event_tmp": ["seed.shopify_holistic_reporting_integration_tests.event"], "model.klaviyo_source.stg_klaviyo__metric_tmp": ["seed.shopify_holistic_reporting_integration_tests.metric"], "model.klaviyo_source.stg_klaviyo__campaign_tmp": ["seed.shopify_holistic_reporting_integration_tests.campaign"], "model.klaviyo_source.stg_klaviyo__integration_tmp": ["seed.shopify_holistic_reporting_integration_tests.integration"], "model.klaviyo_source.stg_klaviyo__flow_tmp": ["seed.shopify_holistic_reporting_integration_tests.flow"], "model.klaviyo_source.stg_klaviyo__person_tmp": ["seed.shopify_holistic_reporting_integration_tests.person"], "model.klaviyo.klaviyo__person_campaign_flow": ["model.klaviyo.klaviyo__events"], "model.klaviyo.klaviyo__persons": ["model.klaviyo.int_klaviyo__person_metrics", "model.klaviyo.int_klaviyo__person_metrics", "model.klaviyo_source.stg_klaviyo__person"], "model.klaviyo.klaviyo__flows": ["model.klaviyo.int_klaviyo__campaign_flow_metrics", "model.klaviyo.int_klaviyo__campaign_flow_metrics", "model.klaviyo_source.stg_klaviyo__flow"], "model.klaviyo.klaviyo__campaigns": ["model.klaviyo.int_klaviyo__campaign_flow_metrics", "model.klaviyo.int_klaviyo__campaign_flow_metrics", "model.klaviyo_source.stg_klaviyo__campaign"], "model.klaviyo.klaviyo__events": ["model.klaviyo.int_klaviyo__event_attribution", "model.klaviyo.int_klaviyo__event_attribution", "model.klaviyo_source.stg_klaviyo__campaign", "model.klaviyo_source.stg_klaviyo__flow", "model.klaviyo_source.stg_klaviyo__integration", "model.klaviyo_source.stg_klaviyo__metric", "model.klaviyo_source.stg_klaviyo__person"], "model.klaviyo.int_klaviyo__campaign_flow_metrics": ["model.klaviyo.klaviyo__person_campaign_flow", "model.klaviyo.klaviyo__person_campaign_flow"], "model.klaviyo.int_klaviyo__person_metrics": ["model.klaviyo.klaviyo__person_campaign_flow", "model.klaviyo.klaviyo__person_campaign_flow"], "model.klaviyo.int_klaviyo__event_attribution": ["model.klaviyo_source.stg_klaviyo__event"], "model.shopify.shopify__customer_cohorts": ["model.shopify.shopify__calendar", "model.shopify.shopify__customers", "model.shopify.shopify__orders"], "model.shopify.shopify__orders": ["model.shopify.shopify__orders__order_line_aggregates", "model.shopify.shopify__orders__order_refunds", "model.shopify_source.stg_shopify__order", "model.shopify_source.stg_shopify__order_adjustment"], "model.shopify.shopify__products": ["model.shopify.shopify__order_lines", "model.shopify.shopify__orders", "model.shopify_source.stg_shopify__product"], "model.shopify.shopify__transactions": ["model.shopify_source.stg_shopify__transaction"], "model.shopify.shopify__customers": ["model.shopify.shopify__customers__order_aggregates", "model.shopify_source.stg_shopify__customer", "model.shopify_source.stg_shopify__customer"], "model.shopify.shopify__order_lines": ["model.shopify.shopify__orders__order_refunds", "model.shopify_source.stg_shopify__order_line", "model.shopify_source.stg_shopify__product_variant"], "model.shopify.shopify__calendar": [], "model.shopify.shopify__orders__order_line_aggregates": ["model.shopify_source.stg_shopify__order_line"], "model.shopify.shopify__customers__order_aggregates": ["model.shopify.shopify__transactions", "model.shopify_source.stg_shopify__order"], "model.shopify.shopify__orders__order_refunds": ["model.shopify_source.stg_shopify__order_line_refund", "model.shopify_source.stg_shopify__refund"], "model.shopify_holistic_reporting.shopify_holistic_reporting__customer_enhanced": ["model.shopify_holistic_reporting.int__klaviyo_person_rollup", "model.shopify_holistic_reporting.int__klaviyo_person_rollup", "model.shopify_holistic_reporting.int__shopify_customer_rollup", "model.shopify_holistic_reporting.int__shopify_customer_rollup"], "model.shopify_holistic_reporting.shopify_holistic_reporting__orders_attribution": ["model.klaviyo.klaviyo__events", "model.shopify.shopify__orders", "model.shopify.shopify__orders"], "model.shopify_holistic_reporting.shopify_holistic_reporting__daily_customer_metrics": ["model.shopify_holistic_reporting.int__daily_klaviyo_user_metrics", "model.shopify_holistic_reporting.int__daily_klaviyo_user_metrics", "model.shopify_holistic_reporting.int__daily_shopify_customer_orders", "model.shopify_holistic_reporting.int__daily_shopify_customer_orders"], "model.shopify_holistic_reporting.int__daily_shopify_customer_orders": ["model.shopify.shopify__order_lines", "model.shopify_holistic_reporting.shopify_holistic_reporting__orders_attribution"], "model.shopify_holistic_reporting.int__shopify_customer_rollup": ["model.shopify.shopify__customers", "model.shopify.shopify__customers"], "model.shopify_holistic_reporting.int__daily_klaviyo_user_metrics": ["model.klaviyo.klaviyo__events"], "model.shopify_holistic_reporting.int__klaviyo_person_rollup": ["model.klaviyo.klaviyo__persons", "model.klaviyo.klaviyo__persons"], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__customer_customer_id__source_relation.1b2185db25": ["model.shopify_source.stg_shopify__customer"], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_line_refund_order_line_refund_id__source_relation.1877420c29": ["model.shopify_source.stg_shopify__order_line_refund"], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_line_order_line_id__source_relation.c2797e7a9c": ["model.shopify_source.stg_shopify__order_line"], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_order_id__source_relation.81d10381c1": ["model.shopify_source.stg_shopify__order"], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__product_product_id__source_relation.48b32ab6a2": ["model.shopify_source.stg_shopify__product"], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__product_variant_variant_id__source_relation.7506695ec0": ["model.shopify_source.stg_shopify__product_variant"], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__transaction_transaction_id__source_relation.d55a33652a": ["model.shopify_source.stg_shopify__transaction"], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__refund_refund_id__source_relation.cd4dbc2b35": ["model.shopify_source.stg_shopify__refund"], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_adjustment_order_adjustment_id__source_relation.00b7d10cb0": ["model.shopify_source.stg_shopify__order_adjustment"], "test.klaviyo_source.not_null_stg_klaviyo__campaign_campaign_id.5dfc47dc1d": ["model.klaviyo_source.stg_klaviyo__campaign"], "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__campaign_campaign_id__source_relation.59158488ff": ["model.klaviyo_source.stg_klaviyo__campaign"], "test.klaviyo_source.not_null_stg_klaviyo__event_event_id.7a09ac6ec1": ["model.klaviyo_source.stg_klaviyo__event"], "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__event_event_id__source_relation.3778c651d7": ["model.klaviyo_source.stg_klaviyo__event"], "test.klaviyo_source.not_null_stg_klaviyo__flow_flow_id.a00a897e42": ["model.klaviyo_source.stg_klaviyo__flow"], "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__flow_flow_id__source_relation.015215d481": ["model.klaviyo_source.stg_klaviyo__flow"], "test.klaviyo_source.not_null_stg_klaviyo__integration_integration_id.fe572c5f1b": ["model.klaviyo_source.stg_klaviyo__integration"], "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__integration_integration_id__source_relation.be6158ad21": ["model.klaviyo_source.stg_klaviyo__integration"], "test.klaviyo_source.not_null_stg_klaviyo__person_person_id.bd77ffc8aa": ["model.klaviyo_source.stg_klaviyo__person"], "test.klaviyo_source.unique_stg_klaviyo__person_email.dc3a98b014": ["model.klaviyo_source.stg_klaviyo__person"], "test.klaviyo_source.not_null_stg_klaviyo__person_email.c7094cfe27": ["model.klaviyo_source.stg_klaviyo__person"], "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__person_person_id__source_relation.33a4f9ca24": ["model.klaviyo_source.stg_klaviyo__person"], "test.klaviyo_source.not_null_stg_klaviyo__metric_metric_id.4759d62078": ["model.klaviyo_source.stg_klaviyo__metric"], "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__metric_metric_id__source_relation.e9f33c04e5": ["model.klaviyo_source.stg_klaviyo__metric"], "test.klaviyo.not_null_klaviyo__events_event_id.eada7340ba": ["model.klaviyo.klaviyo__events"], "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__events_event_id__source_relation.847dad4174": ["model.klaviyo.klaviyo__events"], "test.klaviyo.not_null_klaviyo__person_campaign_flow_person_id.e27d13b0f2": ["model.klaviyo.klaviyo__person_campaign_flow"], "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__person_campaign_flow_person_id__last_touch_campaign_id__last_touch_flow_id__variation_id__source_relation.30e1824079": ["model.klaviyo.klaviyo__person_campaign_flow"], "test.klaviyo.not_null_klaviyo__campaigns_campaign_variation_key.c4588cdadc": ["model.klaviyo.klaviyo__campaigns"], "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__campaigns_campaign_variation_key__source_relation.e5d14aee28": ["model.klaviyo.klaviyo__campaigns"], "test.klaviyo.not_null_klaviyo__flows_flow_variation_key.152c0d960b": ["model.klaviyo.klaviyo__flows"], "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__flows_flow_variation_key__source_relation.925d4118dc": ["model.klaviyo.klaviyo__flows"], "test.klaviyo.not_null_klaviyo__persons_person_id.624a41e75a": ["model.klaviyo.klaviyo__persons"], "test.klaviyo.unique_klaviyo__persons_email.a330194dd6": ["model.klaviyo.klaviyo__persons"], "test.klaviyo.not_null_klaviyo__persons_email.072e38d07d": ["model.klaviyo.klaviyo__persons"], "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__persons_person_id__source_relation.b223d703b3": ["model.klaviyo.klaviyo__persons"], "test.klaviyo.not_null_int_klaviyo__event_attribution_event_id.8d186152c4": ["model.klaviyo.int_klaviyo__event_attribution"], "test.klaviyo.dbt_utils_unique_combination_of_columns_int_klaviyo__event_attribution_event_id__source_relation.654b98ad2c": ["model.klaviyo.int_klaviyo__event_attribution"], "test.klaviyo.dbt_utils_unique_combination_of_columns_int_klaviyo__campaign_flow_metrics_variation_id__source_relation__last_touch_campaign_id__last_touch_flow_id.3ea05faa81": ["model.klaviyo.int_klaviyo__campaign_flow_metrics"], "test.klaviyo.not_null_int_klaviyo__person_metrics_person_id.2c0f4e5a67": ["model.klaviyo.int_klaviyo__person_metrics"], "test.klaviyo.dbt_utils_unique_combination_of_columns_int_klaviyo__person_metrics_person_id__source_relation.4897d57f8b": ["model.klaviyo.int_klaviyo__person_metrics"], "test.shopify.unique_shopify__customer_cohorts_customer_cohort_id.c5e4855c7a": ["model.shopify.shopify__customer_cohorts"], "test.shopify.not_null_shopify__customer_cohorts_customer_cohort_id.88e9c30925": ["model.shopify.shopify__customer_cohorts"], "test.shopify.dbt_utils_unique_combination_of_columns_shopify__orders_order_id__source_relation.b2d1eaf63d": ["model.shopify.shopify__orders"], "test.shopify.dbt_utils_unique_combination_of_columns_shopify__customers_customer_id__source_relation.88d3656469": ["model.shopify.shopify__customers"], "test.shopify.dbt_utils_unique_combination_of_columns_shopify__products_product_id__source_relation.f00b2fb95a": ["model.shopify.shopify__products"], "test.shopify.dbt_utils_unique_combination_of_columns_shopify__order_lines_order_line_id__source_relation.2483d5ef95": ["model.shopify.shopify__order_lines"], "test.shopify.dbt_utils_unique_combination_of_columns_shopify__transactions_transaction_id__source_relation.7341b755c0": ["model.shopify.shopify__transactions"], "test.shopify.dbt_utils_unique_combination_of_columns_shopify__customers__order_aggregates_customer_id__source_relation.5a5e85c8a9": ["model.shopify.shopify__customers__order_aggregates"], "test.shopify.dbt_utils_unique_combination_of_columns_shopify__orders__order_line_aggregates_order_id__source_relation.09d921d473": ["model.shopify.shopify__orders__order_line_aggregates"], "test.shopify_holistic_reporting.dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__customer_enhanced_email__klaviyo_source_relation__shopify_source_relation.2ea9394109": ["model.shopify_holistic_reporting.shopify_holistic_reporting__customer_enhanced"], "test.shopify_holistic_reporting.dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__daily_customer_metrics_date_day__email__klaviyo_source_relation__shopify_source_relation__campaign_id__flow_id__variation_id.0489c190fd": ["model.shopify_holistic_reporting.shopify_holistic_reporting__daily_customer_metrics"], "test.shopify_holistic_reporting.dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__orders_attribution_order_id__shopify_source_relation.0eb46743bb": ["model.shopify_holistic_reporting.shopify_holistic_reporting__orders_attribution"], "source.shopify_source.shopify.order": [], "source.shopify_source.shopify.customer": [], "source.shopify_source.shopify.order_line": [], "source.shopify_source.shopify.order_line_refund": [], "source.shopify_source.shopify.product": [], "source.shopify_source.shopify.product_variant": [], "source.shopify_source.shopify.transaction": [], "source.shopify_source.shopify.refund": [], "source.shopify_source.shopify.order_adjustment": [], "source.klaviyo_source.klaviyo.campaign": [], "source.klaviyo_source.klaviyo.event": [], "source.klaviyo_source.klaviyo.flow": [], "source.klaviyo_source.klaviyo.integration": [], "source.klaviyo_source.klaviyo.person": [], "source.klaviyo_source.klaviyo.metric": []}, "child_map": {"seed.shopify_holistic_reporting_integration_tests.shopify_order_data": ["model.shopify_source.stg_shopify__order_tmp"], "seed.shopify_holistic_reporting_integration_tests.shopify_order_line_refund_data": ["model.shopify_source.stg_shopify__order_line_refund_tmp"], "seed.shopify_holistic_reporting_integration_tests.shopify_order_adjustment_data": ["model.shopify_source.stg_shopify__order_adjustment_tmp"], "seed.shopify_holistic_reporting_integration_tests.shopify_product_variant_data": ["model.shopify_source.stg_shopify__product_variant_tmp"], "seed.shopify_holistic_reporting_integration_tests.shopify_refund_data": ["model.shopify_source.stg_shopify__refund_tmp"], "seed.shopify_holistic_reporting_integration_tests.shopify_transaction_data": ["model.shopify_source.stg_shopify__transaction_tmp"], "seed.shopify_holistic_reporting_integration_tests.flow": ["model.klaviyo_source.stg_klaviyo__flow_tmp"], "seed.shopify_holistic_reporting_integration_tests.shopify_product_data": ["model.shopify_source.stg_shopify__product_tmp"], "seed.shopify_holistic_reporting_integration_tests.integration": ["model.klaviyo_source.stg_klaviyo__integration_tmp"], "seed.shopify_holistic_reporting_integration_tests.metric": ["model.klaviyo_source.stg_klaviyo__metric_tmp"], "seed.shopify_holistic_reporting_integration_tests.person": ["model.klaviyo_source.stg_klaviyo__person_tmp"], "seed.shopify_holistic_reporting_integration_tests.event": ["model.klaviyo_source.stg_klaviyo__event_tmp"], "seed.shopify_holistic_reporting_integration_tests.shopify_customer_data": ["model.shopify_source.stg_shopify__customer_tmp"], "seed.shopify_holistic_reporting_integration_tests.shopify_order_line_data": ["model.shopify_source.stg_shopify__order_line_tmp"], "seed.shopify_holistic_reporting_integration_tests.campaign": ["model.klaviyo_source.stg_klaviyo__campaign_tmp"], "model.shopify_source.stg_shopify__order_line": ["model.shopify.shopify__order_lines", "model.shopify.shopify__orders__order_line_aggregates", "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_line_order_line_id__source_relation.c2797e7a9c"], "model.shopify_source.stg_shopify__refund": ["model.shopify.shopify__orders__order_refunds", "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__refund_refund_id__source_relation.cd4dbc2b35"], "model.shopify_source.stg_shopify__product": ["model.shopify.shopify__products", "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__product_product_id__source_relation.48b32ab6a2"], "model.shopify_source.stg_shopify__product_variant": ["model.shopify.shopify__order_lines", "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__product_variant_variant_id__source_relation.7506695ec0"], "model.shopify_source.stg_shopify__order": ["model.shopify.shopify__customers__order_aggregates", "model.shopify.shopify__orders", "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_order_id__source_relation.81d10381c1"], "model.shopify_source.stg_shopify__transaction": ["model.shopify.shopify__transactions", "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__transaction_transaction_id__source_relation.d55a33652a"], "model.shopify_source.stg_shopify__order_adjustment": ["model.shopify.shopify__orders", "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_adjustment_order_adjustment_id__source_relation.00b7d10cb0"], "model.shopify_source.stg_shopify__customer": ["model.shopify.shopify__customers", "model.shopify.shopify__customers", "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__customer_customer_id__source_relation.1b2185db25"], "model.shopify_source.stg_shopify__order_line_refund": ["model.shopify.shopify__orders__order_refunds", "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_line_refund_order_line_refund_id__source_relation.1877420c29"], "model.shopify_source.stg_shopify__customer_tmp": ["model.shopify_source.stg_shopify__customer", "model.shopify_source.stg_shopify__customer"], "model.shopify_source.stg_shopify__order_line_tmp": ["model.shopify_source.stg_shopify__order_line", "model.shopify_source.stg_shopify__order_line"], "model.shopify_source.stg_shopify__refund_tmp": ["model.shopify_source.stg_shopify__refund", "model.shopify_source.stg_shopify__refund"], "model.shopify_source.stg_shopify__product_tmp": ["model.shopify_source.stg_shopify__product", "model.shopify_source.stg_shopify__product"], "model.shopify_source.stg_shopify__order_adjustment_tmp": ["model.shopify_source.stg_shopify__order_adjustment", "model.shopify_source.stg_shopify__order_adjustment"], "model.shopify_source.stg_shopify__order_line_refund_tmp": ["model.shopify_source.stg_shopify__order_line_refund", "model.shopify_source.stg_shopify__order_line_refund"], "model.shopify_source.stg_shopify__transaction_tmp": ["model.shopify_source.stg_shopify__transaction", "model.shopify_source.stg_shopify__transaction"], "model.shopify_source.stg_shopify__product_variant_tmp": ["model.shopify_source.stg_shopify__product_variant", "model.shopify_source.stg_shopify__product_variant"], "model.shopify_source.stg_shopify__order_tmp": ["model.shopify_source.stg_shopify__order", "model.shopify_source.stg_shopify__order"], "model.klaviyo_source.stg_klaviyo__person": ["model.klaviyo.klaviyo__events", "model.klaviyo.klaviyo__persons", "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__person_person_id__source_relation.33a4f9ca24", "test.klaviyo_source.not_null_stg_klaviyo__person_email.c7094cfe27", "test.klaviyo_source.not_null_stg_klaviyo__person_person_id.bd77ffc8aa", "test.klaviyo_source.unique_stg_klaviyo__person_email.dc3a98b014"], "model.klaviyo_source.stg_klaviyo__campaign": ["model.klaviyo.klaviyo__campaigns", "model.klaviyo.klaviyo__events", "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__campaign_campaign_id__source_relation.59158488ff", "test.klaviyo_source.not_null_stg_klaviyo__campaign_campaign_id.5dfc47dc1d"], "model.klaviyo_source.stg_klaviyo__metric": ["model.klaviyo.klaviyo__events", "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__metric_metric_id__source_relation.e9f33c04e5", "test.klaviyo_source.not_null_stg_klaviyo__metric_metric_id.4759d62078"], "model.klaviyo_source.stg_klaviyo__integration": ["model.klaviyo.klaviyo__events", "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__integration_integration_id__source_relation.be6158ad21", "test.klaviyo_source.not_null_stg_klaviyo__integration_integration_id.fe572c5f1b"], "model.klaviyo_source.stg_klaviyo__flow": ["model.klaviyo.klaviyo__events", "model.klaviyo.klaviyo__flows", "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__flow_flow_id__source_relation.015215d481", "test.klaviyo_source.not_null_stg_klaviyo__flow_flow_id.a00a897e42"], "model.klaviyo_source.stg_klaviyo__event": ["model.klaviyo.int_klaviyo__event_attribution", "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__event_event_id__source_relation.3778c651d7", "test.klaviyo_source.not_null_stg_klaviyo__event_event_id.7a09ac6ec1"], "model.klaviyo_source.stg_klaviyo__event_tmp": ["model.klaviyo_source.stg_klaviyo__event", "model.klaviyo_source.stg_klaviyo__event"], "model.klaviyo_source.stg_klaviyo__metric_tmp": ["model.klaviyo_source.stg_klaviyo__metric", "model.klaviyo_source.stg_klaviyo__metric"], "model.klaviyo_source.stg_klaviyo__campaign_tmp": ["model.klaviyo_source.stg_klaviyo__campaign", "model.klaviyo_source.stg_klaviyo__campaign"], "model.klaviyo_source.stg_klaviyo__integration_tmp": ["model.klaviyo_source.stg_klaviyo__integration", "model.klaviyo_source.stg_klaviyo__integration"], "model.klaviyo_source.stg_klaviyo__flow_tmp": ["model.klaviyo_source.stg_klaviyo__flow", "model.klaviyo_source.stg_klaviyo__flow"], "model.klaviyo_source.stg_klaviyo__person_tmp": ["model.klaviyo_source.stg_klaviyo__person", "model.klaviyo_source.stg_klaviyo__person"], "model.klaviyo.klaviyo__person_campaign_flow": ["model.klaviyo.int_klaviyo__campaign_flow_metrics", "model.klaviyo.int_klaviyo__campaign_flow_metrics", "model.klaviyo.int_klaviyo__person_metrics", "model.klaviyo.int_klaviyo__person_metrics", "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__person_campaign_flow_person_id__last_touch_campaign_id__last_touch_flow_id__variation_id__source_relation.30e1824079", "test.klaviyo.not_null_klaviyo__person_campaign_flow_person_id.e27d13b0f2"], "model.klaviyo.klaviyo__persons": ["model.shopify_holistic_reporting.int__klaviyo_person_rollup", "model.shopify_holistic_reporting.int__klaviyo_person_rollup", "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__persons_person_id__source_relation.b223d703b3", "test.klaviyo.not_null_klaviyo__persons_email.072e38d07d", "test.klaviyo.not_null_klaviyo__persons_person_id.624a41e75a", "test.klaviyo.unique_klaviyo__persons_email.a330194dd6"], "model.klaviyo.klaviyo__flows": ["test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__flows_flow_variation_key__source_relation.925d4118dc", "test.klaviyo.not_null_klaviyo__flows_flow_variation_key.152c0d960b"], "model.klaviyo.klaviyo__campaigns": ["test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__campaigns_campaign_variation_key__source_relation.e5d14aee28", "test.klaviyo.not_null_klaviyo__campaigns_campaign_variation_key.c4588cdadc"], "model.klaviyo.klaviyo__events": ["model.klaviyo.klaviyo__person_campaign_flow", "model.shopify_holistic_reporting.int__daily_klaviyo_user_metrics", "model.shopify_holistic_reporting.shopify_holistic_reporting__orders_attribution", "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__events_event_id__source_relation.847dad4174", "test.klaviyo.not_null_klaviyo__events_event_id.eada7340ba"], "model.klaviyo.int_klaviyo__campaign_flow_metrics": ["model.klaviyo.klaviyo__campaigns", "model.klaviyo.klaviyo__campaigns", "model.klaviyo.klaviyo__flows", "model.klaviyo.klaviyo__flows", "test.klaviyo.dbt_utils_unique_combination_of_columns_int_klaviyo__campaign_flow_metrics_variation_id__source_relation__last_touch_campaign_id__last_touch_flow_id.3ea05faa81"], "model.klaviyo.int_klaviyo__person_metrics": ["model.klaviyo.klaviyo__persons", "model.klaviyo.klaviyo__persons", "test.klaviyo.dbt_utils_unique_combination_of_columns_int_klaviyo__person_metrics_person_id__source_relation.4897d57f8b", "test.klaviyo.not_null_int_klaviyo__person_metrics_person_id.2c0f4e5a67"], "model.klaviyo.int_klaviyo__event_attribution": ["model.klaviyo.klaviyo__events", "model.klaviyo.klaviyo__events", "test.klaviyo.dbt_utils_unique_combination_of_columns_int_klaviyo__event_attribution_event_id__source_relation.654b98ad2c", "test.klaviyo.not_null_int_klaviyo__event_attribution_event_id.8d186152c4"], "model.shopify.shopify__customer_cohorts": ["test.shopify.not_null_shopify__customer_cohorts_customer_cohort_id.88e9c30925", "test.shopify.unique_shopify__customer_cohorts_customer_cohort_id.c5e4855c7a"], "model.shopify.shopify__orders": ["model.shopify.shopify__customer_cohorts", "model.shopify.shopify__products", "model.shopify_holistic_reporting.shopify_holistic_reporting__orders_attribution", "model.shopify_holistic_reporting.shopify_holistic_reporting__orders_attribution", "test.shopify.dbt_utils_unique_combination_of_columns_shopify__orders_order_id__source_relation.b2d1eaf63d"], "model.shopify.shopify__products": ["test.shopify.dbt_utils_unique_combination_of_columns_shopify__products_product_id__source_relation.f00b2fb95a"], "model.shopify.shopify__transactions": ["model.shopify.shopify__customers__order_aggregates", "test.shopify.dbt_utils_unique_combination_of_columns_shopify__transactions_transaction_id__source_relation.7341b755c0"], "model.shopify.shopify__customers": ["model.shopify.shopify__customer_cohorts", "model.shopify_holistic_reporting.int__shopify_customer_rollup", "model.shopify_holistic_reporting.int__shopify_customer_rollup", "test.shopify.dbt_utils_unique_combination_of_columns_shopify__customers_customer_id__source_relation.88d3656469"], "model.shopify.shopify__order_lines": ["model.shopify.shopify__products", "model.shopify_holistic_reporting.int__daily_shopify_customer_orders", "test.shopify.dbt_utils_unique_combination_of_columns_shopify__order_lines_order_line_id__source_relation.2483d5ef95"], "model.shopify.shopify__calendar": ["model.shopify.shopify__customer_cohorts"], "model.shopify.shopify__orders__order_line_aggregates": ["model.shopify.shopify__orders", "test.shopify.dbt_utils_unique_combination_of_columns_shopify__orders__order_line_aggregates_order_id__source_relation.09d921d473"], "model.shopify.shopify__customers__order_aggregates": ["model.shopify.shopify__customers", "test.shopify.dbt_utils_unique_combination_of_columns_shopify__customers__order_aggregates_customer_id__source_relation.5a5e85c8a9"], "model.shopify.shopify__orders__order_refunds": ["model.shopify.shopify__order_lines", "model.shopify.shopify__orders"], "model.shopify_holistic_reporting.shopify_holistic_reporting__customer_enhanced": ["test.shopify_holistic_reporting.dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__customer_enhanced_email__klaviyo_source_relation__shopify_source_relation.2ea9394109"], "model.shopify_holistic_reporting.shopify_holistic_reporting__orders_attribution": ["model.shopify_holistic_reporting.int__daily_shopify_customer_orders", "test.shopify_holistic_reporting.dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__orders_attribution_order_id__shopify_source_relation.0eb46743bb"], "model.shopify_holistic_reporting.shopify_holistic_reporting__daily_customer_metrics": ["test.shopify_holistic_reporting.dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__daily_customer_metrics_date_day__email__klaviyo_source_relation__shopify_source_relation__campaign_id__flow_id__variation_id.0489c190fd"], "model.shopify_holistic_reporting.int__daily_shopify_customer_orders": ["model.shopify_holistic_reporting.shopify_holistic_reporting__daily_customer_metrics", "model.shopify_holistic_reporting.shopify_holistic_reporting__daily_customer_metrics"], "model.shopify_holistic_reporting.int__shopify_customer_rollup": ["model.shopify_holistic_reporting.shopify_holistic_reporting__customer_enhanced", "model.shopify_holistic_reporting.shopify_holistic_reporting__customer_enhanced"], "model.shopify_holistic_reporting.int__daily_klaviyo_user_metrics": ["model.shopify_holistic_reporting.shopify_holistic_reporting__daily_customer_metrics", "model.shopify_holistic_reporting.shopify_holistic_reporting__daily_customer_metrics"], "model.shopify_holistic_reporting.int__klaviyo_person_rollup": ["model.shopify_holistic_reporting.shopify_holistic_reporting__customer_enhanced", "model.shopify_holistic_reporting.shopify_holistic_reporting__customer_enhanced"], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__customer_customer_id__source_relation.1b2185db25": [], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_line_refund_order_line_refund_id__source_relation.1877420c29": [], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_line_order_line_id__source_relation.c2797e7a9c": [], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_order_id__source_relation.81d10381c1": [], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__product_product_id__source_relation.48b32ab6a2": [], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__product_variant_variant_id__source_relation.7506695ec0": [], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__transaction_transaction_id__source_relation.d55a33652a": [], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__refund_refund_id__source_relation.cd4dbc2b35": [], "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_adjustment_order_adjustment_id__source_relation.00b7d10cb0": [], "test.klaviyo_source.not_null_stg_klaviyo__campaign_campaign_id.5dfc47dc1d": [], "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__campaign_campaign_id__source_relation.59158488ff": [], "test.klaviyo_source.not_null_stg_klaviyo__event_event_id.7a09ac6ec1": [], "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__event_event_id__source_relation.3778c651d7": [], "test.klaviyo_source.not_null_stg_klaviyo__flow_flow_id.a00a897e42": [], "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__flow_flow_id__source_relation.015215d481": [], "test.klaviyo_source.not_null_stg_klaviyo__integration_integration_id.fe572c5f1b": [], "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__integration_integration_id__source_relation.be6158ad21": [], "test.klaviyo_source.not_null_stg_klaviyo__person_person_id.bd77ffc8aa": [], "test.klaviyo_source.unique_stg_klaviyo__person_email.dc3a98b014": [], "test.klaviyo_source.not_null_stg_klaviyo__person_email.c7094cfe27": [], "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__person_person_id__source_relation.33a4f9ca24": [], "test.klaviyo_source.not_null_stg_klaviyo__metric_metric_id.4759d62078": [], "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__metric_metric_id__source_relation.e9f33c04e5": [], "test.klaviyo.not_null_klaviyo__events_event_id.eada7340ba": [], "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__events_event_id__source_relation.847dad4174": [], "test.klaviyo.not_null_klaviyo__person_campaign_flow_person_id.e27d13b0f2": [], "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__person_campaign_flow_person_id__last_touch_campaign_id__last_touch_flow_id__variation_id__source_relation.30e1824079": [], "test.klaviyo.not_null_klaviyo__campaigns_campaign_variation_key.c4588cdadc": [], "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__campaigns_campaign_variation_key__source_relation.e5d14aee28": [], "test.klaviyo.not_null_klaviyo__flows_flow_variation_key.152c0d960b": [], "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__flows_flow_variation_key__source_relation.925d4118dc": [], "test.klaviyo.not_null_klaviyo__persons_person_id.624a41e75a": [], "test.klaviyo.unique_klaviyo__persons_email.a330194dd6": [], "test.klaviyo.not_null_klaviyo__persons_email.072e38d07d": [], "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__persons_person_id__source_relation.b223d703b3": [], "test.klaviyo.not_null_int_klaviyo__event_attribution_event_id.8d186152c4": [], "test.klaviyo.dbt_utils_unique_combination_of_columns_int_klaviyo__event_attribution_event_id__source_relation.654b98ad2c": [], "test.klaviyo.dbt_utils_unique_combination_of_columns_int_klaviyo__campaign_flow_metrics_variation_id__source_relation__last_touch_campaign_id__last_touch_flow_id.3ea05faa81": [], "test.klaviyo.not_null_int_klaviyo__person_metrics_person_id.2c0f4e5a67": [], "test.klaviyo.dbt_utils_unique_combination_of_columns_int_klaviyo__person_metrics_person_id__source_relation.4897d57f8b": [], "test.shopify.unique_shopify__customer_cohorts_customer_cohort_id.c5e4855c7a": [], "test.shopify.not_null_shopify__customer_cohorts_customer_cohort_id.88e9c30925": [], "test.shopify.dbt_utils_unique_combination_of_columns_shopify__orders_order_id__source_relation.b2d1eaf63d": [], "test.shopify.dbt_utils_unique_combination_of_columns_shopify__customers_customer_id__source_relation.88d3656469": [], "test.shopify.dbt_utils_unique_combination_of_columns_shopify__products_product_id__source_relation.f00b2fb95a": [], "test.shopify.dbt_utils_unique_combination_of_columns_shopify__order_lines_order_line_id__source_relation.2483d5ef95": [], "test.shopify.dbt_utils_unique_combination_of_columns_shopify__transactions_transaction_id__source_relation.7341b755c0": [], "test.shopify.dbt_utils_unique_combination_of_columns_shopify__customers__order_aggregates_customer_id__source_relation.5a5e85c8a9": [], "test.shopify.dbt_utils_unique_combination_of_columns_shopify__orders__order_line_aggregates_order_id__source_relation.09d921d473": [], "test.shopify_holistic_reporting.dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__customer_enhanced_email__klaviyo_source_relation__shopify_source_relation.2ea9394109": [], "test.shopify_holistic_reporting.dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__daily_customer_metrics_date_day__email__klaviyo_source_relation__shopify_source_relation__campaign_id__flow_id__variation_id.0489c190fd": [], "test.shopify_holistic_reporting.dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__orders_attribution_order_id__shopify_source_relation.0eb46743bb": [], "source.shopify_source.shopify.order": [], "source.shopify_source.shopify.customer": [], "source.shopify_source.shopify.order_line": [], "source.shopify_source.shopify.order_line_refund": [], "source.shopify_source.shopify.product": [], "source.shopify_source.shopify.product_variant": [], "source.shopify_source.shopify.transaction": [], "source.shopify_source.shopify.refund": [], "source.shopify_source.shopify.order_adjustment": [], "source.klaviyo_source.klaviyo.campaign": [], "source.klaviyo_source.klaviyo.event": [], "source.klaviyo_source.klaviyo.flow": [], "source.klaviyo_source.klaviyo.integration": [], "source.klaviyo_source.klaviyo.person": [], "source.klaviyo_source.klaviyo.metric": []}} \ No newline at end of file diff --git a/docs/partial_parse.msgpack b/docs/partial_parse.msgpack index b87e3ac30f4c5d81bb8490d074637e9431a69b0f..5dcea590aad59add7a75a1cfdc07fdbc2edfa30c 100644 GIT binary patch delta 20492 zcmaKUcU+Xm^M4Mwd+vFjyXU#1i%79zLBZaFXe?2qpfMU_EZ8;HSfbG=npk231Q}2i z(8OL))Ul!@u{Zo!v4JIOG>W8XG?w4&JSGy7@9&TJdf0vMw4I%uo!!goX`P{{Q&x2s zd3FE3V|$MsFlKCGxObiGi7qSM%vD-vkAISw8}5t;V~dXo_o+Gk&HmR+(}nE6KY8q9mPiN{xNb*VI> zW1H)YfP6-@X@9gdqIZX3!j4;4WiaAqr)i}TTi!>OVaGEVy}-o}3esF9h(G5D%--15 z*DP=Sd**{j1ZBH?e8WcM&aSx2lCO;_i zr(2cmE2kTm#&y2X*Hhrmtz@Z>-|tr%@kw!rl@RAGp@~`J{Ij<{ty3CN;njC4AMInyy=@4egEv+R>NG^ zRMYK^h)5#V5gwKEEQyJ%Xkw~cqF<;`34J3?UIMhQ-scSJ_>L*&U!00sn+jcM_3fLO zxIf$z@3b|IE`_OtsU1u&g*5v%ZsmE-D=UXiT4@CM)I)HHDQL6NJ@9 zn_AfgTyMzsAr>E%@B}2nfntiUuBwdWavzlF6HJ3}OT4M9MF0kV!UTRyHa+7NlU~v|>%S+zg1x5I!Z-)B z8wr;QhN)5RUeNn1lLceRE z+`gf^vAj!L9$PN}9-VP10}b1`_+X8CF1tKSpj_IywDBVAMk-}D3ZSH^qOT&4^0Z>~CkG*MnYr2&V(bqVwpfUz+^99Cdlj*FXG zLWE66T$(BbxOJ*3lAzu7H+?{TUikS@eCg%7*;*P<7~qORh97_bi3QzM z-PP(=8g#do>nst4Z-3u~L9<%9&MjdtgVj6jUHx@I=@>6z{OlvwOnYfcZ3nyh2MJ0; znghvG4U=ZO9yGl{;rKbOUyCU}Ide0!@|o{C$E8I7-Z!LsL_$-`sv?z$eEHS|^_ntsZ~4 z{aKP0p?W~xOSkF}>$Ipas-@Y2@(Z_4JTmb^9=WKxIcVDs^VJgLaI>5F0Au!iW>800 za}b`jnw1hV7?K9s&9@o)V}=0@QV815X-;0JF#CWboaCEb%iK#axz?mAGeNnw`OtsUch)yAWcuwk7zU|d zhYVtBY)<)a`7bp!pJdWwiwx4onwd*`m|;7B=Wd~pRo^Uww$P+Pe1utt;gM!1&o0vJ zc4Nk0%`zCrwI;@u-ZjtsZ^l2jGXpc;(MT{3ga?z%GG=u!$No2dbhLRE;|q4-i_Yd{ z|BWJ>eaWcj&0y44b8RTHnr-mjyCihfRobjKe`sF*pN50;Zf4T1m${ly$BEBBHa8UN z6nIuK)Tz~r)LGcaJncUj1F7Q!`T(;7C-pOr5+W2tX-JCw`u|}UIqWZX^M<}=*Eh^y zx9<~TSAK-Ke@S*R_srg)ZJ}L!-zalm!Q^`SK%O=bZU+IA%)U5gjQOjQJl_lo`^-E} z=yZLnv8-Xk1Y+Vk$vpqRnH>4TyqlT)==o-ffTl>peX-`YB^ToxCe3G0=LVbJ%NdcJPm}2u-!Ta`aOAX#dzYyFFh?4{xxk6gDpNdxQyjT0ln+}$lxDPj;O9HXYnYFN5cQf(AK*R{(*#SQ`s`N z6w(Wt)U)_wV0BB9aEN=6Mydnvg%aKwW_el~kA&}N7SPXU8bZ{lOVB%wEh9@q4bm%` zS-LXm?AO6;cvHf6YiSu%ji}t;ITlZiuwE~BLp{oZaF40^ZR>KA@HIj z95>CftPv;9`#F@z#96A~S8)~)b(H)2USLqFCEQ04$W6(w3a3X{0-)(Ur;5|EEMqvI z{Jt`rzUZiofd?#OB?0^)GQXzaR1tHITP)%bdjG(O5OvNHg2iVocWnZ5C^5eRbUJ4V zz?au8l~};T*Ye97P47Oi>}N_x-y)U*1shY{Rc!dXrJ7lcK4#6YXh3H@v)to^^mq>_ zNOiA_X%?x9I2_+UF$xdcq{_ml=Wc!sn_NjAA6=@>4co5L1}D|PF-|Fl8+Pr3gmF?J z)bf;6XrHOr(cvi#4Y1JQUlR5~@w<`-?5{1^Fuk_)otXQ1ZLUK?eJKFHsxMs>B<6Ma z9b+0v8~OYFZSY8T1i;Xyk{z2hm8NiOw;SO6!&(y`MMyowtj+7|0@o!+HT?V?slN*; zHgCYO{OW>PMU-1h*Ll#;ixAs^Bn$h)DnZA#k_9wP(ID`WCSh1x>Ap!28g`e($7by% zR~|Luju=$~a>7Uz`if%mpO(w73)gEof}vL@QfPiI5o*^>3J_|Wp?4?A9Xmuz51HiH ziEw>~@-}|aS^Ag~C{WdLWG`tAGnqLwKOBk`M>QC^kOoD^NOgG7?B9gx z0%5q~&_REj6pCx(1 z{$Y{>Vh2f{IAox7iy0;y$ZseZR)DObk{8Y!BKh(3LLL+;jxfADOd2Ov z9V$-!R65UceQOu3)$prv(w9tc&D{J@o zwFSR&@E}(5f}M(N$CI&AE)O}d0Lau{@G6V+e(@EJJNTv4&rOWW3nxQodXe6*Zdxta zeYR9xtoV7q6uudP8xy31LizcUs}Rcz7l2e*m}h>a1PI(Gy@SseOLpPP^K0yb=3W$B z>ZePC6k;$xGM{{n1oMQcUXCEVxJEi8*5&+;Tg0reOcn8JmQ>CmS|?XU@}wVy3Fm(~ z=C4Jd{~)y$ip-z!2kVZL4@wicVYU-!u?0YxCaM=Sv)EKfZ$#eP?ufKO%>Dd18=%%P zsWRMKsA?E?Od8Fj;;IQDy&+vt(mj)4ny^(k9@!DEoRT`R9E)~SKq_t^ z2f(E))d|<^HXDTLG&1Z1Nde1d)g4Y9B(M8si`*Li+^qV+Wj{^DFV0AVnB?Mi6r}`7 zS_E!rJ170dLS#n5<^o#K4f9lQ*muXS!rlT}j6?EBlbm;?DR}>)G=Pz7-+C?XWm4^n z%aV!3+OQ%&*qHIkMMA7NyAAhUl^(F(o7*E1@5#Vzp0D{sy$&`qco#*1XEY%=;D&UR zCETIsR{>Kl*>Si@ks)BXO@obTBvHg&l4zKT2FNZHKr(Jg-GsNz&%H|n!jDP8;Hc@a zz{zp12Otfoz)TMu$**OEm>2gcD2y0LYqQ*T-HPk)Ny+Rwr&Wl3NTDg<6A_voN@IB3 z`OY-y9GYr|Imo)IRfB-mBw4jEhlah2r8aDmOI;zl$m)svewA{W+QVUR`h`>$GoDBl z8S#q;Ja{VkU?Kg(4ZqFC=YLA|`1|oitp8G~$=^@C7sXl2Y@2RzvDb`_*!cKH5lO>UgeOnm{v_+ zYXURw^nAC$xLFUY6$|~W?RjjMXqdKyC<-uS1X!&=U3PfcMJdsSUzf9b3*#>Mpdi1J zLFPfA)g6xoTE7x&aY5gaEEo={Y)xjm13ZLG0Z`bGj7|Za%LEGseFv|aSnC*pbmVMF z!O$AkDPm(^@WtL~ z5UkEugqS7{AAH=}T9t=i90Q%&T7$4T}x3J(L2KTZK6u!3LmqCylV+}FrM1d|rVR_jN zPsCVviPf>-=?D4MAoDY;ANWN$9JphEb%Q9T#dRADksmw!;aW3?4X9PajL)nE76)}r z*s*k1yUWg$#$&L#$oRL0!)UOU$5&w8B77j;_fyz> z$XW%jW>|Ssj4$^w6t;1M0X1l_p@Uu7{*85wSPAh}JA>n0N_Z}=v3dyV@uBnZ(Rynu z?rabTeYTM6yuZbIf;(HRgP85sT5K}0i7Gg3yS1VyEymA&3Xcw2!|~u@5??f&ngGE! ztrhX;aqCv$i19bgu<O2Le#t8DTut1&OI@t~q& z(M@Z#NKzB3wWdhx^rZzp@{rYrgC1Ge3JWBJ7eK}@v~sC|YQ(=<=WuJ?Q&2pb_IS$f z>@Yl0R^j<*Nynha*8bez&<|pIkt>F2iUfBfByT9N+Y}hqi^82~L*K_%e-pWmqTutV z);l69B}DvSxX$NY95!@3w|=FG)9m1;yAaC+6L=p zN#${nLmn%%Px!hn7W&A%s1xFLK=Y3%_1fzvPhj-IKG3I}Tn6q0QVKy|y}5N!4`cZj z2Ff|ykUC#T6oSXf%i$vPPB@W_rke6J(Yes82_(Ej_F^3)dQq&T1n8xRiVG|3$4&L* zY=%{tEKE@m=QfnT6tlOm*4yaO)R1Fg?GG?MLjIJ2b%#P^SGg>fZ!S0FhWbkcgG%_- zJF<-%8ukHGSGf#sY$ey{hQ@bPp21qnc5;{JR62zAIl4R$kaN z8``&%D`P}E`F)nBYT-f6(WI1g|3I%?8Udtm`f-Nc}rRBwsjiLk^toDto|)zT_H#y-B8kW4eT+K7MVxk*gth zjl%~@|_t z!Ng?Z0LnnKUeak{=wSIFgT9OxA)*RADy02pSrrO@5rZ7=;CEe_jgiCTr3{+m2hNdl zc^H2|(`ZwWRV+7BUdUZ>1yDFz4uo0xw1d;vd~Quz2e~zf*50wQCoUN)pJhuf8wlY( zvL`(4O}tL7Br+Kj9RUJrd;~Oca+BT_0{P5tp-?sh;pMlSJ&eNcIxL6Xj!$r|Mwokfh^#n#8t!F?W|7%`~Ip zsXQXYskT?{z?3=%;N*RBDED?-!NPjNgIw7Pu{Tv?BZKFwY1RCkD|0rN*!?tm{UASM z^?L0`gI>r%`A=3arU!I7Ec?TTqvYrtThqqg4_CO{mo)~&ce!}ENR>rEQ<#$=Uv5C8(c@u{>&Oak_5g~E>VYqgVT<(&)%`P@7 z6@NM>>r8giLL=r>+v(IW=%Rd^$$b$HH808Duq28miN35%cy8?+C@z-iFn5K@SbAI1 zTf_mNIN$~kKB6={>IwyjVeP47%1dbyME)#CL$9mypTdRaXJD^u^4rWczL~+5@Maj* zMU`PvS5<=`FWOZ`HnS>%5O;WQzb>CL=`?)dj;(*YH57lO`of4; zM1I91`}Cv}4&}ru>`8L4SZ1I$GwkV2vQ15pU&|JFTmD1Hw)iSU-jRJ^a++pG`m(c> zOF1bsNG2ycB?#zG=9v1^>nY4=g;Vd#)!8)5FT6HQ?+3C4Pd<=eu~6SO!~Ye@WtiHk z3;3v5=EOd6Z8fz0CI@i)CS$>1i^nooL=v;MV(mYSrJlI`D$-izy*qJt6?D9i8}OjL zBk{dg@<{$Z7-MMuiVi(^&7^R-Iq?W7;-So_z?BKyv2eeyp(sC*w3zF>+r)oA0?O@C=eEjEL`_fg1F() zCgCd;fEw)3tUdj+F@>CamcQ~l_dn5aTA;F7d?$r;fKiJbwO~U%f<;j60;iN$`f*qF zwlM0TwHzqXB(Rv)fo)Tj880>77q7p`Ox(3AXMlR&!-^G*o(U!@G}hRAXg4 zf4|oha+gpxL1iJ{9Fn4s!uoM^j9>+V>L@m>6{!qoY?qTr`{OP#p-H{2L#Kn*K%ClI z>BF6UH^S)3nlC@fi?W>ge=z}y2PodS^h1UBgd|v*V{98y84d-{ zeWd&>{68smGAKQj2KeG*1(|7DMTpOEL;^KvDD_d=a_iD!$jhKaeRyA`fa$N8ik${3 z?A}Q$r@uKB;I+X@1s<}x4AjV^A#@Zs=6Bs5k=vKS^x+DhCXzPphoDhP8T1&X4CWzQ z#=c3fF!fVoog{7h1eV4r<+0p21sJxIifW%J)qxr`csZRS((u8u4e~ytcQaNMUamvg^-BBQ^5^|7s@KPP|g2dE#3y>lg)hmI9uLL5#Yzgpo*iY0VdGN822=&L!_^IBBKngrLl(It zW4%nW4k@#!%!fJ9=~p^A7p_n&T%`Ux7QEg$D77^s^$r!Z7nPfWQ7aX$mn{mK0U0YD zHQ?iqX{Vg3Qi*5XN-6`-{#c$3Bfe2OqiwD7kj`uS^a4Q~=B;x0aX*Mk1N^z3HnP7v@bXTj8;@yl8Fr19Di}5Ff;hVZQy*C^aBQ^X z4phUoL)bp$81~((bYrbLmlsDiKL|KT1%&8%CaW=!tLRjAVP{zM!F^bqt5ip-i%(#S z_fT_S&uFO(ME^kPPR2oUxWA(>93D+EkUGku}MakBoRB+zQFxu8QPz(dhCRds=xRY8H#ewV=8wftCfkWE|`Bg*<^bV!Wh70+z8)OOJ3sr}RGB$Kul^@R1 zUk+C<2wTE{B+xq8eeh&`wVcoxhMt7X*;JgJy1;2cMEDuGfWY(@zReMR%|F&{&5Cz~H`YNm2U2F8cNzURastcA*DCz$lT!9Z)NT7Z&$ zDtI;`e&SDD*HS$v91y98 zm5(TpEWzm`PJ=vBTKJNwKq%yWtX2m9AIS_BfT8>jjQOBY^^eL^h_?q-SeD*-~8PvKOjF?)uD%in5?KCd2b^AK^1^B( zRW47!w^RyCc2)q}FGQXy^X?@qjic2cSm~9Cuz8GH5$230;iv{wR>)VuYU7`9z(dTrotuaLnG$u&=i9@ESP7_X?p+>N< z-%&Amrs{)dW~zJ>2Zs&{Zx4c^^w*A#oxfI}GWN&}jGn7DWf_mv$AtMRCw_2_u0g~S zii}sMbLWNaaC(JY0qJ&TDK}hd3e8tL{b6dlQ^HM))IqG#l^m+SvE&U>)IRA@<&ReiKO|1lU<3l%c7IHOq z$`fg-jA`lWc?R9B3LR=`mEqAT0`Y|jyKnDWnkVLEssowR!_J2JFHfSA5+kWLX|My) zCXfyjCkT+SQGO}r^U)$Oty04cczk_Yf>|G`Dip3Hi!&TstX4Ia;g>^Va>5KKRZm$^ z6*sL>Ycc!Ze#e{ZR6a$(%bM6}qdHh@Rw-}w+$RE>ALeJNTxLsg$;X6j^@tdiVtxmE zZ&x{gObNMY%tyVQYC{n-Q)+b(^Wl#R_Nv}u^Gd1notTdbcznNlM>tVRqnpN5l*MyD zsDT#2ukBA%L5#I~qIOK>>$Q|IRMO~4emN>$b%UCFWxkwphp=>~9lD7>r{t;ku~v@! zu8HbDDdVB}0jCE9J+iCVC{IllbDlEcSGsh2> zo}CcNB0ryil;<@dD9(Mhju0JP7Nh`atYY6e&mC zQm2c(ASL5>x+vq2>V8|T#^zf78#ceIw&d?`?&6$#YE9<4HhM24+@dM~)gYYWaIC=M zTe1UP9;j{%Sig|Ue9@Xeh7=jwL(0aj5T0wVAc_>^m~nO|rWC6knex`&;5;hVFuF2+ zqhc5>X(vYiW~{Z8?FkUM+gT0@9*aVY7*AU)oeLkUeDX=zF&{=hRm)=kr)n(E+kRp$ zg0h2K$8BZsh}Fg$V#@h5#&UlXB-&F|8*h>+ z`7R>p`Qs70jSmtjmjmI^4ricIPT{O7qKGz$xCy!jPtK7@3mi5++ou#(L)yq1vBj>R zf#O{hV8u}jsnWqk>XiHM3p@H_hL4TY-INEu!f^DIQJl!K{K*x<{KzpK(X^37dD&h- zTv^+7;Z_gZL1dI-0Fi)!?1V+V>8(t$r!5#VYEUSB8DNWJ?!`YQ-zG9)!8Tu@Mopxs zDmdoYb#BAGRcxvW9TjXLVkM{inhH}Z+UhYBV=LOeXX3x#q8t0aJsgy(e-WG7L_`q_ z?aZQ05aTmg%9D-IXOFY4!I43%42w3u+G`U${SJ$3*tQ5UQyq)Mc32iZ&vDxDR4rSv zSmdc?qM>*{#n|rk=^mR}HK1E41@aQeI-+e=)y6gxO@1I z)?}aeTN^H$+Gr++Gbs9w{IA_(+Ll6_P~}R5e|YpARh%ZYwmpW+ZEeMZXOsGPx}EJE zCe`!^$33|AJLQy3JJ>kONsZ`+J)>+~5=d=xR?sdFlb`)XHsd3k1C$SJf1vulZ56BW z9+k>_+A2Ve7X&(W!A=pdlg)|*@)t9n+Hv;ln1-}7Z)3xDDH7q#AH93n_~f11Z7Vnr z*vevRPum=pZRESgQjYzE9D)i`REn|KSS!lh2Gh z(R)zI0j48bPfGK`)|(Uz9Bt#&HFbUyp+O~_IL5|7H8rja z$D!mgBnv$q;5;%lVF;W)<_v;I(FU)Z>amYUHWqhf8Nc}AAc6K~mQ zvt-u`{F2N`l$*2Rzu5^fGi(9aWrl48FPv;uczHSaVjfAzN$SR?&3PtcXlgn6&m#~w~Yg@4<`=r^gTAB4rz=)gGJFy^^W5$;|dUM?iUZ;)A0q$AG? zdB25w#Tb(bA1<_g!iwg;psW2(*>+Dz&$2mjMv|?unBv9dhJY!>7KXn81v;9z#g$%B z^?-0#wA5CgA=TeD4hZoJ?PiG0q}B3tDcz>@$+X1?y%*Qr3-*<^#@kogYLyWbW`4WJ z;H00Ug|;J?uw;#zLV?8#nqfk&t)`p6C5IX~%s*flXYsOQ7<||^S)2kFujxXW1Pij` zgpCU#i#N>_;hR>?VRDQSdA3(#juvm-Pi}m@ve^svoU!T9=RDa@q-01b*<@y#qafwM z`@}hPaqecwz2)?Qh%2-)_+7Da&291FBXIqhEeMZavyEY$P9#Hc4LZE_xM?hf#TR!` zNUwugw{6!LaIGPnE_9Z|toybx%;ZOUiFudq7^1J)+(5fd`DxTc+ekLxy(5r&gR-RC z#kNU|eMFBn?vpP&exnJeR=Vi_&Gv%3eqAc$tAuo6b%`5Z{2@fEDekH?IMvJ^2pyl% z0R2y!mr!VlrASCxcF`o-T<9=g((8k6xS1D4+C8?-v2zt^iK8ni!ED{&q|09e-fT|$ zpEzaiz{Re1SE1(;?^!~2AIN*=CgFa`K22z}B;YMWfkz5GD*9Blvv)2D+R9jbX1DXN z50+G>*D&{;HNc|THQev8^R3;Isxu(yo?Bfk=V=dRYIW{F*aPR=Kn)tq?Mz!`(+AFQ z?B!_>HsKRrd$9;tOCmyPE%H1!Ek|zbA4FiP7&<|yiPW}AxWke*-_y1^O|=KWq+s%5 zf*lYQfF&K;(k*`T7ItrZS`F=1RM~2wP^Y=$(gc++rQB5NICUCqqp&K@>VduG9 z60_`Y8)9Ki`zR(p~6+=lkB`~)98KqsaSguei!?iZ|&7$!=R&efV+&5U)sA0UrTHBAtiRx?Cw+zJf&G6 zKacLV-#EpnB$}=HX~Hbji_d4;zZY7jwG^&V77BBzyIlI~Zey@mV@L^Ls)%iAog2K4 zZ4i`3#v8nl=7lo;51C5uWrp!7+&YoET*Vxw4eX4g78x#>Hl!!ZjB1K~kXWQ?qtjuk z-JObxY4&qs5u{BnrV?84ID0uEhX+u*22?}y`&%}8wRcvtL(V)~63)x8ZxCLbHfJ?y z&3i=QH?+bguclFNw2uDP?u+T)+P`Hf6Mkh~^K_as0ybeGlhdL2cdB!oUT5zuPC04I z1NVY+r?V`bKJENGHf{4m@s`UMZ)V$nU_vKG8;8t;+wEt>FGGoEckx7YX&ZW?ea>D6zdC2r_Hno3 zcNgptOte!HUAo%+!T-T)?}fO*Diz-^*}IGNvvk6Kc44@GgKFReDtXMOgDPD;->|0& z<1d}u0;me-56^ww4J1+;%j;jSV#~q(6URMBYP+yzF#S)Yk~?qiVk~>vLluUD4_xjoU6_ z;?f&$L1eIdZJgw#{UO%e(tE*wZTJhyX!lvP=M9XdAXXGE_19Vn2U+IX9q&}u_?I2a zDqRICZ1~~QYFZsZc3GXi5S4AOZItcF<(ZyDUt_H-!@;3C~ot z3b3iVyCSFsVsu;WF%Rz_DkjAf;@{I8IPyKsomsT?DM@=Mrf1KcP&sSrN1XM_c!|z z?mMJ)7D8rBIt-msJ!=0Q?IrAaLTe*jD`Q$)s_l|QYu>#U-uAwXiJsu(HJYnw=4`1Vr7d>Q@;N2X}#%trCm;#)o`kjXlj5_aP!)^r{U(9Eu`@rZ3lQ*8YuFYlG2Fi2yP}u+Cmd4eI zjI6CNx{@9Y^Y73y>U~FB$FS^niOz3)=*I|DX>EK@TgHvs&T(VMwYq{Yf7aG>F3zB1nr2DesCKr$2iRc7@qNM6HtznP&qZ#)2kLUaY*u0Rt` z_dMQ)S5O;IPG+qO7++1_$kaZb3Aw9CF<~887D@wx!gPxHp*q(!Gkb?(aV?#9h0K_< z5IkNZcl<{8#FMr4DNLb%FYHuLpRSViGpD|MZT*Ll`rF()e}`eX=&mFX7oF)*+Z#88 zzuS?D(fmj)GwzNUQWdOGdPRsl?x8{uQeg3Gtsi2NNi7VL5lC~Px7E4Go0&qThQBBD z!F%-Eik$a!E?s3Ver60Hxm74=K?{UP%S#1D$vyPD*tWO6NO)}K zo>{`dePDkjvc<{W9x4+2E_2);XiP)iWX%oM?De4Mf&F#9Kgc{#M+i{M@EsA>;ft=c zA_(bgIMBvHdMmMFGtb5fWoRz{Z8VR9}FSI^PkW6~Y2u&zi;kBbS*qu--Q>JbW?=8*9oCXv6g zg($4hYxOvquA(@-4G(=^7D#%?OTqvV^fKV$Ph7H4_h8Tm(+!Xakf1HnZCIG3^UI^< z-R?ow5swh~Zak%IKNnFJ69zinz;vd9UG!r84h~Jx2Z*^^-fuoccTvL8yjYJFS<><` zeMGsE!X##<>q*RL%5j4cubqd-Jm~pY`d=EnY0Frv|BUlj=v|raw2_AL|UkUG=|c$^A;}e12pOZy;yxcYUUba6sg4L^5tJwV4tICZ^Z}e^@$?(EuUMk$B=N^ zCcUDFN6X{)P&~>#KtvxM@sQ!wX59j_H|ch~wplM=c@ldVYa`<%EvEa~dJ(rK{VBAk zACYX+=knC1-x9GY2v_dZ*K$MlSm8R=aOz&Yi8w+mKed1*(hgE=xOYHz73H<%w;_im z0^50VF6S{LC@jCf{58`Px;sujVXVdF586ZSDZLs{g9h{rMuN0kG(+qQqSA+VPwAIg zyodBdRdNF?IIY)bX@39Ra5Tpy4=-$ePUm9r@)yoo=Pu~(!~*uwmWWb;3W|Fl5B|k^N%E4jDP3_mKYi75g;^?-y3DU)|6F0|$hM)@{(YVQAkv z4eEu~?pLRFqy7Wx*Bj8FKQJO~bD5hUb zy?TB7^{ZX4VZ*SP1~K*O4r~+_Ub|n+z`hN`!s^#=G_XP4Is+So*TWg(Jwq)2{6F~N TpOZa(g;HC~j{@IV&-nib$W;i5 delta 22510 zcma*Pd3=r6^EmF_+Dr+M@<%;VlF#(6(x;p1_}*0Bmc(S9E?&b+vbkH=XZzm#!ea&{yo zL8bF|oNf5fD(I(NWcoigo?YpDUdP-fA2Ck*83Je7kByUe)glVDCzZCm*E>2r)%3wmE!D3YVR*>96dFO=lAdURi*P;pTV6+GtT_ojB`E1TPeSW96iJl`~|ln^Sklgq8mO1s1jNIElLN)lrpW?ns*d zM}WZkp&lEg_4?|SBQUG1cR!31NDCG)tLIO-8|)Z&rg;@GzdrxGzfi6ATgapI7|1+@pdLyerA-c+k)-RhL#4E`z7nxH^pLz2(AA~F_L3uQ~~8y zswI$7ZtpNX{a7)w5 zu`z3`WvIv#?RVW{X^Hi7l{+>P!wBJ?9qNQK3e2;#sT>7}OC(yeEg=rVd+PQv#%sLX z@@G}>dcI{@Bx3KWq7edbS?l!@G|RO{Ve~te!&0STVKR1oWQh`XdFsS^K>%n)Bv^cz z{=2%z5{?s*T&i+1c?T)Hw(PNdAQrZfx`XAXIB8Zn9unR;MoAydD62oWq*smt%t}6L z+0S@cCm4?sX_uR+8}X_#fIa~SR7R$^Y%H*24;V= zfDJ~Pn*IoR{fW%H3l{D1WEx_Afk~!u;z%YV?2csj3*?j0|M%8~V}G#h66@9Jugw@& zVksqFl})exo8^WtP4ApF5B();1o>2D(_3oR!NTJ^w>RAvgRR2jD?_OfVeP;iVopL? zzBL%&CA$Yo#@ZdYGReBfzjExp?X6GN5b9j{8M5lyQt-+kYjU_ghFm$ypEIo=2&;8X4E$%&bclT08iCi|u$~XB6d8zL4F0^q8c|(Putu?K{DY$JnIvIHiJqcwa` zsF)G4i>;Cq>*J&i;IVjn<9z0d3M1qAvy9g_-DkmLmi%sepCm(wcYiaZH0|ZH!BquT ze-8EujTEfBN3r^AJ|&h)anSR+&wLSSE&7>~ZJ+1!hP6@@Ad~<&wbsXlFD&rsBsRA0 zM_v&!F6(?lhpgFtwXrPQXK&^D{STFE%YC{tm4jT9bA1WNpZAHuX)ApiSAh(YFddn~ z(Pica+jN7^Msk_B|2xKE{3=@jmVNAVrxq#jblwd%vd`B(3w$4s2ZR@f$FKQpZ%fEM zK2edvs)bfn#6KF_;zI=2yLFgri|)3P$4lD^C-%4bio)?3$Xb?^ zhgHU&@{?^NW6zmu3Q+P32{7}9?T;#wXb&>>O2I{UZQqF?e`1Rhl9t$; zLwu<%0>8Xxdr$?6NNaPBWn;EWo|rSpZz0Zhyauykp@^ zTXKoF+S35&fRFZ>Z`LKhVJh!E30TB;4esonrArJ`L ziOJ*blZ48h;cqh(@+MFy*eBT+RY3rg#O{~vdsvFYaqI)QWvacy0vfwyV%v|RgW7U1Pm zNDfz(#lrsY*)thuejrewrNLhx+k-Lm1ADzHvXyZ3CJJn!_sT7%xhdrQk?6c#W#td& z*{8Gen{rL%^-oCo)t}fGKVAxdFpiRg4?tQalA>!$u4#R8dvV5m%q~`e{o;Q6VIe@* z_Qj?Eu7f1NvcvX)kM~)BBmt%gckMdbd8`|2u)kLyp{FS6w8Rtd>d;Cg|* zHeNVuuR@VmA^xZ5?Ymk0Jg(51Ls|g^?8$>A;?;If_Dd>Lna%mqyR(cTuZ&_3w# z;)i3a@9p_Q{EVV$rr`_;l+2*fcQx81kDBFxmiUBxPY{3l^AeOQ&m5dP@`2QczDlQj;qIjT_Vh2twu z$2vw_C2=;zftn+_DsHvT?RdzDr&ENo&0(~^BLeUHJN&AE4TK$pt%Ducn8f`iroFlZ zIwH{<=2-A}5&_Vyz9SUdM?01a=kBqmqI7ph5Q(O-j=!ov0*ORdyTJbGkf}p?1JdC^ zl4D#IuuTEpO>y+HQTywe8n7YB(Hs^wCjPx!I9{wrbbDIw;+dh2JaMk-X?qiliH>@> zb%NuB=qU8G--F0}cM|5!a(pP7n?0rK&^_NBi*sIgfVk7>>1>ZtOB_i-5`D`%3hIJq zq9YtqU-hW?%0|bF{sOK>7Sv)m*4XQq#&oo1kZ{D2h{r#7JY<0DX~;O~sDt-TIDTf< zMhF&u>u9G60`7JN(NO%YBOE(ia~$OPo}RFHiEkV>yXB}S?9Awb#`$#bqYgvCcybpPQ8?~^yLyBWS%3|<3rTRF@DT#cZ^>+&m zJgQU=I3ge0kYl?G zYC>@*DHO93r6o-8^wTR!-Qh4QS#n`ovNVfd9V7*eG)cl=8cT!8U9$eZ zyaBs6m$I2$(TIXL@WjfsP)U`F8S}@f;B6~KAR)OJaD665wUMIv`SS+}VQZ9i&x^St>z^ z#T|icF6Gl8&ierOpie?RQc$0tR&u^xst^+?`P|{r*#6=^-_Q;~UAM zdvaVF6it(4RvjaINRf>GAePYMaC}ecL)N@}bwQFaWEf=hmmHAWN7CWOd_~8By`|a$ z;{mnh*n}B2w+7=aZWp*4kw)c>Nu#kAw*lV;62FpcX%-ZvNolyRuT)p)_Q19plKM-{ zVD|}{eru!TpVMEeg(Le**97MW%AJCy|8h29Po|{dqCrv(N(WgF+&>CiB;w`4(o1$5 z0YYHuXekm}Tiw)m86jO@(ZZvJ4@Ka#(X@^NE&3xcV&w$b94qTE?v$oNNUU5F3S(uG zdWy6Xu1=ELz`*fRiI`ny#lM;b!@>kv$0ZY_)=Vfalvf|>Pm)|aCrR^Js74ndf3nmF z_E=;W(w8XWvL3X02{Ik-hIn+E=~xdsD3~x?>P6w3^%o_w z2)hR4d_dN`x={*q3*c|{ckYsYWPu(GgRQzd-n4r}s#F`?pGgvoD5YgO(43a3>wakn zrtOu2d6~+-GaY^AK4~g1O!-YSw!$E!p-LNgvP*^BM9CLB9h5c;l!w+gAn~vi12^ZZ zIvCH9`?owS4HL)@C8;3BTvg5AEo1%>>4rtX<@ptUhF89nx(hiUy2gnd5dh>^Dtxz5 z^+4C7s)pl_OE2-br&MrZSGS?-r1Tpz2(}f}hNb03I5a=120+9RRfW~%hChrts`}&D zeCY?C7Ipj|Ir{CAWt{c3WMO#iXA7d>>|`Qa_b1hW2Klmz2fm?b6hhW1Ale)ZU)i)k z$PHH%xY0@ShX*z-z;y9j`4k|L$7K!5kI4<;fn5uSH9nex+P9Jq8>jvfQ|y$sgd>at zWE?*nRv>-FOcLf6#F|Xr_>PiN#1Kt~t;@*9tqW-y!NyV&&3f1@il(uidTqB1`J*eQ zAx*2v_Gwu_T?BU$jO$Me8@}0a;^ty0M>y5PCs%;?N6Jqh4x!MCJgZA^&`-DFq93If z*b1HJQoc+7REdIwShs>PKTBRFnK2Z)|K#+?gEyo@Oz3$BY`G(a;D$R=EuJwn5$=>w zo-U^U81TYmEW0N)=I;^PvB~dJ1O6WM11$Md3dUFelpeBOCQgN|e@Wr^_Ft5GgpiY4 zVa7vA^r*5P&TwO5xg=g(WIcTKJuI>~^F%N_oF~J6hcgtnIh?aZ{5;%eg>7-p02r9; z)bUx(IfGFSdQI9)9lm43f$vKS+Dp>4azfoi0c?>r$Y3 zIT>HTQ1Nv})Ad!>!!Iz=-#MNQ^yT;D35<3p(CLdO1D&sl*n4=c8MDWcVa^=peEu83 zIUM>$5@$-%IuiT!JoN3noMdOR8HSWi6>Lz`Ig73ovmW0097zd__%8G51cSyngYitV zbC5tQOWg*!3#yWS2bt=2Q z80Wm?T+Zs=T`JU##8y+BK}_c2fM+L`hcGjZKeb%EtEKs`7nS@6Vm|B&$^nvE>+_mt;=gv>4Aj~T7 zHXF8{AV;Ti!-e#9ilNWHh2C?{Iubcb`Ix^bV_6!zYvg=KcIB1Xx{r)oa>y)pn0~>y!uqA+*rgC;FzL4Nn960`la}>|nP#=qKIo}fjTK+B^ zdea>!Lczc-cbzFhtMW|`On;c(slp$S{NZI?44oT{Z&~Eem`;HOmfGZcym@oIiK}d~ zxLMCCzq}kio+U-&a7muTTK(?8VqF$(<{cMvqVLDui)N881Ik35Bk9@T(M ze>oU_4y5wpO0v@zW_Nc>&?!}NnL#?+SDuS+1js2ApWbTK9{f*WQ=R$0f!#LspTK4u z3hc>@V~-cg)xnd&a+0XJt2O- zh4|ELDmP`o28ZBN8|O5aH3qz01bbV`!ML@hoWg+jCW3c_5)5O~WCaN761!`F>G}eO zsjcOUtkuRA&^cX>!Pe<=50+xf7tp^K#m&~X^0Q29+g>w&MLsEe#o?mb7uVrz7dae{ zbdg2U@m4!|334Y>B1s!4%kXgqvFtUFD!9cNvhXc$wKGGoRS)?S{x0ZXCLNyJsh6y7 zjO-=*(2=d$6&U@TyDoO=BRg1-;+xQ_pF0|-^^-*ad#n9?Lo9zB5P)jlsT4C~2g)~j z=++%GSF|2Lxnj=qav!Gf>i{$22}%WeZI=@!pVlifX4o)!8KeGXf#TtE1k5`_TQ}uK z74CFbWMG_JtIM%-ggllfmYsvli%MNwGfMtOkhe&aAY(cu>%V&uX8u}Pg}&1j88?lS z2l06DOW+wwxt+(!Csj;)QLe>9(Rn!HWqG=wYl$5Qo~g9Fwy83|HnKc13XB=Fn${We za&g|X^v=Q6Ub&}mB+HO*@b@`#N5&k!5Zlg^A6Xm(AM@&N_9^W9hWv%aO^~sBwvEXg zJaJruA;U}evauZ z*e#g(ugFzw`0Q%=X$EG$0>$Iq{%~WdN>%(?`FB=jS;xJmDp%IamzdDneWLh zs~fWe;lOugv4wgqYq#LL@5_x@hIbviOw@ZH$dNqyehUoxNERiP*Rm~)Wq>AmWDB7% zlESxrgt2xzw*QZ@a*t3s+wm9~>-IKT9KF1j14p6sXH$MCn(Vg02S-Tev`@^Cv>fh_ zGk41IEX1)Gmfs)l?2?^$a+lnWDSY)327V_0%_`>4K~v7U`{W0#;@5s~Xa;SiTMkjM zQk|t@{{yl(zIhaw4JXzB)4Ti!E(I*c?Gkp(<+P=|D}ANDHX*+QkL5fQ;(5R z1pbfju;{qpE4eNMu73@MCn;HeCu=UGuNn-!wa(0mad{qH4CzS4&bLhRPGc(6bEiLds%clyjIU_Q_A(PQFWbvO)eL*S^Y}z+)r{a&j_50w6vmx z_FAidiLRS+IDdzI!R~@>Z_76<1`S3G{m)5YYG6H7n(#=xm&bTo=cP*iwppR)#1 z6QeiN%2@{!mQs<#<6I=o4ps*9(5k0l!air1==xODjiI3mXGQCpZ+I`jtZ?Nn&)qN& za-)<87*IM5q9=beYo>MNnRrM|+OwROiqIOOLH*qNY=W_mlH z#tBKv%c2sn?q2>+C2;Xgw}I5m;T^!buM9Sic1D|ubAg}GMB!b?dg#7c14S%z`y&}< zFsh?kT8U*|=kBf8Mm?8do5;Qt%-V|m6vV%6R93%I3Ho*Kt&v=ygq?VAbus`MLchMhfnYiW(4rG+#yOY zo)&r?qFzvf(fq3S5r~6WTBG9gPEz~ zz!!&Ui%|Y_wYIXzR5cT!LV!eW){Yu5pOyBu$ zRj_^I2h3QjOl3lget->Y-Swe=589ntMbfEk%z7mV=J$~2!MN4R)9BiuJjYADq!TQ8 zn}+yoLSLbbzbpkQVgJtG5QQIYRI>T|t=B~57zpz>(P4v|rQNcr{d{FIxdp*OSl;!M zp=h&G4`y|se$U+?+G2j*Tp{DzBZ1CX0XQp9`IHI1dka1rE>T_)onCTz6^;&IxcNeLJ}JfTcrygNxa@k~W5{Ha4p7khP45Lav;WnU|GnCag?W4-grd;DEK4Km+x zhhgbOQzDzsm1T?Hu7is%DU$+;zwLgLg1XC=z8wsO@4MaHU)k8YR1wz}cE4P>`@Xvo z1M&6yiY|i1UQ=3D-219*b2==`Ki2@Y>gpqL7PIgC1&vzjMw`Gpl2?#KcoBHHj(SmOZvT267;Rla zm>;i(3BBwW_h4y)$~&q3+afGaQmZq(pbXL*snyMrn08eK7H?K1Xth_9uumhEGrGMf z4bnHeLZB!`m5_?({*3zl*KqJxR}dUqBD=6vGnF0Re*Fs|Mm4}_p*o=GO^TlI#EKvB z;}+_9;Y9XdjzDe+Ek2i5TT@j&!`XlP3(gi0o3sUV!9?X%8PENL8kUA{C^l%L`ZM1@ z(_lieD-^QDw6Sef(OdP}?{}x3>xOP>Bn)p$#V#GgsYGj`NstjjUC@k$9y^|BU%~#b zk#P1YH3DXIp%QM^d(`|L6tC)7@|4Q;r~N?*bnm3r7316<^+4K1%4qA(lQsvtsJG$d zx3tMXXLYCGTozqW2hz*b8aTF#TAxLH)Ed`!Q(N(O`7_X6QbVw;yDHlIUWer>raz-{ z#pUpE!r2~b3{VZ|0{uD77xET*{Bd6|^@LE~VGD-LdOl%hNx1)e8c&>Mvq4s&BEkIr z>fd;}k6N2&N^e2&LQgDGUC70%!+8WU`>SYYxSyx~HdT-nqLC4F7<5f`V94|8SB&bK0^Kv!SRhmvh7VEiiDKWO zFWLngO6b@WH_Y@PhbIt{{-mWPigr+bk=@+8c-&d`b0KaM}#D6-yMq z5Q=B2LHNx~HJPPI4yRu=@I*pMPK9@4k1X{sp4;d&c7H`}$rtI)wqP zi_I{i!9b5-6b9c^+TJ;zfM>5gM9E7dNPZVrTxK~|1O z!n}p5=%srdPp%;Np{uSCY_?c^leu&{hi8_mo%uWCQ;b@!a#`x=ejS#q^wb8r6`^~R zWEVNLsO?TKQ)OJ6qh4V7sRZsCqsQR7mFg;H&?l_I%5;WRhcl>e-+}}YX(14?j*LfB z$-g$!CZ()XpJcZEvxRXJ%^~V0GAkAHa#cPLIR;+FYj3MupgTsyLeUye1U!43_5q5; zmSR(JjC$$-SQ?VLi$9%0L)jUCsy&TJ4V!I=qf}4o!=vZ}Lm^Ty`f1(DmgRD#a$Gij9lX*{}dY$3#jwE=LN2`J7 zKT{(`FUax95V}L7--qDSaO7ci5VN~Hjr|*GY0b4Rl!4qh6q_AY-(ss31698Nte_3= zA6Gkz>u<-y(*zeQ2>Ba`^_cVOtAe6bjWW|ao*HO;t8%R<(LtZql6uX5xa>Idk~&F{ zm7MqJ`dusr`dv}EB9)XokhV*%4Rq~fE_BW%a_Uuu>TR*al6D&x6suh7OTI5c=6kLh zK!SRuCk@T-Eg*sMuGCPI+KMB9RsB| zG|JpJDVNfLp6{hY;O<6`8%u7hiUs@LQpLrrR|;PZ>DxVFP;{F@pQq9-AsxbQt6Y{! zk?XKyiMm?U2vVIhQ2L>#HX6UF8uO_)1G?X*s2%qQT>-TJLp2y$KM}n5$yXkHPVqSQ z4Qlo+xUV+kp`_)e(Z>BvUjEbHs<=V-N{terb(vZl2%uwHnL3)Gjeo#xy}k1Po9++^FGNiLm2L*T(lfJY z7mLg>qF~T&UBdDJZ87ueRSuRbw6sfVYSn?Dw6s^W8vG;f4;Q>zyy8+Yq=pvG!uGxZ zSs_|ubLv`$&LLXUoQelSwbz(i-|7Vo&1g^~|Dju7r9_dt!J~kH2@F2PNd1mM<_=FI zlOj)Qu$U6p%pIQUm>s1JWHASvg3wx87}Z4D3I@E?4Wf3D+|xhxXm}<@D;1G1&G-nG z&eKBSxp++jg8sKNdKk8`UXo^kOLGks8^miX*$d~i151)t7w*KFx1eUy!SEzaTqS#@ zc_U$6vK9slo02CC+^KnRYqG|9Tv|-oLkQ6|h1k(Ju^U1Q<^I^CV7HVCPgwed*r@3- zNz)3fWgUf((a@@;<`7sBzzPpK<>z1+#<$S8@gc2f51FZCKWt5`|Eu2ecT*;rnyLk{ ze5<>d=`XLf7REVaO(~@uPT-Mks6c97KpxobD9I&CB_!DIyprptbC!g{TjaN?Z8fg% zq+DMd&|c%LCw;gQihq}*fjU3bZx?%+doQ`5e+NxmLVBgmKUM7d)El2?j`b%tihU$SX*TT-zoq@#mA|b z`+K>@f4ac=20e6HNfAl_T7zZe0Rk7ZR%&e+VObB**J{oAS`dx3T2wGCpYxiw7cv)+ zsP2;!^14hrSK>9nt0qrDb)6xmOltYc@EuUvuENqgpu+xsSquvz{1S^_8|3hKkQ2v-DTq`K(N z^&5|j-<{Wn3PZ?sr$FYPw3_`cX<@?Za-(S?yC=iAOGJYb`x&9E-0b>ZDApYTxaoUy z$C1+wak>ZvcZ8t%Ev1)?AGL8JVC43Yw2M43GT9|#;m;aZFLLKhp=5oy{xhv6y-}-? zbBWgR`dI!Z?!Ko5u)>)|Li&0@ z_fckBM8tq%a-Q+0wvma9N)sAI!oizl-u%Bb!<>!_KpINL87 z_VzN3OjnG4NJyE?=}4}4_9Qrsspl%<)yUrgOX6KgFsmLB7Ka3&LjvXIQ?#ym@vc~2 z*Gsd7H`F!_PUV;f$(hEnbj3eFeu}FB4_KTTe_meFVxHB4RL&1SDrAil2E^(i5XodJGg=&x2;RZ(NDQn>0+?` zx8xY>|DgEVI+P3$|E!A(d!=)%8NS{65G#UKtho3Qjptm=gxX5i6R_?N3YQxLT>RpP zit9h9S@C8+S3HkD6Tk;-EF9qK!GLF5!MY`SFlJ=BxaFesYhxCm9}ISJ6{HMQ(Px-T zydm)_FZ9HS5v~J_Iq|y4n-S1@G|AI`1j+Mn@!ld!8p^TPQ-`qKA zZ?Z$~L+XwkoankLl7uqnXE-z26$z8u(AydMdWsPioHlo%anoD|J~_>m!6tlj3{{Ps znpLu%11BZ*4JJ0nbNLb{!M^(SpSAg!x8gcK8$zZ zHJq@}j4I{uVx(>F6&C3$dfH<1tqYrTXo={(+EFHSAp*#asV$X78Nc;PIu_CRBIftQ zUTnR_#nM9IcLv1TAWB(tRjJa!ERtp};b@6FlxqA@CJADK2>$hD4 znd5^rab60?XWnzYDEO#UDU@!aGyb(rt|MZG8j~f8t!T{O>^dR(cIuN?aQ!ZqEYwrS zdrTW9YQ6?UJWt1ke`3uK1Pt}Pu0Hgl(yQjSgVgUW!8qrnE0F2Fci$|fx}GL){`|D7 z6+=IKDBhEWV)R+pWZ~ZGnHPj(Q9tP#IRaN0)Lrn0PG?;|;gw6S4_Sf;mM7uC ztEOYC7t=*s&4dC$xfWM3yV%7wgnFqFJ&y6MgG72aGrxRV^nOAi?mE366b#XQy+YB# z*|7e5pKxq>!xhIYf9Wlvv@R2=K3(WaC1(6w1?eVP$O2{U~S?HeVMPK`_lJ$=}k zpwlDI*IfbFzTEYVkXwr>7P+#KInL*av}j*n7`xu(U_>#~X2F#{`aYf?*A8+mdSfJd zJH?`FO+JS7>b?zehNj;aQJ}RxU$NEWVz+*ik-D$>*U4?T&QEVAoIx9L3+{yY2I8YI zo%b4TdMn6_(j)MlD7^vGo>v4Jn_Laew)|%~vH0CzbL&YL#J6GYMmU=3GV==T&(-Q=t z2(z;k(M+d@k4^OZI4oT+7W;;_yQWw-e;o9L&L?s0_(s^(POpU@wbNHJm(xk&aj59( zt$j-O1%lJQQE|d`kmb~(0+`^L*4b0!mC`i zhOlj@9)g>D>oG!emtQPBue2(=k@iu`^-OQw4^Ix&zY_g^SFf{hW{h6Pd}NuCO&zdr$LPJ7>BQa;Ig>h<8I$w} z%;7*E@J`ihLF{;ndOB=T`*o@=-duZKU!8@sGl|V-z4ZVrn5oZWDGP$A^z-i5t7FzH z`f>*S_ygHSfMCpAGA)xL+ep}VuAa%HO1I;o1$s9-MU7tVi34JCFeWS|W0T^#tu84p zKrrHUKTR}-17PlcqQpN^JD8qIF4MmghX~zqj2>R{+-~#yBs{o6pD#REZ&(P$>vejF zu!ouiBXad~;?D!c#=uBU$x4N2L4wIQ`XZTjQ(=&BG^ z-*yFQ+A`s<`ib5J)WX@X$8i=HSv~*<9MPW?!KI%$NzGdt41@kBD0fq6JMhv`y(SNy zPdBZ^gKp?>M5i~fCv>-1KfPePkhLb#m5(V&A-&%Gl!V{^rXODf=}6C$#hY8N{{5d6 zGD2U>JEv!{+}C5k+t*eTdtcD|GT_eBkY3Lx5Kn)rFJM4f4d}kbF9=Ew`q3-z@AT~q zEzg6qqb)&@`?{e(_ElZML09#U#E@a7ro??c3Y6~%+M-xr$57iH6QSD%L&5SN^p6=T zHHKo z?>cwMjHWG+)ZwGJ(UNX5gw{d{FcunixPOmaOWch?MzL=EH-L2?=*?Nh*2iE&nO+}= z4Zob0px;Tu0QW}*-Po-6Q}9%o-i~LsmHst`v|^;8eA?O=CiVv7sdoE>et6Jo@S)r2 z+NfftSd$pL;bHu4`9ig593UBf4Cvn9v|jE8KVMug8%~Bk{hL6pgWsse0=8eDLj|>o zejw!OWYz_`ahK-}K7g}5#wTpXu?g%IkTJ`qVDA8f`-R5K9skFc)c#XoZ73O^_IvIO z8dC-f)uUld4O;V7H4JWy8`FmWYi0#Te@GS}toqDy#+?5wfVaYpT!zltj!UBqZjKut zwSd{Rj0UhXiWp_pGRE+X&ELbJ&g3TSjoo6&O?W&Z))>#@c|&+SXN}>H`E?C*VYgo~ zk!Ugf;b6RBGm#e8H`=Mf>Zco->FHt}w0e|Hv(VPLSIhwM+rT zj~J3_Z~bVsW|U@$p3JOn zltX$)qdF!$Ww;n{>u)5$Z~XmxFQG&N#PubmN#8(@Q+TcmxfuW2P}ghv3TWBM=n5f? z6$RIKHRiDZkJdxxc5;@kPa7PHZVE;AZI1JZp2k5z->r-nOITsq{Ox{pXW85MnTN>T z7k}c{0ExAD67O~Uxo|^&qld_R?kE;I2;I*ccg0_2au0kY5={_Ygc%Nu8gINVq;L;C zAV(1sIBuMK^ z7W^kjD@MD_Hf~^-IYtw)&%4)bqFm}14@8h^+y!KMa=$<S60cW*sK9e5=P z>HSWY*lXMeh809}M!Xb7k@sf&6a*NBpW;*UXR%EN=lw3CE8T^aMlVZ$0dpVBPl`J_gJn+zQ~xJi@5A%hbKH%%TgZ0L|-g9Xh-DZ^;ADbZ*)r0KAs fnfUq`|2mGx{rz3M@uGiqp=PvCU63aGFZurf(;aY= diff --git a/docs/run_results.json b/docs/run_results.json index 72947fe..3b77f4e 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.2.0", "generated_at": "2022-10-13T23:10:13.608880Z", "invocation_id": "995a6e9b-ac7c-4344-a33a-82df97529d6b", "env": {}}, "results": [{"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:10.905294Z", "completed_at": "2022-10-13T23:10:10.929658Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:10.930647Z", "completed_at": "2022-10-13T23:10:10.930661Z"}], "thread_id": "Thread-2", "execution_time": 0.03811907768249512, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.shopify_holistic_reporting_integration_tests.campaign"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:10.905430Z", "completed_at": "2022-10-13T23:10:10.929784Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:10.941614Z", "completed_at": "2022-10-13T23:10:10.941620Z"}], "thread_id": "Thread-3", "execution_time": 0.03818392753601074, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.shopify_holistic_reporting_integration_tests.event"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:10.905557Z", "completed_at": "2022-10-13T23:10:10.929856Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:10.941713Z", "completed_at": "2022-10-13T23:10:10.941716Z"}], "thread_id": "Thread-4", "execution_time": 0.03810429573059082, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.shopify_holistic_reporting_integration_tests.flow"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:10.944801Z", "completed_at": "2022-10-13T23:10:10.948527Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:10.948917Z", "completed_at": "2022-10-13T23:10:10.948922Z"}], "thread_id": "Thread-2", "execution_time": 0.005316019058227539, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.shopify_holistic_reporting_integration_tests.integration"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:10.944924Z", "completed_at": "2022-10-13T23:10:10.948597Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:10.948984Z", "completed_at": "2022-10-13T23:10:10.948987Z"}], "thread_id": "Thread-3", "execution_time": 0.005037069320678711, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.shopify_holistic_reporting_integration_tests.metric"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:10.944991Z", "completed_at": "2022-10-13T23:10:10.948658Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:10.949053Z", "completed_at": "2022-10-13T23:10:10.949055Z"}], "thread_id": "Thread-4", "execution_time": 0.00506591796875, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.shopify_holistic_reporting_integration_tests.person"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:10.950787Z", "completed_at": "2022-10-13T23:10:10.955159Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:10.955542Z", "completed_at": "2022-10-13T23:10:10.955547Z"}], "thread_id": "Thread-2", "execution_time": 0.005667209625244141, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.shopify_holistic_reporting_integration_tests.shopify_customer_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:10.950908Z", "completed_at": "2022-10-13T23:10:10.955291Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:10.955668Z", "completed_at": "2022-10-13T23:10:10.955670Z"}], "thread_id": "Thread-4", "execution_time": 0.005663156509399414, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.shopify_holistic_reporting_integration_tests.shopify_order_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:10.950849Z", "completed_at": "2022-10-13T23:10:10.955228Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:10.955607Z", "completed_at": "2022-10-13T23:10:10.955609Z"}], "thread_id": "Thread-3", "execution_time": 0.005658864974975586, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.shopify_holistic_reporting_integration_tests.shopify_order_adjustment_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:10.957290Z", "completed_at": "2022-10-13T23:10:10.959239Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:10.962116Z", "completed_at": "2022-10-13T23:10:10.962123Z"}], "thread_id": "Thread-2", "execution_time": 0.006047964096069336, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.shopify_holistic_reporting_integration_tests.shopify_order_line_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:10.959078Z", "completed_at": "2022-10-13T23:10:10.961831Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:10.962569Z", "completed_at": "2022-10-13T23:10:10.962572Z"}], "thread_id": "Thread-4", "execution_time": 0.006009817123413086, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.shopify_holistic_reporting_integration_tests.shopify_order_line_refund_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:10.959176Z", "completed_at": "2022-10-13T23:10:10.962029Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:10.962639Z", "completed_at": "2022-10-13T23:10:10.962641Z"}], "thread_id": "Thread-3", "execution_time": 0.006174802780151367, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.shopify_holistic_reporting_integration_tests.shopify_product_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:10.963969Z", "completed_at": "2022-10-13T23:10:10.965375Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:10.968502Z", "completed_at": "2022-10-13T23:10:10.968506Z"}], "thread_id": "Thread-2", "execution_time": 0.005542755126953125, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.shopify_holistic_reporting_integration_tests.shopify_product_variant_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:10.965254Z", "completed_at": "2022-10-13T23:10:10.968379Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:10.968928Z", "completed_at": "2022-10-13T23:10:10.968931Z"}], "thread_id": "Thread-4", "execution_time": 0.005590200424194336, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.shopify_holistic_reporting_integration_tests.shopify_refund_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:10.965314Z", "completed_at": "2022-10-13T23:10:10.968436Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:10.968990Z", "completed_at": "2022-10-13T23:10:10.968992Z"}], "thread_id": "Thread-3", "execution_time": 0.0056400299072265625, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.shopify_holistic_reporting_integration_tests.shopify_transaction_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:10.970258Z", "completed_at": "2022-10-13T23:10:10.985355Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:10.985669Z", "completed_at": "2022-10-13T23:10:10.985676Z"}], "thread_id": "Thread-2", "execution_time": 0.01640486717224121, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.klaviyo_source.stg_klaviyo__campaign_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:10.979462Z", "completed_at": "2022-10-13T23:10:10.985547Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:10.986105Z", "completed_at": "2022-10-13T23:10:10.986109Z"}], "thread_id": "Thread-3", "execution_time": 0.016356706619262695, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.klaviyo_source.stg_klaviyo__flow_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:10.979369Z", "completed_at": "2022-10-13T23:10:10.985606Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:10.986176Z", "completed_at": "2022-10-13T23:10:10.986180Z"}], "thread_id": "Thread-4", "execution_time": 0.016659021377563477, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.klaviyo_source.stg_klaviyo__event_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:10.987532Z", "completed_at": "2022-10-13T23:10:10.997461Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:10.997819Z", "completed_at": "2022-10-13T23:10:10.997826Z"}], "thread_id": "Thread-2", "execution_time": 0.011270284652709961, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.klaviyo_source.stg_klaviyo__integration_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:10.991580Z", "completed_at": "2022-10-13T23:10:10.998223Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:10.999079Z", "completed_at": "2022-10-13T23:10:10.999085Z"}], "thread_id": "Thread-3", "execution_time": 0.012217998504638672, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.klaviyo_source.stg_klaviyo__metric_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:10.991737Z", "completed_at": "2022-10-13T23:10:10.998408Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:10.999295Z", "completed_at": "2022-10-13T23:10:10.999300Z"}], "thread_id": "Thread-4", "execution_time": 0.012431859970092773, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.klaviyo_source.stg_klaviyo__person_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:10.999637Z", "completed_at": "2022-10-13T23:10:11.003931Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:11.010597Z", "completed_at": "2022-10-13T23:10:11.010607Z"}], "thread_id": "Thread-2", "execution_time": 0.012219905853271484, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.shopify_source.stg_shopify__customer_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:11.004012Z", "completed_at": "2022-10-13T23:10:11.011156Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:11.011994Z", "completed_at": "2022-10-13T23:10:11.012000Z"}], "thread_id": "Thread-3", "execution_time": 0.009144067764282227, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.shopify_source.stg_shopify__order_adjustment_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:11.004117Z", "completed_at": "2022-10-13T23:10:11.011241Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:11.012081Z", "completed_at": "2022-10-13T23:10:11.012085Z"}], "thread_id": "Thread-4", "execution_time": 0.00909113883972168, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.shopify_source.stg_shopify__order_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:11.012759Z", "completed_at": "2022-10-13T23:10:11.016782Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:11.022437Z", "completed_at": "2022-10-13T23:10:11.022445Z"}], "thread_id": "Thread-2", "execution_time": 0.010942220687866211, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.shopify_source.stg_shopify__order_line_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:11.016711Z", "completed_at": "2022-10-13T23:10:11.022908Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:11.023866Z", "completed_at": "2022-10-13T23:10:11.023871Z"}], "thread_id": "Thread-3", "execution_time": 0.008309364318847656, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.shopify_source.stg_shopify__order_line_refund_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:11.016856Z", "completed_at": "2022-10-13T23:10:11.023237Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:11.024111Z", "completed_at": "2022-10-13T23:10:11.024117Z"}], "thread_id": "Thread-4", "execution_time": 0.008530855178833008, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.shopify_source.stg_shopify__product_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:11.024525Z", "completed_at": "2022-10-13T23:10:11.029091Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:11.035617Z", "completed_at": "2022-10-13T23:10:11.035628Z"}], "thread_id": "Thread-2", "execution_time": 0.012291669845581055, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.shopify_source.stg_shopify__product_variant_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:11.029011Z", "completed_at": "2022-10-13T23:10:11.036240Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:11.036715Z", "completed_at": "2022-10-13T23:10:11.036718Z"}], "thread_id": "Thread-3", "execution_time": 0.008656740188598633, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.shopify_source.stg_shopify__refund_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:11.029200Z", "completed_at": "2022-10-13T23:10:11.036440Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:11.036841Z", "completed_at": "2022-10-13T23:10:11.036844Z"}], "thread_id": "Thread-4", "execution_time": 0.010882139205932617, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.shopify_source.stg_shopify__transaction_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:11.041253Z", "completed_at": "2022-10-13T23:10:11.222131Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:11.222273Z", "completed_at": "2022-10-13T23:10:11.222279Z"}], "thread_id": "Thread-3", "execution_time": 0.18204283714294434, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.klaviyo_source.stg_klaviyo__flow"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:11.036778Z", "completed_at": "2022-10-13T23:10:11.246844Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:11.246976Z", "completed_at": "2022-10-13T23:10:11.246980Z"}], "thread_id": "Thread-2", "execution_time": 0.21079516410827637, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.klaviyo_source.stg_klaviyo__campaign"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:11.041331Z", "completed_at": "2022-10-13T23:10:11.273019Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:11.273177Z", "completed_at": "2022-10-13T23:10:11.273183Z"}], "thread_id": "Thread-4", "execution_time": 0.23262619972229004, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.klaviyo_source.stg_klaviyo__event"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:11.247622Z", "completed_at": "2022-10-13T23:10:11.477503Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:11.477715Z", "completed_at": "2022-10-13T23:10:11.477721Z"}], "thread_id": "Thread-2", "execution_time": 0.23055481910705566, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.klaviyo_source.stg_klaviyo__metric"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:11.222830Z", "completed_at": "2022-10-13T23:10:11.477666Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:11.478065Z", "completed_at": "2022-10-13T23:10:11.478068Z"}], "thread_id": "Thread-3", "execution_time": 0.25572705268859863, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.klaviyo_source.stg_klaviyo__integration"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:11.273933Z", "completed_at": "2022-10-13T23:10:11.550113Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:11.550265Z", "completed_at": "2022-10-13T23:10:11.550272Z"}], "thread_id": "Thread-4", "execution_time": 0.2767808437347412, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.klaviyo_source.stg_klaviyo__person"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:11.484375Z", "completed_at": "2022-10-13T23:10:11.684293Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:11.684486Z", "completed_at": "2022-10-13T23:10:11.684494Z"}], "thread_id": "Thread-3", "execution_time": 0.2031850814819336, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.shopify_source.stg_shopify__order_adjustment"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:11.481694Z", "completed_at": "2022-10-13T23:10:11.699699Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:11.699866Z", "completed_at": "2022-10-13T23:10:11.699872Z"}], "thread_id": "Thread-2", "execution_time": 0.22153401374816895, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.shopify_source.stg_shopify__customer"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:11.550863Z", "completed_at": "2022-10-13T23:10:11.794870Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:11.795026Z", "completed_at": "2022-10-13T23:10:11.795032Z"}], "thread_id": "Thread-4", "execution_time": 0.2445068359375, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.shopify_source.stg_shopify__order"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:11.685474Z", "completed_at": "2022-10-13T23:10:11.934019Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:11.934303Z", "completed_at": "2022-10-13T23:10:11.934311Z"}], "thread_id": "Thread-3", "execution_time": 0.25071096420288086, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.shopify_source.stg_shopify__order_line"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:11.700665Z", "completed_at": "2022-10-13T23:10:11.936646Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:11.940513Z", "completed_at": "2022-10-13T23:10:11.940519Z"}], "thread_id": "Thread-2", "execution_time": 0.24801087379455566, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.shopify_source.stg_shopify__order_line_refund"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:10.905095Z", "completed_at": "2022-10-13T23:10:11.953115Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:11.953521Z", "completed_at": "2022-10-13T23:10:11.953526Z"}], "thread_id": "Thread-1", "execution_time": 1.0505640506744385, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.shopify.shopify__calendar"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:11.795801Z", "completed_at": "2022-10-13T23:10:11.964160Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:11.964297Z", "completed_at": "2022-10-13T23:10:11.964302Z"}], "thread_id": "Thread-4", "execution_time": 0.16888093948364258, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.shopify_source.stg_shopify__product"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:11.964955Z", "completed_at": "2022-10-13T23:10:11.972238Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:11.972372Z", "completed_at": "2022-10-13T23:10:11.972377Z"}], "thread_id": "Thread-4", "execution_time": 0.007816076278686523, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__flow_flow_id__source_relation.015215d481"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:11.972898Z", "completed_at": "2022-10-13T23:10:11.977560Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:11.977698Z", "completed_at": "2022-10-13T23:10:11.977702Z"}], "thread_id": "Thread-4", "execution_time": 0.005107879638671875, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.klaviyo_source.not_null_stg_klaviyo__flow_flow_id.a00a897e42"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:11.978244Z", "completed_at": "2022-10-13T23:10:11.981230Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:11.981371Z", "completed_at": "2022-10-13T23:10:11.981376Z"}], "thread_id": "Thread-4", "execution_time": 0.003444194793701172, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__campaign_campaign_id__source_relation.59158488ff"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:11.982022Z", "completed_at": "2022-10-13T23:10:11.984944Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:11.985072Z", "completed_at": "2022-10-13T23:10:11.985076Z"}], "thread_id": "Thread-4", "execution_time": 0.003464937210083008, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.klaviyo_source.not_null_stg_klaviyo__campaign_campaign_id.5dfc47dc1d"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:11.985577Z", "completed_at": "2022-10-13T23:10:11.991950Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:11.992083Z", "completed_at": "2022-10-13T23:10:11.992088Z"}], "thread_id": "Thread-4", "execution_time": 0.006808280944824219, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.klaviyo.int_klaviyo__event_attribution"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:11.992712Z", "completed_at": "2022-10-13T23:10:11.995503Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:11.995635Z", "completed_at": "2022-10-13T23:10:11.995639Z"}], "thread_id": "Thread-4", "execution_time": 0.0032320022583007812, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__event_event_id__source_relation.3778c651d7"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:11.996225Z", "completed_at": "2022-10-13T23:10:11.998541Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:11.998669Z", "completed_at": "2022-10-13T23:10:11.998673Z"}], "thread_id": "Thread-4", "execution_time": 0.0028259754180908203, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.klaviyo_source.not_null_stg_klaviyo__event_event_id.7a09ac6ec1"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:11.999170Z", "completed_at": "2022-10-13T23:10:12.002428Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:12.002555Z", "completed_at": "2022-10-13T23:10:12.002559Z"}], "thread_id": "Thread-4", "execution_time": 0.003690004348754883, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__metric_metric_id__source_relation.e9f33c04e5"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:12.003078Z", "completed_at": "2022-10-13T23:10:12.005343Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:12.005461Z", "completed_at": "2022-10-13T23:10:12.005464Z"}], "thread_id": "Thread-4", "execution_time": 0.0026679039001464844, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.klaviyo_source.not_null_stg_klaviyo__metric_metric_id.4759d62078"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:12.005933Z", "completed_at": "2022-10-13T23:10:12.008533Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:12.008655Z", "completed_at": "2022-10-13T23:10:12.008659Z"}], "thread_id": "Thread-4", "execution_time": 0.003003835678100586, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__integration_integration_id__source_relation.be6158ad21"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:12.009133Z", "completed_at": "2022-10-13T23:10:12.011353Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:12.011473Z", "completed_at": "2022-10-13T23:10:12.011477Z"}], "thread_id": "Thread-4", "execution_time": 0.002626180648803711, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.klaviyo_source.not_null_stg_klaviyo__integration_integration_id.fe572c5f1b"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:12.011966Z", "completed_at": "2022-10-13T23:10:12.014630Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:12.014752Z", "completed_at": "2022-10-13T23:10:12.014756Z"}], "thread_id": "Thread-4", "execution_time": 0.003108978271484375, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__person_person_id__source_relation.33a4f9ca24"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:12.015231Z", "completed_at": "2022-10-13T23:10:12.017412Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:12.017529Z", "completed_at": "2022-10-13T23:10:12.017533Z"}], "thread_id": "Thread-4", "execution_time": 0.0025811195373535156, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.klaviyo_source.not_null_stg_klaviyo__person_email.c7094cfe27"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:12.017999Z", "completed_at": "2022-10-13T23:10:12.021687Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:12.021847Z", "completed_at": "2022-10-13T23:10:12.021852Z"}], "thread_id": "Thread-4", "execution_time": 0.0041658878326416016, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.klaviyo_source.not_null_stg_klaviyo__person_person_id.bd77ffc8aa"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:12.022403Z", "completed_at": "2022-10-13T23:10:12.026545Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:12.026680Z", "completed_at": "2022-10-13T23:10:12.026686Z"}], "thread_id": "Thread-4", "execution_time": 0.0045969486236572266, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.klaviyo_source.unique_stg_klaviyo__person_email.dc3a98b014"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:12.027260Z", "completed_at": "2022-10-13T23:10:12.030256Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:12.030384Z", "completed_at": "2022-10-13T23:10:12.030388Z"}], "thread_id": "Thread-4", "execution_time": 0.0034661293029785156, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_adjustment_order_adjustment_id__source_relation.00b7d10cb0"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:12.030908Z", "completed_at": "2022-10-13T23:10:12.033535Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:12.033662Z", "completed_at": "2022-10-13T23:10:12.033666Z"}], "thread_id": "Thread-4", "execution_time": 0.0030510425567626953, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__customer_customer_id__source_relation.1b2185db25"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:12.034149Z", "completed_at": "2022-10-13T23:10:12.036793Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:12.036913Z", "completed_at": "2022-10-13T23:10:12.036916Z"}], "thread_id": "Thread-4", "execution_time": 0.0030488967895507812, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_order_id__source_relation.81d10381c1"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:12.040574Z", "completed_at": "2022-10-13T23:10:12.043259Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:12.043379Z", "completed_at": "2022-10-13T23:10:12.043383Z"}], "thread_id": "Thread-4", "execution_time": 0.003100872039794922, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_line_order_line_id__source_relation.c2797e7a9c"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:12.043867Z", "completed_at": "2022-10-13T23:10:12.046447Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:12.046566Z", "completed_at": "2022-10-13T23:10:12.046570Z"}], "thread_id": "Thread-4", "execution_time": 0.002980947494506836, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_line_refund_order_line_refund_id__source_relation.1877420c29"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:12.047038Z", "completed_at": "2022-10-13T23:10:12.049669Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:12.049787Z", "completed_at": "2022-10-13T23:10:12.049790Z"}], "thread_id": "Thread-4", "execution_time": 0.003033161163330078, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__product_product_id__source_relation.48b32ab6a2"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:11.936723Z", "completed_at": "2022-10-13T23:10:12.179101Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:12.179263Z", "completed_at": "2022-10-13T23:10:12.179271Z"}], "thread_id": "Thread-3", "execution_time": 0.24312710762023926, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.shopify_source.stg_shopify__product_variant"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:11.959447Z", "completed_at": "2022-10-13T23:10:12.179327Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:12.179933Z", "completed_at": "2022-10-13T23:10:12.179936Z"}], "thread_id": "Thread-1", "execution_time": 0.221207857131958, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.shopify_source.stg_shopify__transaction"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:12.180630Z", "completed_at": "2022-10-13T23:10:12.186469Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:12.186645Z", "completed_at": "2022-10-13T23:10:12.186650Z"}], "thread_id": "Thread-3", "execution_time": 0.0068302154541015625, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.klaviyo.dbt_utils_unique_combination_of_columns_int_klaviyo__event_attribution_event_id__source_relation.654b98ad2c"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:12.184158Z", "completed_at": "2022-10-13T23:10:12.186708Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:12.187546Z", "completed_at": "2022-10-13T23:10:12.187549Z"}], "thread_id": "Thread-1", "execution_time": 0.010538101196289062, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.klaviyo.not_null_int_klaviyo__event_attribution_event_id.8d186152c4"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:11.949360Z", "completed_at": "2022-10-13T23:10:12.198884Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:12.201112Z", "completed_at": "2022-10-13T23:10:12.201118Z"}], "thread_id": "Thread-2", "execution_time": 0.25492000579833984, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.shopify_source.stg_shopify__refund"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:12.192507Z", "completed_at": "2022-10-13T23:10:12.203831Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:12.204502Z", "completed_at": "2022-10-13T23:10:12.204505Z"}], "thread_id": "Thread-3", "execution_time": 0.017192840576171875, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.shopify.dbt_utils_unique_combination_of_columns_shopify__orders__order_line_aggregates_order_id__source_relation.09d921d473"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:12.201027Z", "completed_at": "2022-10-13T23:10:12.204434Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:12.204988Z", "completed_at": "2022-10-13T23:10:12.204991Z"}], "thread_id": "Thread-1", "execution_time": 0.012654781341552734, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__product_variant_variant_id__source_relation.7506695ec0"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:12.205147Z", "completed_at": "2022-10-13T23:10:12.210548Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:12.217318Z", "completed_at": "2022-10-13T23:10:12.217323Z"}], "thread_id": "Thread-2", "execution_time": 0.012992143630981445, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.shopify.shopify__transactions"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:12.210436Z", "completed_at": "2022-10-13T23:10:12.217383Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:12.218029Z", "completed_at": "2022-10-13T23:10:12.218032Z"}], "thread_id": "Thread-3", "execution_time": 0.013080120086669922, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__transaction_transaction_id__source_relation.d55a33652a"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:12.218982Z", "completed_at": "2022-10-13T23:10:12.226414Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:12.226585Z", "completed_at": "2022-10-13T23:10:12.226589Z"}], "thread_id": "Thread-2", "execution_time": 0.008554935455322266, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__refund_refund_id__source_relation.cd4dbc2b35"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:12.221950Z", "completed_at": "2022-10-13T23:10:12.226632Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:12.227233Z", "completed_at": "2022-10-13T23:10:12.227236Z"}], "thread_id": "Thread-3", "execution_time": 0.008556842803955078, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.shopify.dbt_utils_unique_combination_of_columns_shopify__transactions_transaction_id__source_relation.7341b755c0"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:12.228018Z", "completed_at": "2022-10-13T23:10:12.270057Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:12.270203Z", "completed_at": "2022-10-13T23:10:12.270210Z"}], "thread_id": "Thread-2", "execution_time": 0.042925119400024414, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.shopify.shopify__order_lines"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:12.228190Z", "completed_at": "2022-10-13T23:10:12.270520Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:12.271330Z", "completed_at": "2022-10-13T23:10:12.271334Z"}], "thread_id": "Thread-1", "execution_time": 0.043831825256347656, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.shopify.shopify__orders"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:12.271740Z", "completed_at": "2022-10-13T23:10:12.279467Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:12.279650Z", "completed_at": "2022-10-13T23:10:12.279654Z"}], "thread_id": "Thread-2", "execution_time": 0.008591890335083008, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.shopify.dbt_utils_unique_combination_of_columns_shopify__customers__order_aggregates_customer_id__source_relation.5a5e85c8a9"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:12.276837Z", "completed_at": "2022-10-13T23:10:12.279869Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:12.280230Z", "completed_at": "2022-10-13T23:10:12.280233Z"}], "thread_id": "Thread-1", "execution_time": 0.003844738006591797, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.shopify.dbt_utils_unique_combination_of_columns_shopify__order_lines_order_line_id__source_relation.2483d5ef95"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:12.280510Z", "completed_at": "2022-10-13T23:10:12.286272Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:12.286447Z", "completed_at": "2022-10-13T23:10:12.286452Z"}], "thread_id": "Thread-2", "execution_time": 0.006475925445556641, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.shopify.shopify__products"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:12.283686Z", "completed_at": "2022-10-13T23:10:12.286834Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:12.287170Z", "completed_at": "2022-10-13T23:10:12.287174Z"}], "thread_id": "Thread-1", "execution_time": 0.003912210464477539, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.shopify.dbt_utils_unique_combination_of_columns_shopify__orders_order_id__source_relation.b2d1eaf63d"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:12.287464Z", "completed_at": "2022-10-13T23:10:12.290999Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:12.291257Z", "completed_at": "2022-10-13T23:10:12.291262Z"}], "thread_id": "Thread-2", "execution_time": 0.00454401969909668, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.shopify.dbt_utils_unique_combination_of_columns_shopify__products_product_id__source_relation.f00b2fb95a"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:12.050277Z", "completed_at": "2022-10-13T23:10:12.293664Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:12.293789Z", "completed_at": "2022-10-13T23:10:12.293792Z"}], "thread_id": "Thread-4", "execution_time": 0.2438051700592041, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.klaviyo.klaviyo__events"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:12.295019Z", "completed_at": "2022-10-13T23:10:12.318876Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:12.319016Z", "completed_at": "2022-10-13T23:10:12.319022Z"}], "thread_id": "Thread-2", "execution_time": 0.024613142013549805, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.shopify_holistic_reporting.int__daily_klaviyo_user_metrics"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:12.294963Z", "completed_at": "2022-10-13T23:10:12.322818Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:12.323043Z", "completed_at": "2022-10-13T23:10:12.323047Z"}], "thread_id": "Thread-1", "execution_time": 0.02877497673034668, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.klaviyo.klaviyo__person_campaign_flow"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:12.319554Z", "completed_at": "2022-10-13T23:10:12.323313Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:12.323736Z", "completed_at": "2022-10-13T23:10:12.323739Z"}], "thread_id": "Thread-2", "execution_time": 0.004540205001831055, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__events_event_id__source_relation.847dad4174"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:12.324010Z", "completed_at": "2022-10-13T23:10:12.329541Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:12.330171Z", "completed_at": "2022-10-13T23:10:12.330176Z"}], "thread_id": "Thread-1", "execution_time": 0.007081031799316406, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.klaviyo.not_null_klaviyo__events_event_id.eada7340ba"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:12.266882Z", "completed_at": "2022-10-13T23:10:12.461207Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:12.461411Z", "completed_at": "2022-10-13T23:10:12.461418Z"}], "thread_id": "Thread-3", "execution_time": 0.23354291915893555, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.shopify.shopify__customers"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:12.462325Z", "completed_at": "2022-10-13T23:10:12.466731Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:12.466891Z", "completed_at": "2022-10-13T23:10:12.466896Z"}], "thread_id": "Thread-3", "execution_time": 0.005059003829956055, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__person_campaign_flow_person_id__last_touch_campaign_id__last_touch_flow_id__variation_id__source_relation.30e1824079"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:12.295073Z", "completed_at": "2022-10-13T23:10:12.508339Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:12.508480Z", "completed_at": "2022-10-13T23:10:12.508486Z"}], "thread_id": "Thread-4", "execution_time": 0.2182600498199463, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.shopify_holistic_reporting.shopify_holistic_reporting__orders_attribution"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:12.326509Z", "completed_at": "2022-10-13T23:10:12.526201Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:12.526857Z", "completed_at": "2022-10-13T23:10:12.526862Z"}], "thread_id": "Thread-2", "execution_time": 0.20084786415100098, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.klaviyo.int_klaviyo__campaign_flow_metrics"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:12.467532Z", "completed_at": "2022-10-13T23:10:12.526617Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:12.527245Z", "completed_at": "2022-10-13T23:10:12.527248Z"}], "thread_id": "Thread-3", "execution_time": 0.06026434898376465, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.klaviyo.not_null_klaviyo__person_campaign_flow_person_id.e27d13b0f2"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:12.527307Z", "completed_at": "2022-10-13T23:10:12.532628Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:12.539892Z", "completed_at": "2022-10-13T23:10:12.539898Z"}], "thread_id": "Thread-4", "execution_time": 0.01604318618774414, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.shopify.shopify__customer_cohorts"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:12.539402Z", "completed_at": "2022-10-13T23:10:12.543488Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:12.543753Z", "completed_at": "2022-10-13T23:10:12.543756Z"}], "thread_id": "Thread-3", "execution_time": 0.01491999626159668, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.shopify.dbt_utils_unique_combination_of_columns_shopify__customers_customer_id__source_relation.88d3656469"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:12.543690Z", "completed_at": "2022-10-13T23:10:12.547814Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:12.548059Z", "completed_at": "2022-10-13T23:10:12.548062Z"}], "thread_id": "Thread-4", "execution_time": 0.007438182830810547, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.shopify_holistic_reporting.int__daily_shopify_customer_orders"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:12.547999Z", "completed_at": "2022-10-13T23:10:12.551339Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:12.554528Z", "completed_at": "2022-10-13T23:10:12.554532Z"}], "thread_id": "Thread-3", "execution_time": 0.007395029067993164, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.shopify_holistic_reporting.dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__orders_attribution_order_id__shopify_source_relation.0eb46743bb"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:12.331094Z", "completed_at": "2022-10-13T23:10:12.589718Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:12.589854Z", "completed_at": "2022-10-13T23:10:12.589860Z"}], "thread_id": "Thread-1", "execution_time": 0.2590909004211426, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.klaviyo.int_klaviyo__person_metrics"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:12.590541Z", "completed_at": "2022-10-13T23:10:12.594632Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:12.594759Z", "completed_at": "2022-10-13T23:10:12.594764Z"}], "thread_id": "Thread-1", "execution_time": 0.004612922668457031, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.klaviyo.dbt_utils_unique_combination_of_columns_int_klaviyo__campaign_flow_metrics_variation_id__source_relation__last_touch_campaign_id__last_touch_flow_id.3ea05faa81"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:12.595275Z", "completed_at": "2022-10-13T23:10:12.597563Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:12.597684Z", "completed_at": "2022-10-13T23:10:12.597688Z"}], "thread_id": "Thread-1", "execution_time": 0.002707958221435547, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.shopify.not_null_shopify__customer_cohorts_customer_cohort_id.88e9c30925"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:12.598165Z", "completed_at": "2022-10-13T23:10:12.600296Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:12.600415Z", "completed_at": "2022-10-13T23:10:12.600419Z"}], "thread_id": "Thread-1", "execution_time": 0.0025501251220703125, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.shopify.unique_shopify__customer_cohorts_customer_cohort_id.c5e4855c7a"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:12.555798Z", "completed_at": "2022-10-13T23:10:12.758982Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:12.759217Z", "completed_at": "2022-10-13T23:10:12.759229Z"}], "thread_id": "Thread-3", "execution_time": 0.20386815071105957, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.klaviyo.klaviyo__flows"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:12.532581Z", "completed_at": "2022-10-13T23:10:12.770388Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:12.770582Z", "completed_at": "2022-10-13T23:10:12.770588Z"}], "thread_id": "Thread-2", "execution_time": 0.23870420455932617, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.shopify_holistic_reporting.int__shopify_customer_rollup"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:12.771440Z", "completed_at": "2022-10-13T23:10:12.776865Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:12.777045Z", "completed_at": "2022-10-13T23:10:12.777051Z"}], "thread_id": "Thread-2", "execution_time": 0.006103038787841797, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.klaviyo.dbt_utils_unique_combination_of_columns_int_klaviyo__person_metrics_person_id__source_relation.4897d57f8b"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:12.777735Z", "completed_at": "2022-10-13T23:10:12.780946Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:12.781118Z", "completed_at": "2022-10-13T23:10:12.781123Z"}], "thread_id": "Thread-2", "execution_time": 0.003793954849243164, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.klaviyo.not_null_int_klaviyo__person_metrics_person_id.2c0f4e5a67"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:12.781802Z", "completed_at": "2022-10-13T23:10:12.785310Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:12.785461Z", "completed_at": "2022-10-13T23:10:12.785466Z"}], "thread_id": "Thread-2", "execution_time": 0.0040509700775146484, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__flows_flow_variation_key__source_relation.925d4118dc"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:12.786056Z", "completed_at": "2022-10-13T23:10:12.789016Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:12.789174Z", "completed_at": "2022-10-13T23:10:12.789179Z"}], "thread_id": "Thread-2", "execution_time": 0.003484964370727539, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.klaviyo.not_null_klaviyo__flows_flow_variation_key.152c0d960b"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:12.551386Z", "completed_at": "2022-10-13T23:10:12.847949Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:12.848145Z", "completed_at": "2022-10-13T23:10:12.848152Z"}], "thread_id": "Thread-4", "execution_time": 0.29720187187194824, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.klaviyo.klaviyo__campaigns"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:12.849490Z", "completed_at": "2022-10-13T23:10:12.857866Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:12.858202Z", "completed_at": "2022-10-13T23:10:12.858207Z"}], "thread_id": "Thread-2", "execution_time": 0.009546041488647461, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__campaigns_campaign_variation_key__source_relation.e5d14aee28"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:12.849576Z", "completed_at": "2022-10-13T23:10:12.857960Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:12.858281Z", "completed_at": "2022-10-13T23:10:12.858284Z"}], "thread_id": "Thread-4", "execution_time": 0.009544134140014648, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.klaviyo.not_null_klaviyo__campaigns_campaign_variation_key.c4588cdadc"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:12.600902Z", "completed_at": "2022-10-13T23:10:12.920628Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:12.920841Z", "completed_at": "2022-10-13T23:10:12.920848Z"}], "thread_id": "Thread-1", "execution_time": 0.3203449249267578, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.shopify_holistic_reporting.shopify_holistic_reporting__daily_customer_metrics"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:12.921977Z", "completed_at": "2022-10-13T23:10:12.927980Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:12.928182Z", "completed_at": "2022-10-13T23:10:12.928189Z"}], "thread_id": "Thread-2", "execution_time": 0.006747722625732422, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.shopify_holistic_reporting.dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__daily_customer_metrics_date_day__email__klaviyo_source_relation__shopify_source_relation__campaign_id__flow_id__variation_id.0489c190fd"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:12.760379Z", "completed_at": "2022-10-13T23:10:13.000497Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:13.000625Z", "completed_at": "2022-10-13T23:10:13.000630Z"}], "thread_id": "Thread-3", "execution_time": 0.24090194702148438, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.klaviyo.klaviyo__persons"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:13.002652Z", "completed_at": "2022-10-13T23:10:13.025015Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:13.025311Z", "completed_at": "2022-10-13T23:10:13.025320Z"}], "thread_id": "Thread-4", "execution_time": 0.02406597137451172, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__persons_person_id__source_relation.b223d703b3"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:13.010357Z", "completed_at": "2022-10-13T23:10:13.025422Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:13.026254Z", "completed_at": "2022-10-13T23:10:13.026258Z"}], "thread_id": "Thread-2", "execution_time": 0.02485823631286621, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.klaviyo.not_null_klaviyo__persons_email.072e38d07d"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:13.014918Z", "completed_at": "2022-10-13T23:10:13.025806Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:13.026518Z", "completed_at": "2022-10-13T23:10:13.026523Z"}], "thread_id": "Thread-3", "execution_time": 0.024831056594848633, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.klaviyo.not_null_klaviyo__persons_person_id.624a41e75a"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:13.027176Z", "completed_at": "2022-10-13T23:10:13.030795Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:13.030972Z", "completed_at": "2022-10-13T23:10:13.030977Z"}], "thread_id": "Thread-4", "execution_time": 0.0048100948333740234, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.klaviyo.unique_klaviyo__persons_email.a330194dd6"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:13.002380Z", "completed_at": "2022-10-13T23:10:13.272764Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:13.273177Z", "completed_at": "2022-10-13T23:10:13.273197Z"}], "thread_id": "Thread-1", "execution_time": 0.27236104011535645, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.shopify_holistic_reporting.int__klaviyo_person_rollup"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:13.275593Z", "completed_at": "2022-10-13T23:10:13.595541Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:13.595962Z", "completed_at": "2022-10-13T23:10:13.595986Z"}], "thread_id": "Thread-2", "execution_time": 0.32143092155456543, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.shopify_holistic_reporting.shopify_holistic_reporting__customer_enhanced"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:10:13.598597Z", "completed_at": "2022-10-13T23:10:13.606756Z"}, {"name": "execute", "started_at": "2022-10-13T23:10:13.607016Z", "completed_at": "2022-10-13T23:10:13.607026Z"}], "thread_id": "Thread-4", "execution_time": 0.009256839752197266, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.shopify_holistic_reporting.dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__customer_enhanced_email__klaviyo_source_relation__shopify_source_relation.2ea9394109"}], "elapsed_time": 4.978570938110352, "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.2.0", "generated_at": "2022-10-13T23:21:06.476290Z", "invocation_id": "09cf5607-4d3b-4819-bd09-baa959605110", "env": {}}, "results": [{"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:02.546557Z", "completed_at": "2022-10-13T23:21:02.553855Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:02.561574Z", "completed_at": "2022-10-13T23:21:02.561615Z"}], "thread_id": "Thread-2", "execution_time": 0.025658845901489258, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.shopify_holistic_reporting_integration_tests.campaign"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:02.554343Z", "completed_at": "2022-10-13T23:21:02.570831Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:02.573692Z", "completed_at": "2022-10-13T23:21:02.573699Z"}], "thread_id": "Thread-3", "execution_time": 0.05346322059631348, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.shopify_holistic_reporting_integration_tests.event"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:02.554637Z", "completed_at": "2022-10-13T23:21:02.571768Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:02.600218Z", "completed_at": "2022-10-13T23:21:02.600225Z"}], "thread_id": "Thread-4", "execution_time": 0.04782891273498535, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.shopify_holistic_reporting_integration_tests.flow"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:02.601160Z", "completed_at": "2022-10-13T23:21:02.604431Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:02.606044Z", "completed_at": "2022-10-13T23:21:02.606049Z"}], "thread_id": "Thread-2", "execution_time": 0.01548910140991211, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.shopify_holistic_reporting_integration_tests.integration"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:02.604581Z", "completed_at": "2022-10-13T23:21:02.607278Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:02.607960Z", "completed_at": "2022-10-13T23:21:02.607964Z"}], "thread_id": "Thread-3", "execution_time": 0.006031036376953125, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.shopify_holistic_reporting_integration_tests.metric"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:02.604726Z", "completed_at": "2022-10-13T23:21:02.607559Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:02.608188Z", "completed_at": "2022-10-13T23:21:02.608191Z"}], "thread_id": "Thread-4", "execution_time": 0.004410982131958008, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.shopify_holistic_reporting_integration_tests.person"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:02.608820Z", "completed_at": "2022-10-13T23:21:02.611361Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:02.612819Z", "completed_at": "2022-10-13T23:21:02.612822Z"}], "thread_id": "Thread-2", "execution_time": 0.006026029586791992, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.shopify_holistic_reporting_integration_tests.shopify_customer_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:02.611493Z", "completed_at": "2022-10-13T23:21:02.613918Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:02.614480Z", "completed_at": "2022-10-13T23:21:02.614484Z"}], "thread_id": "Thread-3", "execution_time": 0.005810976028442383, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.shopify_holistic_reporting_integration_tests.shopify_order_adjustment_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:02.611623Z", "completed_at": "2022-10-13T23:21:02.614162Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:02.614706Z", "completed_at": "2022-10-13T23:21:02.614709Z"}], "thread_id": "Thread-4", "execution_time": 0.004057168960571289, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.shopify_holistic_reporting_integration_tests.shopify_order_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:02.615513Z", "completed_at": "2022-10-13T23:21:02.617294Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:02.618637Z", "completed_at": "2022-10-13T23:21:02.618640Z"}], "thread_id": "Thread-2", "execution_time": 0.005438089370727539, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.shopify_holistic_reporting_integration_tests.shopify_order_line_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:02.617412Z", "completed_at": "2022-10-13T23:21:02.619762Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:02.620433Z", "completed_at": "2022-10-13T23:21:02.620437Z"}], "thread_id": "Thread-3", "execution_time": 0.005010843276977539, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.shopify_holistic_reporting_integration_tests.shopify_order_line_refund_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:02.617529Z", "completed_at": "2022-10-13T23:21:02.620123Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:02.620648Z", "completed_at": "2022-10-13T23:21:02.620651Z"}], "thread_id": "Thread-4", "execution_time": 0.003927946090698242, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.shopify_holistic_reporting_integration_tests.shopify_product_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:02.621208Z", "completed_at": "2022-10-13T23:21:02.623546Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:02.624798Z", "completed_at": "2022-10-13T23:21:02.624802Z"}], "thread_id": "Thread-2", "execution_time": 0.005545854568481445, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.shopify_holistic_reporting_integration_tests.shopify_product_variant_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:02.623661Z", "completed_at": "2022-10-13T23:21:02.625923Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:02.626506Z", "completed_at": "2022-10-13T23:21:02.626509Z"}], "thread_id": "Thread-3", "execution_time": 0.004576921463012695, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.shopify_holistic_reporting_integration_tests.shopify_refund_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:02.623776Z", "completed_at": "2022-10-13T23:21:02.626167Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:02.626691Z", "completed_at": "2022-10-13T23:21:02.626693Z"}], "thread_id": "Thread-4", "execution_time": 0.0036509037017822266, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.shopify_holistic_reporting_integration_tests.shopify_transaction_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:02.627179Z", "completed_at": "2022-10-13T23:21:02.642461Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:02.642604Z", "completed_at": "2022-10-13T23:21:02.642609Z"}], "thread_id": "Thread-2", "execution_time": 0.016168832778930664, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.klaviyo_source.stg_klaviyo__campaign_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:02.636155Z", "completed_at": "2022-10-13T23:21:02.645385Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:02.645536Z", "completed_at": "2022-10-13T23:21:02.645539Z"}], "thread_id": "Thread-3", "execution_time": 0.018300771713256836, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.klaviyo_source.stg_klaviyo__event_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:02.636253Z", "completed_at": "2022-10-13T23:21:02.648292Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:02.648805Z", "completed_at": "2022-10-13T23:21:02.648808Z"}], "thread_id": "Thread-4", "execution_time": 0.016429901123046875, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.klaviyo_source.stg_klaviyo__flow_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:02.643103Z", "completed_at": "2022-10-13T23:21:02.648537Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:02.648871Z", "completed_at": "2022-10-13T23:21:02.648874Z"}], "thread_id": "Thread-2", "execution_time": 0.0063250064849853516, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.klaviyo_source.stg_klaviyo__integration_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:02.646050Z", "completed_at": "2022-10-13T23:21:02.648742Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:02.649351Z", "completed_at": "2022-10-13T23:21:02.649354Z"}], "thread_id": "Thread-3", "execution_time": 0.003906965255737305, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.klaviyo_source.stg_klaviyo__metric_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:02.650474Z", "completed_at": "2022-10-13T23:21:02.658372Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:02.658605Z", "completed_at": "2022-10-13T23:21:02.658609Z"}], "thread_id": "Thread-4", "execution_time": 0.008996248245239258, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.klaviyo_source.stg_klaviyo__person_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:02.650531Z", "completed_at": "2022-10-13T23:21:02.658512Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:02.659032Z", "completed_at": "2022-10-13T23:21:02.659035Z"}], "thread_id": "Thread-2", "execution_time": 0.009405851364135742, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.shopify_source.stg_shopify__customer_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:02.654944Z", "completed_at": "2022-10-13T23:21:02.658661Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:02.659253Z", "completed_at": "2022-10-13T23:21:02.659255Z"}], "thread_id": "Thread-3", "execution_time": 0.009308099746704102, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.shopify_source.stg_shopify__order_adjustment_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:02.660218Z", "completed_at": "2022-10-13T23:21:02.667724Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:02.668017Z", "completed_at": "2022-10-13T23:21:02.668022Z"}], "thread_id": "Thread-4", "execution_time": 0.00873708724975586, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.shopify_source.stg_shopify__order_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:02.662929Z", "completed_at": "2022-10-13T23:21:02.668070Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:02.668676Z", "completed_at": "2022-10-13T23:21:02.668679Z"}], "thread_id": "Thread-2", "execution_time": 0.008950948715209961, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.shopify_source.stg_shopify__order_line_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:02.663056Z", "completed_at": "2022-10-13T23:21:02.668324Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:02.668870Z", "completed_at": "2022-10-13T23:21:02.668872Z"}], "thread_id": "Thread-3", "execution_time": 0.008917808532714844, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.shopify_source.stg_shopify__order_line_refund_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:02.669416Z", "completed_at": "2022-10-13T23:21:02.672347Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:02.677775Z", "completed_at": "2022-10-13T23:21:02.677780Z"}], "thread_id": "Thread-4", "execution_time": 0.009246110916137695, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.shopify_source.stg_shopify__product_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:02.672287Z", "completed_at": "2022-10-13T23:21:02.678080Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:02.678638Z", "completed_at": "2022-10-13T23:21:02.678641Z"}], "thread_id": "Thread-2", "execution_time": 0.00933694839477539, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.shopify_source.stg_shopify__product_variant_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:02.672420Z", "completed_at": "2022-10-13T23:21:02.678286Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:02.678808Z", "completed_at": "2022-10-13T23:21:02.678810Z"}], "thread_id": "Thread-3", "execution_time": 0.007205963134765625, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.shopify_source.stg_shopify__refund_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:02.679042Z", "completed_at": "2022-10-13T23:21:02.682582Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:02.688233Z", "completed_at": "2022-10-13T23:21:02.688239Z"}], "thread_id": "Thread-4", "execution_time": 0.010368108749389648, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.shopify_source.stg_shopify__transaction_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:02.689850Z", "completed_at": "2022-10-13T23:21:03.054069Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:03.054373Z", "completed_at": "2022-10-13T23:21:03.054381Z"}], "thread_id": "Thread-4", "execution_time": 0.3652050495147705, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.klaviyo_source.stg_klaviyo__flow"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:02.682525Z", "completed_at": "2022-10-13T23:21:03.066178Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:03.069374Z", "completed_at": "2022-10-13T23:21:03.069380Z"}], "thread_id": "Thread-2", "execution_time": 0.39832115173339844, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.klaviyo_source.stg_klaviyo__campaign"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:02.682656Z", "completed_at": "2022-10-13T23:21:03.084040Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:03.084488Z", "completed_at": "2022-10-13T23:21:03.084495Z"}], "thread_id": "Thread-3", "execution_time": 0.40245485305786133, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.klaviyo_source.stg_klaviyo__event"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:03.055764Z", "completed_at": "2022-10-13T23:21:03.360017Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:03.380422Z", "completed_at": "2022-10-13T23:21:03.380433Z"}], "thread_id": "Thread-4", "execution_time": 0.32559990882873535, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.klaviyo_source.stg_klaviyo__integration"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:03.081169Z", "completed_at": "2022-10-13T23:21:03.433746Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:03.434199Z", "completed_at": "2022-10-13T23:21:03.434206Z"}], "thread_id": "Thread-2", "execution_time": 0.35346078872680664, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.klaviyo_source.stg_klaviyo__metric"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:03.085079Z", "completed_at": "2022-10-13T23:21:03.446092Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:03.446231Z", "completed_at": "2022-10-13T23:21:03.446235Z"}], "thread_id": "Thread-3", "execution_time": 0.36147522926330566, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.klaviyo_source.stg_klaviyo__person"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:03.434820Z", "completed_at": "2022-10-13T23:21:03.775103Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:03.775514Z", "completed_at": "2022-10-13T23:21:03.775522Z"}], "thread_id": "Thread-2", "execution_time": 0.34110498428344727, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.shopify_source.stg_shopify__order_adjustment"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:03.382890Z", "completed_at": "2022-10-13T23:21:03.790467Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:03.791351Z", "completed_at": "2022-10-13T23:21:03.791357Z"}], "thread_id": "Thread-4", "execution_time": 0.41014575958251953, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.shopify_source.stg_shopify__customer"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:03.446755Z", "completed_at": "2022-10-13T23:21:03.797865Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:03.798257Z", "completed_at": "2022-10-13T23:21:03.798262Z"}], "thread_id": "Thread-3", "execution_time": 0.3518247604370117, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.shopify_source.stg_shopify__order"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:02.554179Z", "completed_at": "2022-10-13T23:21:03.827506Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:03.827665Z", "completed_at": "2022-10-13T23:21:03.827671Z"}], "thread_id": "Thread-1", "execution_time": 1.2828378677368164, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.shopify.shopify__calendar"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:03.776758Z", "completed_at": "2022-10-13T23:21:04.113412Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:04.113898Z", "completed_at": "2022-10-13T23:21:04.113909Z"}], "thread_id": "Thread-2", "execution_time": 0.33807802200317383, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.shopify_source.stg_shopify__order_line"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:03.799031Z", "completed_at": "2022-10-13T23:21:04.113547Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:04.114006Z", "completed_at": "2022-10-13T23:21:04.114011Z"}], "thread_id": "Thread-3", "execution_time": 0.31585216522216797, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.shopify_source.stg_shopify__product"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:03.793412Z", "completed_at": "2022-10-13T23:21:04.136865Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:04.137050Z", "completed_at": "2022-10-13T23:21:04.137056Z"}], "thread_id": "Thread-4", "execution_time": 0.34464097023010254, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.shopify_source.stg_shopify__order_line_refund"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:04.137908Z", "completed_at": "2022-10-13T23:21:04.146896Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:04.147072Z", "completed_at": "2022-10-13T23:21:04.147076Z"}], "thread_id": "Thread-4", "execution_time": 0.009584903717041016, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__flow_flow_id__source_relation.015215d481"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:04.147720Z", "completed_at": "2022-10-13T23:21:04.153199Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:04.153347Z", "completed_at": "2022-10-13T23:21:04.153352Z"}], "thread_id": "Thread-4", "execution_time": 0.006040096282958984, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.klaviyo_source.not_null_stg_klaviyo__flow_flow_id.a00a897e42"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:04.153980Z", "completed_at": "2022-10-13T23:21:04.157170Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:04.157311Z", "completed_at": "2022-10-13T23:21:04.157315Z"}], "thread_id": "Thread-4", "execution_time": 0.0036821365356445312, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__campaign_campaign_id__source_relation.59158488ff"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:03.828277Z", "completed_at": "2022-10-13T23:21:04.175429Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:04.175585Z", "completed_at": "2022-10-13T23:21:04.175591Z"}], "thread_id": "Thread-1", "execution_time": 0.34765625, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.shopify_source.stg_shopify__product_variant"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:04.157933Z", "completed_at": "2022-10-13T23:21:04.181855Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:04.185589Z", "completed_at": "2022-10-13T23:21:04.185594Z"}], "thread_id": "Thread-4", "execution_time": 0.028022050857543945, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.klaviyo_source.not_null_stg_klaviyo__campaign_campaign_id.5dfc47dc1d"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:04.176198Z", "completed_at": "2022-10-13T23:21:04.189250Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:04.189468Z", "completed_at": "2022-10-13T23:21:04.189472Z"}], "thread_id": "Thread-1", "execution_time": 0.013677120208740234, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.klaviyo.int_klaviyo__event_attribution"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:04.186178Z", "completed_at": "2022-10-13T23:21:04.189394Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:04.189881Z", "completed_at": "2022-10-13T23:21:04.189885Z"}], "thread_id": "Thread-4", "execution_time": 0.00427699089050293, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__event_event_id__source_relation.3778c651d7"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:04.190888Z", "completed_at": "2022-10-13T23:21:04.196855Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:04.197124Z", "completed_at": "2022-10-13T23:21:04.197128Z"}], "thread_id": "Thread-1", "execution_time": 0.0069179534912109375, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.klaviyo_source.not_null_stg_klaviyo__event_event_id.7a09ac6ec1"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:04.193388Z", "completed_at": "2022-10-13T23:21:04.196914Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:04.197186Z", "completed_at": "2022-10-13T23:21:04.197189Z"}], "thread_id": "Thread-4", "execution_time": 0.00673985481262207, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__integration_integration_id__source_relation.be6158ad21"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:04.198249Z", "completed_at": "2022-10-13T23:21:04.203070Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:04.203314Z", "completed_at": "2022-10-13T23:21:04.203318Z"}], "thread_id": "Thread-1", "execution_time": 0.005667209625244141, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.klaviyo_source.not_null_stg_klaviyo__integration_integration_id.fe572c5f1b"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:04.198327Z", "completed_at": "2022-10-13T23:21:04.203124Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:04.203376Z", "completed_at": "2022-10-13T23:21:04.203378Z"}], "thread_id": "Thread-4", "execution_time": 0.005700826644897461, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__metric_metric_id__source_relation.e9f33c04e5"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:04.204350Z", "completed_at": "2022-10-13T23:21:04.209288Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:04.209541Z", "completed_at": "2022-10-13T23:21:04.209545Z"}], "thread_id": "Thread-1", "execution_time": 0.005740165710449219, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.klaviyo_source.not_null_stg_klaviyo__metric_metric_id.4759d62078"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:04.204406Z", "completed_at": "2022-10-13T23:21:04.209346Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:04.209601Z", "completed_at": "2022-10-13T23:21:04.209604Z"}], "thread_id": "Thread-4", "execution_time": 0.005780935287475586, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.klaviyo_source.dbt_utils_unique_combination_of_columns_stg_klaviyo__person_person_id__source_relation.33a4f9ca24"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:04.210571Z", "completed_at": "2022-10-13T23:21:04.215614Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:04.215870Z", "completed_at": "2022-10-13T23:21:04.215873Z"}], "thread_id": "Thread-1", "execution_time": 0.005851030349731445, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.klaviyo_source.not_null_stg_klaviyo__person_email.c7094cfe27"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:04.210635Z", "completed_at": "2022-10-13T23:21:04.215672Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:04.215932Z", "completed_at": "2022-10-13T23:21:04.215934Z"}], "thread_id": "Thread-4", "execution_time": 0.005895137786865234, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.klaviyo_source.not_null_stg_klaviyo__person_person_id.bd77ffc8aa"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:04.216918Z", "completed_at": "2022-10-13T23:21:04.223102Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:04.223346Z", "completed_at": "2022-10-13T23:21:04.223350Z"}], "thread_id": "Thread-1", "execution_time": 0.006990909576416016, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.klaviyo_source.unique_stg_klaviyo__person_email.dc3a98b014"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:04.216974Z", "completed_at": "2022-10-13T23:21:04.223155Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:04.223406Z", "completed_at": "2022-10-13T23:21:04.223409Z"}], "thread_id": "Thread-4", "execution_time": 0.007028102874755859, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_adjustment_order_adjustment_id__source_relation.00b7d10cb0"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:04.224391Z", "completed_at": "2022-10-13T23:21:04.230148Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:04.230327Z", "completed_at": "2022-10-13T23:21:04.230330Z"}], "thread_id": "Thread-1", "execution_time": 0.006489992141723633, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__customer_customer_id__source_relation.1b2185db25"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:04.224447Z", "completed_at": "2022-10-13T23:21:04.230263Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:04.230611Z", "completed_at": "2022-10-13T23:21:04.230615Z"}], "thread_id": "Thread-4", "execution_time": 0.006699085235595703, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_order_id__source_relation.81d10381c1"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:04.233243Z", "completed_at": "2022-10-13T23:21:04.236038Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:04.236450Z", "completed_at": "2022-10-13T23:21:04.236453Z"}], "thread_id": "Thread-4", "execution_time": 0.005401134490966797, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_line_order_line_id__source_relation.c2797e7a9c"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:04.236725Z", "completed_at": "2022-10-13T23:21:04.242114Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:04.242315Z", "completed_at": "2022-10-13T23:21:04.242318Z"}], "thread_id": "Thread-1", "execution_time": 0.0061800479888916016, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__product_product_id__source_relation.48b32ab6a2"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:04.239583Z", "completed_at": "2022-10-13T23:21:04.242365Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:04.242802Z", "completed_at": "2022-10-13T23:21:04.242806Z"}], "thread_id": "Thread-4", "execution_time": 0.0037310123443603516, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__order_line_refund_order_line_refund_id__source_relation.1877420c29"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:04.243356Z", "completed_at": "2022-10-13T23:21:04.252949Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:04.261121Z", "completed_at": "2022-10-13T23:21:04.261127Z"}], "thread_id": "Thread-1", "execution_time": 0.018398046493530273, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__product_variant_variant_id__source_relation.7506695ec0"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:04.261640Z", "completed_at": "2022-10-13T23:21:04.264740Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:04.264873Z", "completed_at": "2022-10-13T23:21:04.264876Z"}], "thread_id": "Thread-1", "execution_time": 0.003531932830810547, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.klaviyo.dbt_utils_unique_combination_of_columns_int_klaviyo__event_attribution_event_id__source_relation.654b98ad2c"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:04.265353Z", "completed_at": "2022-10-13T23:21:04.267595Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:04.267728Z", "completed_at": "2022-10-13T23:21:04.267731Z"}], "thread_id": "Thread-1", "execution_time": 0.0026769638061523438, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.klaviyo.not_null_int_klaviyo__event_attribution_event_id.8d186152c4"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:04.268193Z", "completed_at": "2022-10-13T23:21:04.276192Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:04.276326Z", "completed_at": "2022-10-13T23:21:04.276329Z"}], "thread_id": "Thread-1", "execution_time": 0.008439064025878906, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.shopify.dbt_utils_unique_combination_of_columns_shopify__orders__order_line_aggregates_order_id__source_relation.09d921d473"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:04.116093Z", "completed_at": "2022-10-13T23:21:04.404924Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:04.405114Z", "completed_at": "2022-10-13T23:21:04.405121Z"}], "thread_id": "Thread-2", "execution_time": 0.289996862411499, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.shopify_source.stg_shopify__refund"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:04.406469Z", "completed_at": "2022-10-13T23:21:04.414577Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:04.415000Z", "completed_at": "2022-10-13T23:21:04.415004Z"}], "thread_id": "Thread-2", "execution_time": 0.009125232696533203, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__refund_refund_id__source_relation.cd4dbc2b35"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:04.415879Z", "completed_at": "2022-10-13T23:21:04.458690Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:04.459050Z", "completed_at": "2022-10-13T23:21:04.459058Z"}], "thread_id": "Thread-1", "execution_time": 0.043856143951416016, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.shopify.shopify__order_lines"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:04.415941Z", "completed_at": "2022-10-13T23:21:04.458775Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:04.459116Z", "completed_at": "2022-10-13T23:21:04.459119Z"}], "thread_id": "Thread-2", "execution_time": 0.043959856033325195, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.shopify.shopify__orders"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:04.460186Z", "completed_at": "2022-10-13T23:21:04.463605Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:04.466579Z", "completed_at": "2022-10-13T23:21:04.466583Z"}], "thread_id": "Thread-2", "execution_time": 0.006758213043212891, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.shopify.dbt_utils_unique_combination_of_columns_shopify__order_lines_order_line_id__source_relation.2483d5ef95"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:04.463670Z", "completed_at": "2022-10-13T23:21:04.466991Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:04.467304Z", "completed_at": "2022-10-13T23:21:04.467306Z"}], "thread_id": "Thread-1", "execution_time": 0.004099845886230469, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.shopify.shopify__products"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:04.467363Z", "completed_at": "2022-10-13T23:21:04.473777Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:04.473925Z", "completed_at": "2022-10-13T23:21:04.473928Z"}], "thread_id": "Thread-2", "execution_time": 0.007010936737060547, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.shopify.dbt_utils_unique_combination_of_columns_shopify__orders_order_id__source_relation.b2d1eaf63d"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:04.471282Z", "completed_at": "2022-10-13T23:21:04.474151Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:04.474325Z", "completed_at": "2022-10-13T23:21:04.474327Z"}], "thread_id": "Thread-1", "execution_time": 0.003373861312866211, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.shopify.dbt_utils_unique_combination_of_columns_shopify__products_product_id__source_relation.f00b2fb95a"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:04.116195Z", "completed_at": "2022-10-13T23:21:04.494862Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:04.495001Z", "completed_at": "2022-10-13T23:21:04.495007Z"}], "thread_id": "Thread-3", "execution_time": 0.37947988510131836, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.shopify_source.stg_shopify__transaction"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:04.495683Z", "completed_at": "2022-10-13T23:21:04.499324Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:04.502495Z", "completed_at": "2022-10-13T23:21:04.502499Z"}], "thread_id": "Thread-2", "execution_time": 0.0071637630462646484, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.shopify.shopify__transactions"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:04.499391Z", "completed_at": "2022-10-13T23:21:04.503011Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:04.503516Z", "completed_at": "2022-10-13T23:21:04.503519Z"}], "thread_id": "Thread-1", "execution_time": 0.0046269893646240234, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.shopify_source.dbt_utils_unique_combination_of_columns_stg_shopify__transaction_transaction_id__source_relation.d55a33652a"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:04.503848Z", "completed_at": "2022-10-13T23:21:04.508557Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:04.509049Z", "completed_at": "2022-10-13T23:21:04.509052Z"}], "thread_id": "Thread-2", "execution_time": 0.006025075912475586, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.shopify.dbt_utils_unique_combination_of_columns_shopify__transactions_transaction_id__source_relation.7341b755c0"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:04.509814Z", "completed_at": "2022-10-13T23:21:04.517062Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:04.517351Z", "completed_at": "2022-10-13T23:21:04.517356Z"}], "thread_id": "Thread-3", "execution_time": 0.008033990859985352, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.shopify.dbt_utils_unique_combination_of_columns_shopify__customers__order_aggregates_customer_id__source_relation.5a5e85c8a9"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:04.246737Z", "completed_at": "2022-10-13T23:21:04.546039Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:04.546173Z", "completed_at": "2022-10-13T23:21:04.546178Z"}], "thread_id": "Thread-4", "execution_time": 0.3028879165649414, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.klaviyo.klaviyo__events"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:04.553600Z", "completed_at": "2022-10-13T23:21:04.571186Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:04.571332Z", "completed_at": "2022-10-13T23:21:04.571337Z"}], "thread_id": "Thread-3", "execution_time": 0.01902318000793457, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.shopify_holistic_reporting.int__daily_klaviyo_user_metrics"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:04.546880Z", "completed_at": "2022-10-13T23:21:04.571786Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:04.572077Z", "completed_at": "2022-10-13T23:21:04.572080Z"}], "thread_id": "Thread-2", "execution_time": 0.028123140335083008, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.klaviyo.klaviyo__person_campaign_flow"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:04.572020Z", "completed_at": "2022-10-13T23:21:04.575307Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:04.575560Z", "completed_at": "2022-10-13T23:21:04.575563Z"}], "thread_id": "Thread-3", "execution_time": 0.0060651302337646484, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__events_event_id__source_relation.847dad4174"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:04.575500Z", "completed_at": "2022-10-13T23:21:04.578130Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:04.578394Z", "completed_at": "2022-10-13T23:21:04.578397Z"}], "thread_id": "Thread-2", "execution_time": 0.006337165832519531, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.klaviyo.not_null_klaviyo__events_event_id.eada7340ba"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:04.553746Z", "completed_at": "2022-10-13T23:21:04.892816Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:04.893188Z", "completed_at": "2022-10-13T23:21:04.893195Z"}], "thread_id": "Thread-4", "execution_time": 0.34067416191101074, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.shopify_holistic_reporting.shopify_holistic_reporting__orders_attribution"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:04.509750Z", "completed_at": "2022-10-13T23:21:04.920377Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:04.920527Z", "completed_at": "2022-10-13T23:21:04.920532Z"}], "thread_id": "Thread-1", "execution_time": 0.41150474548339844, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.shopify.shopify__customers"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:04.900731Z", "completed_at": "2022-10-13T23:21:04.923246Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:04.923391Z", "completed_at": "2022-10-13T23:21:04.923395Z"}], "thread_id": "Thread-4", "execution_time": 0.023033857345581055, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__person_campaign_flow_person_id__last_touch_campaign_id__last_touch_flow_id__variation_id__source_relation.30e1824079"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:04.578335Z", "completed_at": "2022-10-13T23:21:04.927047Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:04.927307Z", "completed_at": "2022-10-13T23:21:04.927311Z"}], "thread_id": "Thread-3", "execution_time": 0.34955811500549316, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.klaviyo.int_klaviyo__campaign_flow_metrics"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:04.921077Z", "completed_at": "2022-10-13T23:21:04.927244Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:04.927691Z", "completed_at": "2022-10-13T23:21:04.927694Z"}], "thread_id": "Thread-1", "execution_time": 0.00714111328125, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.klaviyo.not_null_klaviyo__person_campaign_flow_person_id.e27d13b0f2"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:04.923976Z", "completed_at": "2022-10-13T23:21:04.927432Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:04.928148Z", "completed_at": "2022-10-13T23:21:04.928151Z"}], "thread_id": "Thread-4", "execution_time": 0.00481414794921875, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.shopify_holistic_reporting.int__daily_shopify_customer_orders"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:04.928914Z", "completed_at": "2022-10-13T23:21:04.943117Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:04.943957Z", "completed_at": "2022-10-13T23:21:04.943963Z"}], "thread_id": "Thread-3", "execution_time": 0.016031980514526367, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.shopify_holistic_reporting.dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__orders_attribution_order_id__shopify_source_relation.0eb46743bb"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:04.931666Z", "completed_at": "2022-10-13T23:21:04.943473Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:04.944512Z", "completed_at": "2022-10-13T23:21:04.944515Z"}], "thread_id": "Thread-1", "execution_time": 0.01619410514831543, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.shopify.shopify__customer_cohorts"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:04.945529Z", "completed_at": "2022-10-13T23:21:04.952140Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:04.952518Z", "completed_at": "2022-10-13T23:21:04.952523Z"}], "thread_id": "Thread-3", "execution_time": 0.00764012336730957, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.shopify.dbt_utils_unique_combination_of_columns_shopify__customers_customer_id__source_relation.88d3656469"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:04.582939Z", "completed_at": "2022-10-13T23:21:05.055668Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:05.055842Z", "completed_at": "2022-10-13T23:21:05.055849Z"}], "thread_id": "Thread-2", "execution_time": 0.47332096099853516, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.klaviyo.int_klaviyo__person_metrics"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:05.056766Z", "completed_at": "2022-10-13T23:21:05.060931Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:05.061082Z", "completed_at": "2022-10-13T23:21:05.061086Z"}], "thread_id": "Thread-2", "execution_time": 0.004834175109863281, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.klaviyo.dbt_utils_unique_combination_of_columns_int_klaviyo__campaign_flow_metrics_variation_id__source_relation__last_touch_campaign_id__last_touch_flow_id.3ea05faa81"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:04.948417Z", "completed_at": "2022-10-13T23:21:05.251268Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:05.252296Z", "completed_at": "2022-10-13T23:21:05.252315Z"}], "thread_id": "Thread-1", "execution_time": 0.30742573738098145, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.klaviyo.klaviyo__campaigns"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:04.936713Z", "completed_at": "2022-10-13T23:21:05.253454Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:05.254558Z", "completed_at": "2022-10-13T23:21:05.254566Z"}], "thread_id": "Thread-4", "execution_time": 0.3259618282318115, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.shopify_holistic_reporting.int__shopify_customer_rollup"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:05.254686Z", "completed_at": "2022-10-13T23:21:05.265880Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:05.266236Z", "completed_at": "2022-10-13T23:21:05.266243Z"}], "thread_id": "Thread-1", "execution_time": 0.012721061706542969, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.shopify.not_null_shopify__customer_cohorts_customer_cohort_id.88e9c30925"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:05.261994Z", "completed_at": "2022-10-13T23:21:05.266625Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:05.267206Z", "completed_at": "2022-10-13T23:21:05.267211Z"}], "thread_id": "Thread-4", "execution_time": 0.005946159362792969, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.shopify.unique_shopify__customer_cohorts_customer_cohort_id.c5e4855c7a"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:05.273563Z", "completed_at": "2022-10-13T23:21:05.278123Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:05.278320Z", "completed_at": "2022-10-13T23:21:05.278327Z"}], "thread_id": "Thread-4", "execution_time": 0.006033182144165039, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.klaviyo.dbt_utils_unique_combination_of_columns_int_klaviyo__person_metrics_person_id__source_relation.4897d57f8b"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:05.279127Z", "completed_at": "2022-10-13T23:21:05.283373Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:05.283538Z", "completed_at": "2022-10-13T23:21:05.283542Z"}], "thread_id": "Thread-4", "execution_time": 0.004879951477050781, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.klaviyo.not_null_int_klaviyo__person_metrics_person_id.2c0f4e5a67"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:05.284247Z", "completed_at": "2022-10-13T23:21:05.287769Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:05.287917Z", "completed_at": "2022-10-13T23:21:05.287922Z"}], "thread_id": "Thread-4", "execution_time": 0.0040781497955322266, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__campaigns_campaign_variation_key__source_relation.e5d14aee28"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:05.288514Z", "completed_at": "2022-10-13T23:21:05.291259Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:05.291402Z", "completed_at": "2022-10-13T23:21:05.291406Z"}], "thread_id": "Thread-4", "execution_time": 0.0032227039337158203, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.klaviyo.not_null_klaviyo__campaigns_campaign_variation_key.c4588cdadc"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:04.953057Z", "completed_at": "2022-10-13T23:21:05.496118Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:05.496592Z", "completed_at": "2022-10-13T23:21:05.496601Z"}], "thread_id": "Thread-3", "execution_time": 0.5441100597381592, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.klaviyo.klaviyo__flows"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:05.061703Z", "completed_at": "2022-10-13T23:21:05.496251Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:05.496696Z", "completed_at": "2022-10-13T23:21:05.496700Z"}], "thread_id": "Thread-2", "execution_time": 0.4358179569244385, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.shopify_holistic_reporting.shopify_holistic_reporting__daily_customer_metrics"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:05.498991Z", "completed_at": "2022-10-13T23:21:05.522822Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:05.523379Z", "completed_at": "2022-10-13T23:21:05.523388Z"}], "thread_id": "Thread-2", "execution_time": 0.025833845138549805, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__flows_flow_variation_key__source_relation.925d4118dc"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:05.499179Z", "completed_at": "2022-10-13T23:21:05.523181Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:05.523979Z", "completed_at": "2022-10-13T23:21:05.523983Z"}], "thread_id": "Thread-4", "execution_time": 0.025975942611694336, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.klaviyo.not_null_klaviyo__flows_flow_variation_key.152c0d960b"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:05.504632Z", "completed_at": "2022-10-13T23:21:05.523254Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:05.524057Z", "completed_at": "2022-10-13T23:21:05.524063Z"}], "thread_id": "Thread-3", "execution_time": 0.025883913040161133, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.shopify_holistic_reporting.dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__daily_customer_metrics_date_day__email__klaviyo_source_relation__shopify_source_relation__campaign_id__flow_id__variation_id.0489c190fd"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:05.267680Z", "completed_at": "2022-10-13T23:21:05.523322Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:05.524135Z", "completed_at": "2022-10-13T23:21:05.524138Z"}], "thread_id": "Thread-1", "execution_time": 0.2577683925628662, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.klaviyo.klaviyo__persons"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:05.526854Z", "completed_at": "2022-10-13T23:21:05.540776Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:05.540953Z", "completed_at": "2022-10-13T23:21:05.540958Z"}], "thread_id": "Thread-4", "execution_time": 0.015397071838378906, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.klaviyo.dbt_utils_unique_combination_of_columns_klaviyo__persons_person_id__source_relation.b223d703b3"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:05.526993Z", "completed_at": "2022-10-13T23:21:05.541017Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:05.541549Z", "completed_at": "2022-10-13T23:21:05.541552Z"}], "thread_id": "Thread-1", "execution_time": 0.015594005584716797, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.klaviyo.not_null_klaviyo__persons_person_id.624a41e75a"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:05.526925Z", "completed_at": "2022-10-13T23:21:05.541067Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:05.541638Z", "completed_at": "2022-10-13T23:21:05.541640Z"}], "thread_id": "Thread-3", "execution_time": 0.015960216522216797, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.klaviyo.not_null_klaviyo__persons_email.072e38d07d"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:05.542408Z", "completed_at": "2022-10-13T23:21:05.544920Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:05.545046Z", "completed_at": "2022-10-13T23:21:05.545049Z"}], "thread_id": "Thread-4", "execution_time": 0.0034668445587158203, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.klaviyo.unique_klaviyo__persons_email.a330194dd6"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:05.526780Z", "completed_at": "2022-10-13T23:21:05.853570Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:05.854111Z", "completed_at": "2022-10-13T23:21:05.854137Z"}], "thread_id": "Thread-2", "execution_time": 0.3291921615600586, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.shopify_holistic_reporting.int__klaviyo_person_rollup"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:05.858799Z", "completed_at": "2022-10-13T23:21:06.463457Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:06.463819Z", "completed_at": "2022-10-13T23:21:06.463840Z"}], "thread_id": "Thread-1", "execution_time": 0.6066861152648926, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.shopify_holistic_reporting.shopify_holistic_reporting__customer_enhanced"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-13T23:21:06.466247Z", "completed_at": "2022-10-13T23:21:06.473850Z"}, {"name": "execute", "started_at": "2022-10-13T23:21:06.474132Z", "completed_at": "2022-10-13T23:21:06.474140Z"}], "thread_id": "Thread-4", "execution_time": 0.008740901947021484, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.shopify_holistic_reporting.dbt_utils_unique_combination_of_columns_shopify_holistic_reporting__customer_enhanced_email__klaviyo_source_relation__shopify_source_relation.2ea9394109"}], "elapsed_time": 6.257101058959961, "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 2d872c09653b4656258bf2b8b77cf3de35bdfa9a Mon Sep 17 00:00:00 2001 From: Jamie Rodriguez <65564846+fivetran-jamie@users.noreply.github.com> Date: Thu, 13 Oct 2022 16:47:31 -0700 Subject: [PATCH 13/13] reference klaviyo package --- packages.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/packages.yml b/packages.yml index d689e87..e906992 100644 --- a/packages.yml +++ b/packages.yml @@ -2,8 +2,5 @@ packages: - package: fivetran/shopify version: [">=0.6.0", "<0.7.0"] - # - package: fivetran/klaviyo - # version: [">=0.4.0", "<0.5.0"] - - - git: https://github.com/fivetran/dbt_klaviyo.git - revision: postgres-incremental-strategy + - package: fivetran/klaviyo + version: [">=0.4.0", "<0.5.0"] \ No newline at end of file